|
22 | 22 |
|
23 | 23 |
|
24 | 24 | class ShowOCIOutput(object): |
25 | | - version = "25.05.06" |
| 25 | + version = "25.07.15" |
26 | 26 |
|
27 | 27 | ########################################################################## |
28 | 28 | # spaces for align |
@@ -2183,6 +2183,31 @@ def __print_streams_queues_main(self, sq): |
2183 | 2183 | except Exception as e: |
2184 | 2184 | self.__print_error("__print_streams_queues_main", e) |
2185 | 2185 |
|
| 2186 | + ########################################################################## |
| 2187 | + # FSDR |
| 2188 | + ########################################################################## |
| 2189 | + def __print_fsdr(self, drs): |
| 2190 | + |
| 2191 | + try: |
| 2192 | + if not drs: |
| 2193 | + return |
| 2194 | + |
| 2195 | + self.print_header("Full Stack Disaster Recovery (FSDR)", 2) |
| 2196 | + |
| 2197 | + for dr in drs: |
| 2198 | + print(self.taba + dr['display_name'] + " (" + dr['role'] + ":" + dr['lifecycle_state'] + "), Created: " + dr['time_created']) |
| 2199 | + print(self.tabs + "Peer Region : " + dr['peer_region']) |
| 2200 | + if dr['lifecycle_sub_state']: |
| 2201 | + print(self.tabs + "Sub State : " + dr['lifecycle_sub_state']) |
| 2202 | + if dr['log_location']: |
| 2203 | + print(self.tabs + "Log Location : " + dr['log_location']) |
| 2204 | + for member in dr['members']: |
| 2205 | + print(self.tabs + "member : " + member['member_id'] + " - " + member['member_type']) |
| 2206 | + print("") |
| 2207 | + |
| 2208 | + except Exception as e: |
| 2209 | + self.__print_error("__print_fsdr", e) |
| 2210 | + |
2186 | 2211 | ########################################################################## |
2187 | 2212 | # Functions |
2188 | 2213 | ########################################################################## |
@@ -3276,6 +3301,8 @@ def __print_region_data(self, region_name, data): |
3276 | 3301 | self.__print_container_main(cdata['containers']) |
3277 | 3302 | if 'streams_queues' in cdata: |
3278 | 3303 | self.__print_streams_queues_main(cdata['streams_queues']) |
| 3304 | + if 'fsdr' in cdata: |
| 3305 | + self.__print_fsdr(cdata['fsdr']) |
3279 | 3306 | if 'monitoring' in cdata: |
3280 | 3307 | self.__print_monitoring_main(cdata['monitoring']) |
3281 | 3308 | if 'notifications' in cdata: |
@@ -4475,6 +4502,7 @@ class ShowOCICSV(object): |
4475 | 4502 | csv_db_mysql = [] |
4476 | 4503 | csv_db_mysql_backups = [] |
4477 | 4504 | csv_db_postgresql = [] |
| 4505 | + csv_fsdr = [] |
4478 | 4506 | csv_db_postgresql_backups = [] |
4479 | 4507 | csv_network_drg = [] |
4480 | 4508 | csv_network_drg_ipsec_tunnels = [] |
@@ -4699,6 +4727,7 @@ def generate_csv(self, data, csv_file_header, tenancy, add_date_field=True, csv_ |
4699 | 4727 | self.__export_to_csv_file("load_balancer_listeners", self.csv_load_balancer_listeners) |
4700 | 4728 | self.__export_to_csv_file("load_balancer_backendset", self.csv_load_balancer_bs) |
4701 | 4729 | self.__export_to_csv_file("file_storage", self.csv_file_storage) |
| 4730 | + self.__export_to_csv_file("fsdr", self.csv_fsdr) |
4702 | 4731 | self.__export_to_csv_file("api_gateways", self.csv_apigw) |
4703 | 4732 | self.__export_to_csv_file("limits", self.csv_limits) |
4704 | 4733 | self.__export_to_csv_file("quotas", self.csv_quotas) |
@@ -6429,6 +6458,8 @@ def __csv_core_network_vcn_security_groups(self, region_name, nsg, vcn): |
6429 | 6458 | 'security_alert': "FALSE", |
6430 | 6459 | 'description': '', |
6431 | 6460 | 'time_created': sl['time_created'], |
| 6461 | + 'freeform_tags': '', |
| 6462 | + 'defined_tags': '', |
6432 | 6463 | 'vcn_id': vcn['id'], |
6433 | 6464 | 'sec_id': sl['id'], |
6434 | 6465 | 'id': sl['id'] + ":Empty", |
@@ -6471,6 +6502,8 @@ def __csv_core_network_vcn_security_groups(self, region_name, nsg, vcn): |
6471 | 6502 | 'security_alert': slr['security_alert'], |
6472 | 6503 | 'sec_time_created': slr['time_created'], |
6473 | 6504 | 'time_created': sl['time_created'], |
| 6505 | + 'freeform_tags': self.__get_freeform_tags(sl['freeform_tags']), |
| 6506 | + 'defined_tags': self.__get_defined_tags(sl['defined_tags']), |
6474 | 6507 | 'vcn_id': vcn['id'], |
6475 | 6508 | 'sec_id': sl['id'], |
6476 | 6509 | 'id': sl['id'] + ":" + slr['id'], |
@@ -9946,6 +9979,45 @@ def __csv_edge_healthcheck(self, region_name, healthchecks): |
9946 | 9979 | except Exception as e: |
9947 | 9980 | self.__print_error("__csv_edge_healthcheck", e) |
9948 | 9981 |
|
| 9982 | + ########################################################################## |
| 9983 | + # FSDR |
| 9984 | + ########################################################################## |
| 9985 | + def __csv_fsdr(self, region_name, fsdrs): |
| 9986 | + try: |
| 9987 | + |
| 9988 | + if len(fsdrs) == 0: |
| 9989 | + return |
| 9990 | + |
| 9991 | + if fsdrs: |
| 9992 | + for ar in fsdrs: |
| 9993 | + |
| 9994 | + data = { |
| 9995 | + 'region_name': region_name, |
| 9996 | + 'compartment_name': ar['compartment_name'], |
| 9997 | + 'compartment_path': ar['compartment_path'], |
| 9998 | + 'name': ar['display_name'], |
| 9999 | + 'role': ar['role'], |
| 10000 | + 'peer_id': ar['peer_id'], |
| 10001 | + 'peer_region': ar['peer_region'], |
| 10002 | + 'time_created': ar['time_created'][0:16], |
| 10003 | + 'time_updated': ar['time_updated'][0:16], |
| 10004 | + 'lifecycle_state': ar['lifecycle_state'], |
| 10005 | + 'life_cycle_details': ar['life_cycle_details'], |
| 10006 | + 'lifecycle_sub_state': ar['lifecycle_sub_state'], |
| 10007 | + 'log_location': ar['log_location'], |
| 10008 | + 'members': self.__csv_list_to_str(ar['members'], 'member_id'), |
| 10009 | + 'members_raw': self.__csv_list_to_str(ar['members'], 'raw_data'), |
| 10010 | + 'freeform_tags': self.__get_freeform_tags(ar['freeform_tags']), |
| 10011 | + 'defined_tags': self.__get_defined_tags(ar['defined_tags']), |
| 10012 | + 'id': ar['id'] |
| 10013 | + } |
| 10014 | + |
| 10015 | + self.csv_fsdr.append(data) |
| 10016 | + self.__csv_add_service(data, "FSDR") |
| 10017 | + |
| 10018 | + except Exception as e: |
| 10019 | + self.__print_error("__csv_paas_oic", e) |
| 10020 | + |
9949 | 10021 | ########################################################################## |
9950 | 10022 | # Paas OIC |
9951 | 10023 | ########################################################################## |
@@ -11168,6 +11240,8 @@ def __csv_region_data(self, region_name, data): |
11168 | 11240 | self.__csv_announcements_detailed(region_name, cdata['announcement_detailed']) |
11169 | 11241 | if 'functions' in cdata: |
11170 | 11242 | self.__csv_functions(region_name, cdata['functions']) |
| 11243 | + if 'fsdr' in cdata: |
| 11244 | + self.__csv_fsdr(region_name, cdata['fsdr']) |
11171 | 11245 |
|
11172 | 11246 | except Exception as e: |
11173 | 11247 | self.__print_error("__csv_region_data", e) |
|
0 commit comments