@@ -1945,7 +1945,7 @@ def validate_cd3(choices, filename, var_file, prefix, outdir, ct1): #config1, si
1945
1945
1946
1946
#ct.get_network_compartment_ids(config['tenancy'], "root", configFileName)
1947
1947
#print("Getting Compartments OCIDs...")
1948
- ct .get_compartment_map (var_file ,'Validator' )
1948
+ all_comp_ocids = ct .get_compartment_map (var_file ,'Validator' )
1949
1949
1950
1950
vcnobj = parseVCNs (filename )
1951
1951
subnetobj = parseSubnets (filename )
@@ -1971,25 +1971,25 @@ def validate_cd3(choices, filename, var_file, prefix, outdir, ct1): #config1, si
1971
1971
if ('Validate Policies' in options [0 ]):
1972
1972
log ("\n ============================= Verifying Policies Tab ==========================================\n " )
1973
1973
print ("\n Validating Policies Tab.." )
1974
- policies_check = validate_policies (filename ,ct . ntk_compartment_ids )
1974
+ policies_check = validate_policies (filename ,all_comp_ocids )
1975
1975
errors = policies_check
1976
1976
if ('Validate Tags' in options [0 ]):
1977
1977
log ("\n ============================= Verifying Tags Tab ==========================================\n " )
1978
1978
print ("\n Validating Tags Tab.." )
1979
- tags_check = validate_tags (filename ,ct . ntk_compartment_ids )
1979
+ tags_check = validate_tags (filename ,all_comp_ocids )
1980
1980
errors = tags_check
1981
1981
1982
1982
if ('Validate Budgets' in options [0 ]):
1983
1983
log ("\n ============================= Verifying Budgets Tab ==========================================\n " )
1984
1984
print ("\n Validating Budgets Tab.." )
1985
- budgets_check = validate_budgets (filename ,ct . ntk_compartment_ids )
1985
+ budgets_check = validate_budgets (filename ,all_comp_ocids )
1986
1986
errors = budgets_check
1987
1987
final_check .append (budgets_check )
1988
1988
1989
1989
if ('Validate KMS' in options [0 ]):
1990
1990
log ("\n ============================= Verifying KMS Tab ==========================================\n " )
1991
1991
print ("\n Validating KMS Tab.." )
1992
- kms_check = validate_kms (filename ,ct . ntk_compartment_ids )
1992
+ kms_check = validate_kms (filename ,all_comp_ocids )
1993
1993
errors = kms_check
1994
1994
1995
1995
@@ -2001,51 +2001,51 @@ def validate_cd3(choices, filename, var_file, prefix, outdir, ct1): #config1, si
2001
2001
log ("\n ====================== Note: LPGs will not be verified ====================================\n " )
2002
2002
print ("\n Validating VCNs Tab.." )
2003
2003
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)
2005
2005
2006
2006
log ("============================= Verifying SubnetsVLANs Tab ==========================================\n " )
2007
2007
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 )
2009
2009
2010
2010
log ("============================= Verifying DHCP Tab ==========================================\n " )
2011
2011
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 )
2013
2013
2014
2014
log ("============================= Verifying DRGs Tab ==========================================\n " )
2015
2015
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 )
2017
2017
2018
2018
if any ([vcn_check , vcn_cidr_check , vcn_peer_check , subnet_check , subnet_cidr_check , dhcp_check , drgv2_check ]):
2019
2019
errors = True
2020
2020
2021
2021
if ('Validate DNS' in options [0 ]):
2022
2022
log ("\n ============================= Verifying DNS Tabs ==========================================\n " )
2023
2023
print ("\n Validating DNS Tab.." )
2024
- dns_check = validate_dns (filename ,ct . ntk_compartment_ids )
2024
+ dns_check = validate_dns (filename ,all_comp_ocids )
2025
2025
errors = dns_check
2026
2026
2027
2027
if ('Validate Instances' in options [0 ]):
2028
2028
log ("\n ============================= Verifying Instances Tab ==========================================\n " )
2029
2029
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 )
2031
2031
errors = instances_check
2032
2032
2033
2033
if ('Validate Block Volumes' in options [0 ]):
2034
2034
log ("\n ============================= Verifying BlockVolumes Tab ==========================================\n " )
2035
2035
print ("\n Validating BlockVolumes Tab.." )
2036
- bvs_check = validate_blockvols (filename ,ct . ntk_compartment_ids )
2036
+ bvs_check = validate_blockvols (filename ,all_comp_ocids )
2037
2037
errors = bvs_check
2038
2038
2039
2039
if ('Validate FSS' in options [0 ]):
2040
2040
log ("\n ============================= Verifying FSS Tab ==========================================\n " )
2041
2041
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 )
2043
2043
errors = fss_check
2044
2044
2045
2045
if ('Validate Buckets' in options [0 ]):
2046
2046
log ("\n ============================= Verifying Buckets Tab ==========================================\n " )
2047
2047
print ("\n Validating Buckets Tab.." )
2048
- buckets_check = validate_buckets (filename ,ct . ntk_compartment_ids )
2048
+ buckets_check = validate_buckets (filename ,all_comp_ocids )
2049
2049
errors = buckets_check
2050
2050
2051
2051
# Prints the final result; once the validation is complete
0 commit comments