Skip to content

Commit 3dc126b

Browse files
committed
Automation Toolkit Release v10.1
1 parent 235be77 commit 3dc126b

File tree

11 files changed

+24
-15
lines changed

11 files changed

+24
-15
lines changed

cd3_automation_toolkit/DeveloperServices/ResourceManager/create_resource_manager_stack.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ def create_resource_manager(outdir, outdir_struct,prefix,regions, config=DEFAULT
227227

228228
svcs = []
229229
for region in regions:
230+
comp_name = ""
231+
comp_id = rm_region_comp_map[region]
232+
for nm, id in ct.ntk_compartment_ids.items():
233+
if id == comp_id:
234+
comp_name = nm
235+
break
236+
230237
print("\nStart creating Stacks for "+region+ " region...")
231238
region_dir = outdir + "/" + region
232239
rm_dir = region_dir + '/RM/'

cd3_automation_toolkit/Network/BaseNetwork/create_terraform_nsg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def create_terraform_nsg(inputfile, outdir, service_dir, prefix, non_gf_tenancy,
206206
for columnname in dfcolumns:
207207

208208
# Column value
209-
columnvalue = str(df[columnname][i]).strip()
209+
if (columnname != 'Rule Description'):
210+
columnvalue = str(df[columnname][i]).strip()
210211

211212
# Check for boolean/null in column values
212213
columnvalue = commonTools.check_columnvalue(columnvalue)

cd3_automation_toolkit/Network/LoadBalancers/export_lbr_nonGreenField.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def common_headers(region, headers, values_for_column, eachlbr, excel_header_map
6666
pass
6767
return values_for_column
6868

69-
def print_certs(obj, reg, outdir):
69+
def print_certs(obj, reg, outdir,service_dir):
7070

7171
cname = ""
7272
pname = ""
@@ -77,13 +77,13 @@ def print_certs(obj, reg, outdir):
7777
#print(obj.certificate_name, outdir, reg)
7878

7979
if str(ca_certificate).lower() != "none":
80-
cname = outdir + "/" + str(reg).lower() + "/"+ str(obj.certificate_name) + "-ca-certificate.cert"
80+
cname = outdir + "/" + str(reg).lower() + "/"+ service_dir +"/" + str(obj.certificate_name) + "-ca-certificate.cert"
8181
ca_cert = open(cname, "w")
8282
ca_cert.write(ca_certificate)
8383
ca_cert.close()
8484

8585
if str(public_certificate).lower() != "none":
86-
pname = outdir + "/" + str(reg).lower() + "/"+ str(obj.certificate_name) + "-public_certificate.cert"
86+
pname = outdir + "/" + str(reg).lower() + "/"+ service_dir +"/" + str(obj.certificate_name) + "-public_certificate.cert"
8787
public_cert = open(pname, "w")
8888
public_cert.write(public_certificate)
8989
public_cert.close()
@@ -137,7 +137,7 @@ def insert_values(values_for_column, oci_objs, sheet_dict, region,comp_name, dis
137137
values_for_column = commonTools.export_extra_columns(oci_objs, col_header, sheet_dict, values_for_column)
138138

139139

140-
def print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, lbr_compartment_name, network):
140+
def print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, lbr_compartment_name, network,service_dir):
141141

142142
for eachlbr in LBRs.data:
143143

@@ -257,7 +257,7 @@ def print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, lbr_c
257257

258258
for certificates, details in certs.items():
259259
# Get cert info
260-
cert_name,ca_cert,public_cert = print_certs(details,region,outdir)
260+
cert_name,ca_cert,public_cert = print_certs(details,region,outdir,service_dir)
261261

262262
cert_ct = cert_ct + 1
263263
if (cert_ct == 1):
@@ -295,7 +295,7 @@ def print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, lbr_c
295295
for cert, cert_details in certs.items():
296296
if i == j:
297297
#Insert values of certs and cipher till they are equal
298-
cert_name, ca_cert, public_cert = print_certs(cert_details, region, outdir)
298+
cert_name, ca_cert, public_cert = print_certs(cert_details, region, outdir,service_dir)
299299

300300
if i != 0:
301301
insert_values(values_for_column_lhc, oci_objs, sheet_dict_lhc, '','','',
@@ -320,7 +320,7 @@ def print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, lbr_c
320320
else:
321321
for cert, cert_details in certs.items():
322322
# Fetch Cert values
323-
cert_name, ca_cert, public_cert = print_certs(cert_details, region, outdir)
323+
cert_name, ca_cert, public_cert = print_certs(cert_details, region, outdir,service_dir)
324324
j = 0
325325
for cipher, cipher_details in ciphers.items():
326326
cipher_suites = ''
@@ -363,7 +363,7 @@ def print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, lbr_c
363363
j = 0
364364
for cert, cert_details in certs.items():
365365
if i == j:
366-
cert_name, ca_cert, public_cert = print_certs(cert_details, region, outdir)
366+
cert_name, ca_cert, public_cert = print_certs(cert_details, region, outdir,service_dir)
367367
if i != 0:
368368
insert_values(values_for_column_lhc, oci_objs, sheet_dict_lhc, '','','','',
369369
'', '', '', '',
@@ -878,7 +878,7 @@ def export_lbr(inputfile, _outdir, service_dir, export_compartments, export_regi
878878
LBRs = oci.pagination.list_call_get_all_results(lbr.list_load_balancers,compartment_id=ct.ntk_compartment_ids[compartment_name],
879879
lifecycle_state="ACTIVE")
880880
network = oci.core.VirtualNetworkClient(config, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY)
881-
values_for_column_lhc = print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, compartment_name, network)
881+
values_for_column_lhc = print_lbr_hostname_certs(region, ct, values_for_column_lhc, lbr, LBRs, compartment_name, network,service_dir)
882882
values_for_column_lis = print_listener(region, ct, values_for_column_lis,LBRs,compartment_name)
883883
values_for_column_bss = print_backendset_backendserver(region, ct, values_for_column_bss, lbr,LBRs,compartment_name)
884884
values_for_column_rule = print_rule(region, ct, values_for_column_rule, LBRs, compartment_name)

cd3_automation_toolkit/Release-Notes

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ CD3 Automation Toolkit Tag v10.1
354354
Non-Greenfield workflow.
355355
3. Upgrade Service Connectors to support Monitoring as Source/Target and Functions as Target.
356356
4. Added Functionality for export of ADBs.
357-
5. Terraform code update to make Null values as optional in tfvars for all components.
358-
6. Performance tuning has been done wrt Fetch Compartments during Non-Greenfield workflow.The script will be exceuted
357+
5. Python code re do for creation of NSGs - Supports duplicate NSG names across different regions.
358+
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
359360
only once when you select multiple export options simultaneously.
360-
7. Bug fixes wrt Networking, Excel sheet templates etc
361+
8. Bug fixes wrt Networking, Tagging, Excel sheet templates etc

cd3_automation_toolkit/Storage/BlockVolume/export_blockvolumes_nonGreenField.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def export_blockvolumes(inputfile, _outdir, service_dir, _config, ct, export_com
212212

213213
# writing data
214214
for reg in export_regions:
215-
script_file = f'{outdir}/{reg}/' + file_name
215+
script_file = f'{outdir}/{reg}/{service_dir}/' + file_name
216216
with open(script_file, 'a') as importCommands[reg]:
217217
importCommands[reg].write('\n\nterraform plan\n')
218218

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)