Skip to content

Commit 03a5399

Browse files
committed
Automation Toolkit Release v2025.1.0
1 parent 27cb01e commit 03a5399

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ ARG DOWNLOAD_PROVIDER=YES
1919
ARG TF_OCI_PROVIDER=6.30.0
2020
ARG TF_NULL_PROVIDER=3.2.3
2121

22-
RUN microdnf update -y && \
23-
microdnf install -y sudo && \
22+
RUN microdnf install -y sudo && \
2423
groupadd --gid $USER_GID $USERNAME && \
2524
useradd --uid $USER_UID --gid $USER_GID -d /$USERNAME -m $USERNAME && \
2625
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \

cd3_automation_toolkit/cd3Validator.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,7 @@ def validate_cd3(choices, filename, var_file, prefix, outdir, ct1): #config1, si
19451945

19461946
#ct.get_network_compartment_ids(config['tenancy'], "root", configFileName)
19471947
#print("Getting Compartments OCIDs...")
1948-
ct.get_compartment_map(var_file,'Validator')
1948+
all_comp_ocids = ct.get_compartment_map(var_file,'Validator')
19491949

19501950
vcnobj = parseVCNs(filename)
19511951
subnetobj = parseSubnets(filename)
@@ -1971,25 +1971,25 @@ def validate_cd3(choices, filename, var_file, prefix, outdir, ct1): #config1, si
19711971
if ('Validate Policies' in options[0]):
19721972
log("\n============================= Verifying Policies Tab ==========================================\n")
19731973
print("\nValidating Policies Tab..")
1974-
policies_check = validate_policies(filename,ct.ntk_compartment_ids)
1974+
policies_check = validate_policies(filename,all_comp_ocids)
19751975
errors = policies_check
19761976
if ('Validate Tags' in options[0]):
19771977
log("\n============================= Verifying Tags Tab ==========================================\n")
19781978
print("\nValidating Tags Tab..")
1979-
tags_check = validate_tags(filename,ct.ntk_compartment_ids)
1979+
tags_check = validate_tags(filename,all_comp_ocids)
19801980
errors = tags_check
19811981

19821982
if ('Validate Budgets' in options[0]):
19831983
log("\n============================= Verifying Budgets Tab ==========================================\n")
19841984
print("\nValidating Budgets Tab..")
1985-
budgets_check = validate_budgets(filename,ct.ntk_compartment_ids)
1985+
budgets_check = validate_budgets(filename,all_comp_ocids)
19861986
errors = budgets_check
19871987
final_check.append(budgets_check)
19881988

19891989
if ('Validate KMS' in options[0]):
19901990
log("\n============================= Verifying KMS Tab ==========================================\n")
19911991
print("\nValidating KMS Tab..")
1992-
kms_check = validate_kms(filename,ct.ntk_compartment_ids)
1992+
kms_check = validate_kms(filename,all_comp_ocids)
19931993
errors = kms_check
19941994

19951995

@@ -2001,51 +2001,51 @@ def validate_cd3(choices, filename, var_file, prefix, outdir, ct1): #config1, si
20012001
log("\n====================== Note: LPGs will not be verified ====================================\n")
20022002
print("\nValidating VCNs Tab..")
20032003
print("NOTE: LPGs will not be verified")
2004-
vcn_check, vcn_cidr_check, vcn_peer_check = validate_vcns(filename, ct.ntk_compartment_ids, vcnobj) #, config)
2004+
vcn_check, vcn_cidr_check, vcn_peer_check = validate_vcns(filename, all_comp_ocids, vcnobj) #, config)
20052005

20062006
log("============================= Verifying SubnetsVLANs Tab ==========================================\n")
20072007
print("\nValidating SubnetsVLANs Tab..")
2008-
subnet_check, subnet_cidr_check = validate_subnets(filename, ct.ntk_compartment_ids, vcnobj)
2008+
subnet_check, subnet_cidr_check = validate_subnets(filename, all_comp_ocids, vcnobj)
20092009

20102010
log("============================= Verifying DHCP Tab ==========================================\n")
20112011
print("\nValidating DHCP Tab..")
2012-
dhcp_check = validate_dhcp(filename, ct.ntk_compartment_ids, vcnobj)
2012+
dhcp_check = validate_dhcp(filename, all_comp_ocids, vcnobj)
20132013

20142014
log("============================= Verifying DRGs Tab ==========================================\n")
20152015
print("\nValidating DRGs Tab..")
2016-
drgv2_check = validate_drgv2(filename, ct.ntk_compartment_ids, vcnobj)
2016+
drgv2_check = validate_drgv2(filename, all_comp_ocids, vcnobj)
20172017

20182018
if any([vcn_check, vcn_cidr_check, vcn_peer_check, subnet_check, subnet_cidr_check, dhcp_check, drgv2_check]):
20192019
errors = True
20202020

20212021
if ('Validate DNS' in options[0]):
20222022
log("\n============================= Verifying DNS Tabs ==========================================\n")
20232023
print("\nValidating DNS Tab..")
2024-
dns_check = validate_dns(filename,ct.ntk_compartment_ids)
2024+
dns_check = validate_dns(filename,all_comp_ocids)
20252025
errors = dns_check
20262026

20272027
if ('Validate Instances' in options[0]):
20282028
log("\n============================= Verifying Instances Tab ==========================================\n")
20292029
print("\nValidating Instances Tab..")
2030-
instances_check = validate_instances(filename,ct.ntk_compartment_ids,subnetobj,vcn_subnet_list,vcn_nsg_list)
2030+
instances_check = validate_instances(filename,all_comp_ocids,subnetobj,vcn_subnet_list,vcn_nsg_list)
20312031
errors = instances_check
20322032

20332033
if ('Validate Block Volumes' in options[0]):
20342034
log("\n============================= Verifying BlockVolumes Tab ==========================================\n")
20352035
print("\nValidating BlockVolumes Tab..")
2036-
bvs_check = validate_blockvols(filename,ct.ntk_compartment_ids)
2036+
bvs_check = validate_blockvols(filename,all_comp_ocids)
20372037
errors = bvs_check
20382038

20392039
if ('Validate FSS' in options[0]):
20402040
log("\n============================= Verifying FSS Tab ==========================================\n")
20412041
print("\nValidating FSS Tab..")
2042-
fss_check = validate_fss(filename,ct.ntk_compartment_ids,subnetobj,vcn_subnet_list,vcn_nsg_list)
2042+
fss_check = validate_fss(filename,all_comp_ocids,subnetobj,vcn_subnet_list,vcn_nsg_list)
20432043
errors = fss_check
20442044

20452045
if ('Validate Buckets' in options[0]):
20462046
log("\n============================= Verifying Buckets Tab ==========================================\n")
20472047
print("\nValidating Buckets Tab..")
2048-
buckets_check = validate_buckets(filename,ct.ntk_compartment_ids)
2048+
buckets_check = validate_buckets(filename,all_comp_ocids)
20492049
errors = buckets_check
20502050

20512051
# Prints the final result; once the validation is complete

cd3_automation_toolkit/commonTools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,10 @@ def get_compartment_map(self, var_file, resource_name):
373373
#print("Please fetch compartments first from CD3 Services option from main menu")
374374
exit(1)
375375
if resource_name in ntk_only_resources:
376-
pass
376+
if resource_name == "Validator":
377+
return var_ocids
378+
else:
379+
pass
377380
else:
378381
print("\n")
379382
if resource_name in ["Compartments","IAM Policies","IAM Groups","IAM Users","Network Sources","Tagging Objects"]:

cd3_automation_toolkit/setUpOCI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ def export_management_services(prim_options=[]):
882882

883883

884884
def export_notifications(inputfile, outdir, service_dir, config, signer, ct, export_regions, export_tags_list):
885-
compartments = ct.get_compartment_map(var_file,'Notifications')
885+
#compartments = ct.get_compartment_map(var_file,'Notifications')
886886
ManagementServices.export_notifications(inputfile, outdir, service_dir, config,signer,ct, export_compartments=compartments, export_regions=export_regions,export_tags=export_tags_list)
887887
create_management_services(prim_options=['Add/Modify/Delete Notifications'])
888888
print("\n\nExecute import_commands_notifications.sh script created under each region directory to synch TF with OCI Notifications\n")

0 commit comments

Comments
 (0)