Skip to content

Commit fcfffbd

Browse files
committed
Automation Toolkit Release v10.1
1 parent 8e52bbf commit fcfffbd

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

cd3_automation_toolkit/Governance/Tagging/create_terraform_tags.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ def create_terraform_tags(inputfile, outdir, service_dir, prefix, config):
116116
if (regions[j] not in check_diff_region and regions[j] not in commonTools.endNames and str(regions[j]).lower() != "nan"):
117117
check_diff_region.append(regions[j])
118118

119-
# If some invalid region is specified in a row which is not part of VCN Info Tab
120-
if region not in ct.all_regions:
121-
print("\nERROR!!! Invalid Region; It should be one of the regions tenancy is subscribed to..Exiting!")
119+
# If some invalid region is specified in a row
120+
if region != ct.home_region:
121+
print("\nERROR!!! Invalid Region; It should be Home Region of the tenancy..Exiting!")
122122
exit(1)
123123

124124
if str(df.loc[i,'Default Tag Compartment=Default Tag Value']).strip().lower() != 'nan' and str(df.loc[i,'Tag Keys']).strip().lower() == 'nan':

cd3_automation_toolkit/Identity/Compartments/create_terraform_compartments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def travel(parent, keys, values, c):
109109

110110
region = region.strip().lower()
111111

112-
# If some invalid region is specified in a row which is not part of VCN Info Tab
112+
# If some invalid region is specified in a row
113113
if region != ct.home_region:
114114
print("\nERROR!!! Invalid Region; It should be Home Region of the tenancy..Exiting!")
115115
exit(1)

cd3_automation_toolkit/Identity/Groups/create_terraform_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def create_terraform_groups(inputfile, outdir, service_dir, prefix, config=DEFAU
7676
break
7777
region=region.strip().lower()
7878

79-
# If some invalid region is specified in a row which is not part of VCN Info Tab
79+
# If some invalid region is specified in a row
8080
if region != ct.home_region:
8181
print("\nERROR!!! Invalid Region; It should be Home Region of the tenancy..Exiting!")
8282
exit(1)

cd3_automation_toolkit/ManagementServices/Monitoring/export_alarms_nonGreenField.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
oci_obj_names = {}
2121

2222

23-
def print_alarms(region, alarm, ncpclient,values_for_column, ntk_compartment_name):
23+
def print_alarms(region, alarm, ncpclient,values_for_column, ntk_compartment_name,ct):
2424
alarm_tf_name = commonTools.check_tf_variable(alarm.display_name)
2525
comp_tf_name = commonTools.check_tf_variable(ntk_compartment_name)
2626
suppression = alarm.suppression
@@ -34,7 +34,6 @@ def print_alarms(region, alarm, ncpclient,values_for_column, ntk_compartment_nam
3434
# statistic = query[query.rfind(".") + 1:query.rfind("(")]
3535

3636
skip_row=0
37-
ct = commonTools()
3837
for col_header in values_for_column:
3938
if col_header == 'Region':
4039
values_for_column[col_header].append(region)
@@ -149,7 +148,7 @@ def export_alarms(inputfile, _outdir, service_dir, _config, ct, export_compartme
149148

150149
for alarmSummary in alarms.data:
151150
alarm=mclient.get_alarm(alarmSummary.id).data
152-
print_alarms(region, alarm,ncpclient,values_for_column, ntk_compartment_name)
151+
print_alarms(region, alarm,ncpclient,values_for_column, ntk_compartment_name,ct)
153152

154153

155154
with open(script_file, 'a') as importCommands[reg]:

cd3_automation_toolkit/Release-Notes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,6 @@ CD3 Automation Toolkit Tag v10.1
356356
4. Added Functionality for export of ADBs.
357357
5. Python code re do for creation of NSGs - Supports duplicate NSG names across different regions.
358358
6. Terraform code update to make Null values as optional in tfvars for all components.
359-
7. Performance tuning has been done wrt Fetch Compartments during Non-Greenfield workflow.The script will be exceuted
359+
7. Performance tuning has been done wrt Fetch Compartments during Non-Greenfield workflow. The script will be executed
360360
only once when you select multiple export options simultaneously.
361361
8. Bug fixes wrt Networking, Tagging, Excel sheet templates etc

cd3_automation_toolkit/Storage/BlockVolume/export_blockvolumes_nonGreenField.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ def volume_attachment_info(compute,ct,volume_id,export_compartments):
4848
attachments=None
4949
for ntk_compartment_name in export_compartments:
5050
attach_info = compute.list_volume_attachments(compartment_id = ct.ntk_compartment_ids[ntk_compartment_name], volume_id = volume_id)
51-
print(attach_info.data)
52-
print("-----------")
5351
for attachments in attach_info.data:
5452
lifecycle_state = attachments.lifecycle_state
5553
if lifecycle_state == 'ATTACHED':

0 commit comments

Comments
 (0)