@@ -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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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 ("\n Validating 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
0 commit comments