diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c44a0f948e..dd777637b9 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_.
====================
+2.97.0 - 2023-04-04
+====================
+
+Added
+-----
+* Support for pre-emptible worker nodes in the Container Engine for Kubernetes service
+* Support for larger data storage (now up to 128TB) in the MySQL Database service
+* Support for HTTP health checks for HTTPS backend sets in the Load Balancer service
+
+Breaking
+--------
+* The property `backend_set_name` was made required in the `ForwardToBackendSet` model in the Load Balancer service
2.96.1 - 2023-03-28
====================
diff --git a/docs/api/container_engine.rst b/docs/api/container_engine.rst
index cbe8e1a955..50979df7d1 100644
--- a/docs/api/container_engine.rst
+++ b/docs/api/container_engine.rst
@@ -75,11 +75,14 @@ Container Engine
oci.container_engine.models.PodConfiguration
oci.container_engine.models.PodShape
oci.container_engine.models.PodShapeSummary
+ oci.container_engine.models.PreemptibleNodeConfigDetails
+ oci.container_engine.models.PreemptionAction
oci.container_engine.models.ServiceLbConfigDetails
oci.container_engine.models.ShapeMemoryOptions
oci.container_engine.models.ShapeNetworkBandwidthOptions
oci.container_engine.models.ShapeOcpuOptions
oci.container_engine.models.Taint
+ oci.container_engine.models.TerminatePreemptionAction
oci.container_engine.models.UpdateAddonDetails
oci.container_engine.models.UpdateClusterDetails
oci.container_engine.models.UpdateClusterEndpointConfigDetails
diff --git a/docs/api/container_engine/models/oci.container_engine.models.PreemptibleNodeConfigDetails.rst b/docs/api/container_engine/models/oci.container_engine.models.PreemptibleNodeConfigDetails.rst
new file mode 100644
index 0000000000..89483511a4
--- /dev/null
+++ b/docs/api/container_engine/models/oci.container_engine.models.PreemptibleNodeConfigDetails.rst
@@ -0,0 +1,11 @@
+PreemptibleNodeConfigDetails
+============================
+
+.. currentmodule:: oci.container_engine.models
+
+.. autoclass:: PreemptibleNodeConfigDetails
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/container_engine/models/oci.container_engine.models.PreemptionAction.rst b/docs/api/container_engine/models/oci.container_engine.models.PreemptionAction.rst
new file mode 100644
index 0000000000..4d53ca9c89
--- /dev/null
+++ b/docs/api/container_engine/models/oci.container_engine.models.PreemptionAction.rst
@@ -0,0 +1,11 @@
+PreemptionAction
+================
+
+.. currentmodule:: oci.container_engine.models
+
+.. autoclass:: PreemptionAction
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/docs/api/container_engine/models/oci.container_engine.models.TerminatePreemptionAction.rst b/docs/api/container_engine/models/oci.container_engine.models.TerminatePreemptionAction.rst
new file mode 100644
index 0000000000..d46e62e552
--- /dev/null
+++ b/docs/api/container_engine/models/oci.container_engine.models.TerminatePreemptionAction.rst
@@ -0,0 +1,11 @@
+TerminatePreemptionAction
+=========================
+
+.. currentmodule:: oci.container_engine.models
+
+.. autoclass:: TerminatePreemptionAction
+ :show-inheritance:
+ :special-members: __init__
+ :members:
+ :undoc-members:
+ :inherited-members:
\ No newline at end of file
diff --git a/examples/showoci/CHANGELOG.rst b/examples/showoci/CHANGELOG.rst
index 06a9958f02..6d4dfbf034 100644
--- a/examples/showoci/CHANGELOG.rst
+++ b/examples/showoci/CHANGELOG.rst
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_.
+=====================
+23.03.28 - 23.03.28
+=====================
+* Added OCI_RESOURCES table to showoci2adw to load all relevants OCIDs
+* Added Identity to summary
+* Added Goldengate deployment to CSV and ADW
+* Added NoSQL to CSV and ADW
+* Added Network Firewall + Policies
+* Added more mysql info + added to CSV
+* Added Cloud Guard Recipes
+* Added option to filter by region - comma seperated
+* Added option to filter "Not" by region with -rgn
+* Added Open Search Clusters
+
=====================
23.03.21 - 23.03.21
=====================
diff --git a/examples/showoci/README.md b/examples/showoci/README.md
index f052b5538b..e1fa227b83 100644
--- a/examples/showoci/README.md
+++ b/examples/showoci/README.md
@@ -93,6 +93,8 @@ and [usage reports](https://docs.oracle.com/en-us/iaas/Content/Billing/Concepts/
- oci.data_integration.DataIntegrationClient
- oci.queue.QueueAdminClient
- oci.identity_domains.IdentityDomainsClient
+- oci.network_firewall.NetworkFirewallClient
+- oci.opensearch.OpensearchClusterClient
## 2. Executing using Cloud Shell
@@ -271,12 +273,12 @@ $ python3 showoci.py
usage: showoci.py [-h] [-a] [-ani] [-an] [-api] [-b] [-c] [-cn] [-d] [-e] [-edge] [-f] [-fun] [-i] [-ic] [-isc] [-l] [-lq] [-m]
[-n] [-o] [-paas] [-dataai] [-rm] [-s] [-sec] [-nobackups] [-skipdbhomes] [-readtimeout READTIMEOUT]
- [-conntimeout CONNTIMEOUT] [-so] [-mc] [-nr] [-ip] [-is] [-dt] [-t PROFILE] [-p PROXY] [-rg REGION]
- [-cp COMPART] [-cpr COMPART_RECUR] [-cpath COMPARTPATH] [-tenantid TENANTID] [-cf CONFIG] [-csv CSV]
- [-csvcol CSVCOL] [-csv_nodate] [-csv_notagstocols] [-jf JOUTFILE] [-js] [-sjf SJOUTFILE] [-cachef SERVICEFILE]
- [-caches] [--version]
+ [-conntimeout CONNTIMEOUT] [-so] [-mc] [-nr] [-ip] [-is] [-dt] [-t PROFILE] [-p PROXY] [-pause] [-rg REGION]
+ [-rgn NOT_REGION] [-cp COMPART] [-cpr COMPART_RECUR] [-cpath COMPARTPATH] [-tenantid TENANTID] [-cf CONFIG]
+ [-csv CSV] [-csvcol CSVCOL] [-csv_nodate] [-csv_notagstocols] [-jf JOUTFILE] [-js] [-sjf SJOUTFILE]
+ [-cachef SERVICEFILE] [-caches] [--version]
-options:
+optional arguments:
-h, --help show this help message and exit
-a Print All Resources
-ani Print All Resources but identity
@@ -315,7 +317,9 @@ options:
-dt Use Delegation Token (Cloud shell)
-t PROFILE Config file section to use (tenancy profile)
-p PROXY Set Proxy (i.e. www-proxy-server.com:80)
- -rg REGION Filter by Region
+ -pause Pause before Processing
+ -rg REGION Filter by Region, partial name or comma seperated
+ -rgn NOT_REGION Filter by Region, do not include region partial name or comma seperated
-cp COMPART Filter by Compartment Name or OCID
-cpr COMPART_RECUR Filter by Comp Name Recursive
-cpath COMPARTPATH Filter by Compartment path ,(i.e. -cpath "Adi / Sub"
diff --git a/examples/showoci/showoci.py b/examples/showoci/showoci.py
index d714e2b279..d71b51593e 100644
--- a/examples/showoci/showoci.py
+++ b/examples/showoci/showoci.py
@@ -70,24 +70,39 @@
# - oci.data_connectivity.models.RegistrySummary
# - oci.queue.QueueAdminClient
# - oci.identity_domains.IdentityDomainsClient
+# - oci.network_firewall.NetworkFirewallClient
+# - oci.opensearch.OpensearchClusterClient
+#
+# Modules without CSV yet:
+# - datasciencemodeldeployment
+# - datasciencenotebooksession
#
# Modules Not Yet Covered:
-# - oci.blockchain.BlockchainPlatformClient
-# - oci.data_safe.DataSafeClient
-# - oci.usage_api.UsageapiClient
-# - oci.sch.ServiceConnectorClient
-# - oci.os_management.OsManagementClient
-# - oci.log_analytics.LogAnalyticsClient
-# - oci.tenant_manager_control_plane.LinkClient
# - oci.ai_anomaly_detection.AnomalyDetectionClient
+# - oci.ai_document.AIServiceDocumentClient
# - oci.ai_language.AIServiceLanguageClient
+# - oci.ai_speech.AIServiceSpeechClient
# - oci.ai_vision.AIServiceVisionClient
-# - oci.apm_control_plane.ApmDomainClient
-# - oci.certificates.CertificatesClient
+# - oci.apm_config.ConfigClient
+# - oci.apm_synthetics.ApmSyntheticClient
+# - oci.application_migration.ApplicationMigrationClient
+# - oci.artifacts.ArtifactsClient
+# - oci.certificates_management.CertificatesManagementClient
+# - oci.cloud_migrations.MigrationClient
+# - oci.container_instances.ContainerInstanceClient
# - oci.data_labeling_service.DataLabelingManagementClient
-# - oci.data_safe.DataSafeClient
-# - oci.devops.DevopsClient
+# - oci.disaster_recovery.DisasterRecoveryClient
+# - oci.fusion_apps.FusionApplicationsClient
# - oci.jms.JavaManagementServiceClient
+# - oci.license_manager.LicenseManagerClient
+# - oci.lockbox.LockboxClient
+# - oci.media_services.MediaServicesClient
+# - oci.opa.OpaInstanceClient
+# - oci.opsi.OperationsInsightsClient
+# - oci.optimizer.OptimizerClient
+# - oci.recovery.DatabaseRecoveryClient
+# - oci.service_mesh.ServiceMeshClient
+# - oci.threat_intelligence.ThreatintelClient
##########################################################################
from __future__ import print_function
from showoci_data import ShowOCIData
@@ -101,7 +116,7 @@
import contextlib
import os
-version = "23.03.21"
+version = "23.03.28"
##########################################################################
# check OCI version
@@ -339,7 +354,8 @@ def set_parser_arguments(argsList=[]):
parser.add_argument('-t', default="", dest='profile', help='Config file section to use (tenancy profile)')
parser.add_argument('-p', default="", dest='proxy', help='Set Proxy (i.e. www-proxy-server.com:80) ')
parser.add_argument('-pause', action='store_true', default=False, dest='pause', help='Pause before Processing')
- parser.add_argument('-rg', default="", dest='region', help='Filter by Region')
+ parser.add_argument('-rg', default="", dest='region', help='Filter by Region, partial name or comma seperated')
+ parser.add_argument('-rgn', default="", dest='not_region', help='Filter by Region, do not include region partial name or comma seperated')
parser.add_argument('-cp', default="", dest='compart', help='Filter by Compartment Name or OCID')
parser.add_argument('-cpr', default="", dest='compart_recur', help='Filter by Comp Name Recursive')
parser.add_argument('-cpath', default="", dest='compartpath', help='Filter by Compartment path ,(i.e. -cpath "Adi / Sub"')
@@ -494,6 +510,9 @@ def set_service_extract_flags(cmd):
if cmd.region:
prm.filter_by_region = str(cmd.region)
+ if cmd.not_region:
+ prm.filter_by_region_not = str(cmd.not_region)
+
if cmd.compart:
prm.filter_by_compartment = str(cmd.compart)
diff --git a/examples/showoci/showoci_csv2adw.py b/examples/showoci/showoci_csv2adw.py
index 8f0da14dee..c28538ab7d 100644
--- a/examples/showoci/showoci_csv2adw.py
+++ b/examples/showoci/showoci_csv2adw.py
@@ -31,6 +31,9 @@
# - OCI_SHOWOCI_DATABASES
# - OCI_SHOWOCI_DATABASE_VM_BM
# - OCI_SHOWOCI_DATABASES_ADB
+# - OCI_SHOWOCI_DB_NOSQL
+# - OCI_SHOWOCI_DB_MYSQL
+# - OCI_SHOWOCI_DB_GOLDENGATE_DEP
# - OCI_SHOWOCI_FILE_STORAGE
# - OCI_SHOWOCI_OBJECT_STORAGE
# - OCI_SHOWOCI_LB_LISTENERS
@@ -53,6 +56,7 @@
# - OCI_SHOWOCI_NETWORK_ROUTES
# - OCI_SHOWOCI_NETWORK_DRG_VC
# - OCI_SHOWOCI_NETWORK_DRG_IPSEC
+# - OCI_SHOWOCI_NETWORK_FIREWALL
# - OCI_SHOWOCI_DIGITAL_ASSISTANCE
# - OCI_SHOWOCI_BIG_DATA
# - OCI_SHOWOCI_DATA_FLOW
@@ -76,9 +80,18 @@
# - OCI_SHOWOCI_MONITOR_DB_MANAGEMENT
# - OCI_SHOWOCI_MONITOR_ALARMS
# - OCI_SHOWOCI_MONITOR_NOTIFICATIONS
+# - OCI_SHOWOCI_OPEN_SEARCH
+#
+##########################################################################
+# TO DO APEX
+##########################################################################
+# OCI_SHOWOCI_OPEN_SEARCH
+# OCI_SHOWOCI_SECURITY_CLOUDGUARD
+#
##########################################################################
# TO DO
##########################################################################
+#
# paas_ocvs_vmware
# edge_waas_policies
# identity_compartments
@@ -100,7 +113,7 @@
import time
import os
-version = "23.03.14"
+version = "23.03.28"
cmd = None
file_num = 0
@@ -224,7 +237,7 @@ def handle_compute(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "instance_id", "server_name")
except Exception as e:
raise Exception("\nError at procedure: handle_compute - " + str(e))
@@ -258,7 +271,7 @@ def handle_block_volume(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "display_name")
except Exception as e:
raise Exception("\nError at procedure: handle_block_storage - " + str(e))
@@ -291,7 +304,7 @@ def handle_block_volume_backups(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "source_name", "backup Source ")
except Exception as e:
raise Exception("\nError at procedure: handle_block_volume_backups - " + str(e))
@@ -348,7 +361,7 @@ def handle_database_all(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database_all - " + str(e))
@@ -438,7 +451,7 @@ def handle_database_exa_cs_vms(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database_exa_cs_vms - " + str(e))
@@ -497,7 +510,7 @@ def handle_database_exa_infra(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database_exa_infra - " + str(e))
@@ -554,7 +567,7 @@ def handle_database_exa_cc_vms(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database_exa_cs_vms - " + str(e))
@@ -609,7 +622,7 @@ def handle_database(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database - " + str(e))
@@ -663,7 +676,7 @@ def handle_database_vm_bm(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database_vm_bm - " + str(e))
@@ -724,11 +737,150 @@ def handle_database_autonomous(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_database_autonomous - " + str(e))
+##########################################################################
+# Check Table Structure for handle_database_goldengate_deployments
+##########################################################################
+def handle_database_goldengate_deployments(connection):
+ try:
+
+ json = {
+ 'table_name': "OCI_SHOWOCI_DB_GOLDENGATE_DEP",
+ 'csv_file': "database_goldengate_deployments.csv",
+ 'items': [
+ {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
+ {'col': 'region_name ', 'csv': ' ', 'type': 'varchar2(100) ', 'pk': 'n'},
+ {'col': 'compartment_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'compartment_path ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'name ', 'csv': 'display_name', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'license_model ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'fqdn ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'cpu_core_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'is_auto_scaling_enabled ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'is_public ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'public_ip_address ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'private_ip_address ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'deployment_url ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'is_latest_version ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'deployment_type ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'freeform_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'defined_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
+ ]
+ }
+ handle_table(connection, json, "id", "name")
+ except Exception as e:
+ raise Exception("\nError at procedure: handle_database_goldengate_deployments - " + str(e))
+
+
+##########################################################################
+# Check Table Structure for handle_database_mysql
+##########################################################################
+def handle_database_mysql(connection):
+ try:
+
+ json = {
+ 'table_name': "OCI_SHOWOCI_DB_MYSQL",
+ 'csv_file': "database_mysql.csv",
+ 'items': [
+ {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
+ {'col': 'region_name ', 'csv': ' ', 'type': 'varchar2(100) ', 'pk': 'n'},
+ {'col': 'compartment_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'compartment_path ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'name ', 'csv': 'display_name', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'description ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'is_highly_available ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'current_placement ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'is_analytics_cluster_attached', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'analytics_cluster ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'is_heat_wave_cluster_attached', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'heat_wave_cluster ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'availability_domain ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'fault_domain ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'endpoints ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'endpoints_text ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'mysql_version ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'deletion_policy ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'shape_name ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'shape_ocpu ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'shape_memory_gb ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'crash_recovery ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'backup_is_enabled ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'subnet_id ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'subnet_name ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'configuration_id ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'source ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'hostname_label ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'ip_address ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'port ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'port_x ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'channels ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'maintenance ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_earliest_recovery_point ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_latest_recovery_point ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'data_storage_size_in_gbs ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'freeform_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'defined_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
+ ]
+ }
+ handle_table(connection, json, "id", "name")
+ except Exception as e:
+ raise Exception("\nError at procedure: handle_database_mysql - " + str(e))
+
+
+##########################################################################
+# Check Table Structure for handle_database_nosql
+##########################################################################
+def handle_database_nosql(connection):
+ try:
+
+ json = {
+ 'table_name': "OCI_SHOWOCI_DB_NOSQL",
+ 'csv_file': "database_nosql.csv",
+ 'items': [
+ {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
+ {'col': 'region_name ', 'csv': ' ', 'type': 'varchar2(100) ', 'pk': 'n'},
+ {'col': 'compartment_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'compartment_path ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'is_auto_reclaimable ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'capacity_mode ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'max_read_units ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'max_write_units ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'max_storage_in_g_bs ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'freeform_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'defined_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_of_expiration ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
+ ]
+ }
+ handle_table(connection, json, "id", "name")
+ except Exception as e:
+ raise Exception("\nError at procedure: handle_database_nosql - " + str(e))
+
+
##########################################################################
# Check Table Structure for File Storage
##########################################################################
@@ -757,7 +909,7 @@ def handle_file_storage(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "display_name")
except Exception as e:
raise Exception("\nError at procedure: handle_file_storage - " + str(e))
@@ -799,7 +951,7 @@ def handle_object_storage(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "bucket_name")
except Exception as e:
raise Exception("\nError at procedure: handle_object_storage - " + str(e))
@@ -844,7 +996,7 @@ def handle_load_balancer_listeners(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_load_balancer_listeners - " + str(e))
@@ -922,7 +1074,7 @@ def handle_paas_oac(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_paas_oac - " + str(e))
@@ -959,7 +1111,7 @@ def handle_paas_oic(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_paas_oic - " + str(e))
@@ -994,7 +1146,7 @@ def handle_paas_oce(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_paas_oce - " + str(e))
@@ -1030,7 +1182,7 @@ def handle_paas_visual_builder(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_paas_visual_builder - " + str(e))
@@ -1063,7 +1215,7 @@ def handle_paas_devops(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_paas_devops - " + str(e))
@@ -1117,7 +1269,7 @@ def handle_containers(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_paas_visual_builder - " + str(e))
@@ -1159,7 +1311,7 @@ def handle_containers_nodepools(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "node_name")
except Exception as e:
raise Exception("\nError at procedure: handle_containers_nodepools - " + str(e))
@@ -1209,7 +1361,7 @@ def handle_apigw(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "api_id", "gw_name")
except Exception as e:
raise Exception("\nError at procedure: handle_apigw - " + str(e))
@@ -1245,7 +1397,7 @@ def handle_network_vcn(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_network_vcn - " + str(e))
@@ -1292,7 +1444,7 @@ def handle_network_subnet(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "subnet_name")
except Exception as e:
raise Exception("\nError at procedure: handle_network_subnet - " + str(e))
@@ -1336,7 +1488,7 @@ def handle_network_subnet_private_ips(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "ip_address")
except Exception as e:
raise Exception("\nError at procedure: handle_network_subnet_private_ips - " + str(e))
@@ -1442,11 +1594,48 @@ def handle_network_drg(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_network_drg - " + str(e))
+##########################################################################
+# Check Table Structure for handle_network_firewall
+##########################################################################
+def handle_network_firewall(connection):
+ try:
+
+ json = {
+ 'table_name': "OCI_SHOWOCI_NETWORK_FIREWALL",
+ 'csv_file': "network_firewalls.csv",
+ 'items': [
+ {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
+ {'col': 'region_name ', 'csv': ' ', 'type': 'varchar2(100) ', 'pk': 'n'},
+ {'col': 'compartment_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'compartment_path ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'availability_domain ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'ipv4_address ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'ipv6_address ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'network_firewall_policy_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'network_firewall_policy_name', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'freeform_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'defined_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
+ ]
+ }
+ handle_table(connection, json, "id", "name")
+ except Exception as e:
+ raise Exception("\nError at procedure: handle_network_firewall - " + str(e))
+
+
##########################################################################
# Check Table Structure for handle_network_dhcp_options
##########################################################################
@@ -1566,7 +1755,7 @@ def handle_network_drg_virtual_circuit(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_network_drg_virtual_circuit - " + str(e))
@@ -1607,7 +1796,7 @@ def handle_network_drg_ipsec(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "tunnel_name")
except Exception as e:
raise Exception("\nError at procedure: handle_network_drg_ipsec - " + str(e))
@@ -1642,7 +1831,7 @@ def handle_data_digital_assistance(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_ai_oda - " + str(e))
@@ -1677,7 +1866,7 @@ def handle_big_data_service(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_ai_bds - " + str(e))
@@ -1711,7 +1900,7 @@ def handle_data_flow(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_flow - " + str(e))
@@ -1742,7 +1931,7 @@ def handle_data_catalog(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_catalog - " + str(e))
@@ -1774,7 +1963,7 @@ def handle_data_conn_registry(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_conn_registry - " + str(e))
@@ -1804,7 +1993,7 @@ def handle_data_science(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_science - " + str(e))
@@ -1833,7 +2022,7 @@ def handle_data_integration(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_data_integration - " + str(e))
@@ -1870,7 +2059,7 @@ def handle_streams_queues(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_streams_queues - " + str(e))
@@ -1901,7 +2090,7 @@ def handle_edge_web_application_firewall(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_edge_web_application_firewall - " + str(e))
@@ -1942,7 +2131,7 @@ def handle_edge_healthchecks(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_edge_healthchecks - " + str(e))
@@ -1974,7 +2163,7 @@ def handle_edge_dns_steering_policies(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_edge_dns_steering_policies - " + str(e))
@@ -2004,7 +2193,7 @@ def handle_identity_compartments(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_identity_compartments - " + str(e))
@@ -2039,7 +2228,7 @@ def handle_security_bastions(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_security_bastions - " + str(e))
@@ -2054,24 +2243,96 @@ def handle_security_cloud_guard(connection):
'table_name': "OCI_SHOWOCI_SECURITY_CLOUDGUARD",
'csv_file': "security_cloud_guards.csv",
'items': [
- {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
- {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
- {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
- {'col': 'name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
- {'col': 'target_resource_type ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
- {'col': 'target_resource_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
- {'col': 'recipe_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
- {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
- {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
- {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
- {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
+ {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
+ {'col': 'region_name ', 'csv': ' ', 'type': 'varchar2(100) ', 'pk': 'n'},
+ {'col': 'compartment_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'compartment_path ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'target_resource_type ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'target_resource_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'target_resource_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'inherited_by_compartments ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'inherited_by_compartments_names ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'target_detector_recipes ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'target_responder_recipes ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'target_detector_rules ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'target_responder_rules ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'recipe_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'freeform_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'defined_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_security_cloud_guard - " + str(e))
+##########################################################################
+# Check Table Structure for handle_paas_open_search
+##########################################################################
+def handle_paas_open_search(connection):
+ try:
+
+ json = {
+ 'table_name': "OCI_SHOWOCI_OPEN_SEARCH",
+ 'csv_file': "paas_opensearch.csv",
+ 'items': [
+ {'col': 'tenant_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'tenant_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'y'},
+ {'col': 'region_name ', 'csv': ' ', 'type': 'varchar2(100) ', 'pk': 'n'},
+ {'col': 'compartment_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'compartment_path ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'name ', 'csv': 'display_name ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'software_version ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'total_storage_gb ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'security_mode ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'availability_domains ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'opensearch_fqdn ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'opensearch_private_ip ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'opendashboard_fqdn ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'opendashboard_private_ip ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'master_node_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'master_node_host_type ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'master_node_host_bare_metal_shape ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'master_node_host_ocpu_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'master_node_host_memory_gb ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'data_node_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'data_node_host_type ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'data_node_host_bare_metal_shape ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'data_node_host_ocpu_count ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'data_node_host_memory_gb ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'data_node_storage_gb ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'opendashboard_node_count ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'opendashboard_node_host_ocpu_count', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'opendashboard_node_host_memory_gb ', 'csv': ' ', 'type': 'number ', 'pk': 'n'},
+ {'col': 'vcn_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'vcn_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'vcn_compartment_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'subnet_compartment_id ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'security_master_user_name ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'security_master_user_password_hash', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'lifecycle_state ', 'csv': ' ', 'type': 'varchar2(1000)', 'pk': 'n'},
+ {'col': 'freeform_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'defined_tags ', 'csv': ' ', 'type': 'varchar2(4000)', 'pk': 'n'},
+ {'col': 'time_updated ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'time_created ', 'csv': ' ', 'type': 'date ', 'pk': 'n'},
+ {'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
+ ]
+ }
+ handle_table(connection, json, "id", "name")
+ except Exception as e:
+ raise Exception("\nError at procedure: handle_paas_open_search - " + str(e))
+
+
##########################################################################
# Check Table Structure for handle_security_kms_vaults
##########################################################################
@@ -2102,7 +2363,7 @@ def handle_security_kms_vaults(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_security_kms_vaults - " + str(e))
@@ -2146,7 +2407,7 @@ def handle_security_logging(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "log_name")
except Exception as e:
raise Exception("\nError at procedure: handle_security_logging - " + str(e))
@@ -2382,7 +2643,7 @@ def handle_monitor_db_management(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_monitor_db_management - " + str(e))
@@ -2417,7 +2678,7 @@ def handle_compute_reservations(connection):
{'col': 'extract_date ', 'csv': ' ', 'type': 'date ', 'pk': 'n'}
]
}
- handle_table(connection, json)
+ handle_table(connection, json, "id", "name")
except Exception as e:
raise Exception("\nError at procedure: handle_compute_reservations - " + str(e))
@@ -2443,7 +2704,10 @@ def handle_old_structure(connection):
with connection.cursor() as cursor:
# tables that need to drop
- for table_name in ["OCI_SHOWOCI_DATABASE_SYSTEMS", "OCI_SHOWOCI_DATABASE_SYSTEMS_TMP"]:
+ for table_name in ["OCI_SHOWOCI_DATABASE_SYSTEMS",
+ "OCI_SHOWOCI_DATABASE_SYSTEMS_TMP",
+ "OCI_SHOWOCI_SECURITY_CLOUDGUARD_TMP",
+ "OCI_SHOWOCI_SECURITY_CLOUDGUARD"]:
sql = "select count(*) from user_tables where table_name = :table_name"
cursor.execute(sql, table_name=table_name)
@@ -2462,10 +2726,51 @@ def handle_old_structure(connection):
raise Exception("\nError at Procedure: handle_table() - handle_old_structure " + str(e))
+##########################################################################
+# Check Resource Table Structure
+##########################################################################
+def check_database_table_structure_resource(connection):
+ global cmd
+ verbose = cmd.verbose
+
+ try:
+ # open cursor
+ with connection.cursor() as cursor:
+
+ # check if OCI_USAGE table exist, if not create
+ sql = "select count(*) from user_tables where table_name = 'OCI_RESOURCES'"
+ cursor.execute(sql)
+ val, = cursor.fetchone()
+
+ # if table not exist, create it
+ if val == 0:
+ if verbose:
+ print(" Table OCI_RESOURCES was not exist, creating")
+
+ sql = """create table OCI_RESOURCES (
+ RESOURCE_ID VARCHAR2(200) NOT NULL,
+ RESOURCE_NAME VARCHAR2(1000),
+ SOURCE_TENANT VARCHAR2(100),
+ SOURCE_TABLE VARCHAR2(100),
+ LAST_LOADED DATE,
+ CONSTRAINT OCI_RESOURCES_PK PRIMARY KEY (RESOURCE_ID) USING INDEX)"""
+
+ cursor.execute(sql)
+ if verbose:
+ print(" Table OCI_RESOURCES created")
+
+ except oracledb.DatabaseError as e:
+ print("\nError manipulating database at check_database_table_structure_resource() - " + str(e) + "\n")
+ raise SystemExit
+
+ except Exception as e:
+ raise Exception("\nError manipulating database at check_database_table_structure_resource() - " + str(e))
+
+
##########################################################################
# Check Table Structure for Compute
##########################################################################
-def handle_table(connection, inputdata):
+def handle_table(connection, inputdata, resource_id="", resource_name="", resource_prefix=""):
global cmd
global file_num
process_location = "Start"
@@ -2610,7 +2915,7 @@ def handle_table(connection, inputdata):
if verbose:
print(" Loading data to tmp table... Insert Completed, " + str(num_rows) + " Rows Inserted")
else:
- print(" TMP = " + str(num_rows).ljust(6), end="")
+ print(" TMP = " + str(num_rows).ljust(7), end="")
connection.commit()
@@ -2636,10 +2941,50 @@ def handle_table(connection, inputdata):
cursor.execute(sql)
connection.commit()
+
if verbose:
print("Merge Completed, " + str(cursor.rowcount) + " rows merged" + get_time_elapsed(start_time))
else:
- print(" Merged = " + str(cursor.rowcount) + " Rows.")
+ print(" Merged = " + str(cursor.rowcount).ljust(7), end="")
+
+ if resource_id:
+ ################################################
+ # Merge data from tmp to resource table
+ ################################################
+ process_location = "before Resrouce Merge"
+
+ with connection.cursor() as cursor:
+
+ if verbose:
+ print(" Merging data to ocid table... ", end="")
+
+ # run merge to oci_update_stats
+ sql = "merge into oci_resources a using "
+ sql += "(select distinct " + resource_id + " as id, '" + resource_prefix + "'||" + resource_name + " as name, "
+ sql += "'" + table_name + "' as table_name, TENANT_NAME from " + tmp_table_name + ") b "
+ sql += """on (a.resource_id = b.id)
+ when matched then update set
+ a.RESOURCE_NAME = b.NAME,
+ a.SOURCE_TABLE = b.TABLE_NAME,
+ a.SOURCE_TENANT = b.TENANT_NAME,
+ a.LAST_LOADED = SYSDATE
+ when not matched then insert
+ (RESOURCE_ID,RESOURCE_NAME,SOURCE_TABLE,SOURCE_TENANT,LAST_LOADED)
+ values
+ (b.ID,b.NAME,b.TABLE_NAME,b.TENANT_NAME,SYSDATE)"""
+
+ cursor.execute(sql)
+ connection.commit()
+
+ if verbose:
+ print("Merge Completed, " + str(cursor.rowcount) + " rows merged" + get_time_elapsed(start_time))
+ else:
+ print(" OCIDs = " + str(cursor.rowcount))
+
+ # if no resource id
+ else:
+ if not verbose:
+ print("")
except oracledb.DatabaseError as e:
print("\nDatabaseError at procedure: handle_table() - " + process_location + " - " + str(e) + "\n")
@@ -2682,8 +3027,11 @@ def main_process():
print("...Connected\n")
- # Handling CSVs
+ # Checking structure of tables
handle_old_structure(connection)
+ check_database_table_structure_resource(connection)
+
+ # Handling CSVs
handle_compute(connection)
handle_compute_reservations(connection)
handle_block_volume(connection)
@@ -2696,6 +3044,9 @@ def main_process():
handle_database_exa_infra(connection)
handle_database_autonomous(connection)
handle_database_vm_bm(connection)
+ handle_database_goldengate_deployments(connection)
+ handle_database_nosql(connection)
+ handle_database_mysql(connection)
handle_file_storage(connection)
handle_object_storage(connection)
handle_load_balancer_listeners(connection)
@@ -2705,6 +3056,7 @@ def main_process():
handle_paas_oce(connection)
handle_paas_visual_builder(connection)
handle_paas_devops(connection)
+ handle_paas_open_search(connection)
handle_containers(connection)
handle_containers_nodepools(connection)
handle_apigw(connection)
@@ -2718,6 +3070,7 @@ def main_process():
handle_network_routes(connection)
handle_network_drg_virtual_circuit(connection)
handle_network_drg_ipsec(connection)
+ handle_network_firewall(connection)
handle_data_digital_assistance(connection)
handle_big_data_service(connection)
handle_data_flow(connection)
diff --git a/examples/showoci/showoci_data.py b/examples/showoci/showoci_data.py
index f298f8f234..20a2d173e1 100644
--- a/examples/showoci/showoci_data.py
+++ b/examples/showoci/showoci_data.py
@@ -18,7 +18,7 @@
class ShowOCIData(object):
- version = "23.03.21"
+ version = "23.03.28"
############################################
# ShowOCIService - Service object to query
@@ -1041,6 +1041,32 @@ def __get_core_network_cpe(self, region_name, compartment):
self.__print_error("__get_core_network_cpe", e)
return data
+ ##########################################################################
+ # print network fw
+ ##########################################################################
+ def __get_core_network_firewall(self, region_name, compartment):
+ data = []
+ try:
+ nfw = self.service.search_multi_items(self.service.C_NETWORK, self.service.C_NETWORK_FIREWALL, 'region_name', region_name, 'compartment_id', compartment['id'])
+ return nfw
+
+ except Exception as e:
+ self.__print_error("__get_core_network_firewall", e)
+ return data
+
+ ##########################################################################
+ # print network fw policies
+ ##########################################################################
+ def __get_core_network_firewall_policies(self, region_name, compartment):
+ data = []
+ try:
+ nfw = self.service.search_multi_items(self.service.C_NETWORK, self.service.C_NETWORK_FIREWALL_POLICY, 'region_name', region_name, 'compartment_id', compartment['id'])
+ return nfw
+
+ except Exception as e:
+ self.__print_error("__get_core_network_firewall_policies", e)
+ return data
+
##########################################################################
# print network drg
##########################################################################
@@ -1392,6 +1418,14 @@ def __get_core_network_main(self, region_name, compartment):
if len(data) > 0:
return_data['virtual_circuit'] = data
+ data = self.__get_core_network_firewall(region_name, compartment)
+ if len(data) > 0:
+ return_data['network_firewall'] = data
+
+ data = self.__get_core_network_firewall_policies(region_name, compartment)
+ if len(data) > 0:
+ return_data['network_firewall_policies'] = data
+
return return_data
except Exception as e:
@@ -4057,6 +4091,11 @@ def __get_paas_native_main(self, region_name, compartment):
if devops:
paas_services['devops'] = devops
+ # opensearch
+ open_search = self.service.search_multi_items(self.service.C_PAAS_NATIVE, self.service.C_PAAS_NATIVE_OPEN_SEARCH, 'region_name', region_name, 'compartment_id', compartment['id'])
+ if open_search:
+ paas_services['open_search'] = open_search
+
return paas_services
except Exception as e:
@@ -4071,7 +4110,7 @@ def __get_security_main(self, region_name, compartment):
try:
security_services = {}
- # cloud guard
+ # cloud guard Main
cg = self.service.search_multi_items(self.service.C_SECURITY, self.service.C_SECURITY_CLOUD_GUARD, 'region_name', region_name, 'compartment_id', compartment['id'])
if cg:
security_services['cloud_guard'] = cg
diff --git a/examples/showoci/showoci_output.py b/examples/showoci/showoci_output.py
index 0b313f02e7..13c001294f 100644
--- a/examples/showoci/showoci_output.py
+++ b/examples/showoci/showoci_output.py
@@ -20,7 +20,7 @@
class ShowOCIOutput(object):
- version = "23.03.21"
+ version = "23.03.28"
##########################################################################
# spaces for align
@@ -788,6 +788,44 @@ def __print_core_network_cpe(self, cpes):
except Exception as e:
self.__print_error("__print_core_network_cpe", e)
+ ##########################################################################
+ # print network firewall
+ ##########################################################################
+ def __print_core_network_firewall(self, nfws):
+
+ try:
+
+ if len(nfws) == 0:
+ return
+
+ self.print_header("Network Firewalls", 2)
+
+ for arr in nfws:
+ print(self.taba + arr['name'] + " - " + arr['availability_domain'] + " - " + arr['ipv4_address'] + " - " + arr['lifecycle_state'])
+ print(self.tabs + "Subnet: " + arr['subnet_name'])
+ print(self.tabs + "Policy: " + arr['network_firewall_policy_name'])
+
+ except Exception as e:
+ self.__print_error("__print_core_network_firewall", e)
+
+ ##########################################################################
+ # print network firewall Policies
+ ##########################################################################
+ def __print_core_network_firewall_policies(self, nfws):
+
+ try:
+
+ if len(nfws) == 0:
+ return
+
+ self.print_header("Network Firewalls Policies", 2)
+
+ for arr in nfws:
+ print(self.taba + arr['display_name'] + " - " + arr['lifecycle_state'] + ", Is Attached: " + arr['is_firewall_attached'])
+
+ except Exception as e:
+ self.__print_error("__print_core_network_firewall_policies", e)
+
##########################################################################
# print network dns resolvers
##########################################################################
@@ -881,6 +919,10 @@ def __print_core_network_main(self, data):
self.__print_core_network_drg(data['drg'])
if 'cpe' in data:
self.__print_core_network_cpe(data['cpe'])
+ if 'network_firewall' in data:
+ self.__print_core_network_firewall(data['network_firewall'])
+ if 'network_firewall_policies' in data:
+ self.__print_core_network_firewall_policies(data['network_firewall_policies'])
if 'ipsec' in data:
self.__print_core_network_ipsec(data['ipsec'])
if 'remote_peering' in data:
@@ -2257,6 +2299,24 @@ def __print_paas_services_main(self, paas_services):
print(self.taba + val['name'] + ", Created: " + val['time_created'][0:16] + " (" + val['lifecycle_state'] + "), " + val['namespace'])
print("")
+ # Open Search
+ if 'open_search' in paas_services:
+ self.print_header("Open Search Clusters", 2)
+ for val in paas_services['open_search']:
+ print(self.taba + val['display_name'] + ", Created: " + val['time_created'][0:16] + " (" + val['lifecycle_state'] + "), " + val['software_version'])
+ if val['availability_domains']:
+ print(self.tabs + "ADs : " + val['availability_domains'])
+ if val['security_mode']:
+ print(self.tabs + "Sec : " + val['security_mode'])
+ print(self.tabs + "Search URL: " + val['opensearch_fqdn'])
+ print(self.tabs + "Dash URL : " + val['opendashboard_fqdn'])
+ print(self.tabs + "Storage : " + val['total_storage_gb'])
+ print(self.tabs + "Subnet : " + val['opensearch_private_ip'] + ", " + val['subnet_name'])
+ print(self.tabs + "Master : " + val['master_node_count'] + " x " + val['master_node_host_type'] + "." + val['master_node_host_ocpu_count'] + "." + val['master_node_host_memory_gb'])
+ print(self.tabs + "Data : " + val['data_node_count'] + " x " + val['data_node_host_type'] + "." + val['data_node_host_ocpu_count'] + "." + val['data_node_host_memory_gb'])
+ print(self.tabs + "Dashboard : " + val['opendashboard_node_count'] + " x " + val['opendashboard_node_host_ocpu_count'] + "." + val['opendashboard_node_host_memory_gb'])
+ print("")
+
# OCVS
if 'ocvs' in paas_services:
self.print_header("OCVS VMWare", 2)
@@ -2297,9 +2357,17 @@ def __print_security_main(self, security):
# cloud guard
if 'cloud_guard' in security:
self.print_header("Cloud Guard", 2)
+
for val in security['cloud_guard']:
- print(self.taba + val['display_name'] + ", (Target = " + val['target_resource_type'] + "), Created: " + val['time_created'][0:16] + " (" + val['lifecycle_state'] + "), Total Recipes : " + val['recipe_count'])
- print("")
+ print(self.taba + "Cloud Guard: " + val['display_name'] + ", (Target = " + val['target_resource_type'] + " " + val['target_resource_name'] + "), Created: " + val['time_created'][0:16] + " (" + val['lifecycle_state'] + "), Total Recipes : " + val['recipe_count'])
+ if val['inherited_by_compartments']:
+ print(self.tabs + "Inherited : " + val['inherited_by_compartments_names'])
+
+ for dr in val['target_detector_recipes']:
+ print(self.tabs + "Det Recipes: Owner = " + dr['owner'] + ", " + dr['display_name'] + ", Created: " + dr['time_created'][0:16] + " (" + dr['lifecycle_state'] + ")" + " Rules: " + str(len(dr['effective_detector_rules'])))
+
+ for dr in val['target_responder_recipes']:
+ print(self.tabs + "Res Recipes: Owner = " + dr['owner'] + ", " + dr['display_name'] + ", Created: " + dr['time_created'][0:16] + " Rules: " + str(len(dr['effective_responder_rules'])))
# bastions
if 'bastions' in security:
@@ -2869,9 +2937,13 @@ def print_summary(self, data):
for d in data:
if 'type' in d:
+
if d['type'] == "region":
self.__summary_region_data(d['region'], d['data'])
+ elif d['type'] == "identity":
+ self.__summary_identity(d['data'])
+
self.summary_global_total = self.__summary_group_by("type", self.summary_global_total)
self.__summary_print_results(self.summary_global_total, "Summary Total", 0)
@@ -2998,6 +3070,12 @@ def __summary_paas_services_main(self, paas_services):
array = [x for x in paas_services['devops'] if x['lifecycle_state'] != 'ACTIVE']
self.__summary_core_size(array, add_info="Stopped ")
+ if 'open_search' in paas_services:
+ array = [x for x in paas_services['open_search'] if x['lifecycle_state'] == 'ACTIVE']
+ self.__summary_core_size(array)
+ array = [x for x in paas_services['open_search'] if x['lifecycle_state'] != 'ACTIVE']
+ self.__summary_core_size(array, add_info="Stopped ")
+
except Exception as e:
self.__print_error("__summary_paas_services_main", e)
@@ -3079,6 +3157,82 @@ def __summary_data_ai_main(self, data_ai):
except Exception as e:
self.__print_error("__summary_data_ai_main", e)
+ ##########################################################################
+ # Identity Domains
+ ##########################################################################
+
+ def __summary_identity(self, identity):
+
+ try:
+ self.summary_global_list = []
+ if not identity:
+ return
+
+ if 'compartments' in identity:
+ self.__summary_core_count(identity['compartments'], 'Identity - Compartments')
+
+ if 'policies' in identity:
+ for policies in identity['policies']:
+ self.__summary_core_count(policies['policies'], 'Identity - Policies')
+ for policy in policies['policies']:
+ self.__summary_core_count(policy['statements'], 'Identity - Policies Statements')
+
+ if 'tag_namespace' in identity:
+ self.__summary_core_count(identity['tag_namespace'], 'Identity - Tag Namsespaces')
+
+ if 'groups' in identity:
+ self.__summary_core_count(identity['groups'], 'Identity - Groups')
+
+ if 'users' in identity:
+ self.__summary_core_count(identity['users'], 'Identity - Users')
+ for arr in identity['users']:
+ if 'api_keys' in arr:
+ self.__summary_core_count(arr['api_keys'], 'Identity - Users API Keys')
+ if 'auth_token' in arr:
+ self.__summary_core_count(arr['auth_token'], 'Identity - Users Auth Tokens')
+ if 'secret_key' in arr:
+ self.__summary_core_count(arr['secret_key'], 'Identity - Users Secret Keys')
+ if 'smtp_cred' in arr:
+ self.__summary_core_count(arr['smtp_cred'], 'Identity - Users SMTP Creds')
+
+ if 'domains' in identity:
+ self.__summary_core_count(identity['domains'], "Identity - Domains")
+
+ for domain in identity['domains']:
+
+ if 'users' in domain:
+ self.__summary_core_count(domain['users'], "Identity Domains - Users")
+ for arr in domain['users']:
+ self.__summary_core_count(arr['api_keys'], 'Identity Domains - Users API Keys')
+ self.__summary_core_count(arr['auth_tokens'], 'Identity Domains - Users Auth Tokens')
+ self.__summary_core_count(arr['customer_secret_keys'], 'Identity Domains - Users Secret Keys')
+ self.__summary_core_count(arr['smtp_credentials'], 'Identity Domains - Users SMTP Creds')
+ self.__summary_core_count(arr['o_auth2_client_credentials'], 'Identity Domains - Users OAuth Creds')
+ self.__summary_core_count(arr['db_credentials'], 'Identity Domains - Users DB Creds')
+
+ if 'groups' in domain:
+ self.__summary_core_count(domain['groups'], "Identity Domains - Groups")
+
+ if 'dynamic_groups' in domain:
+ self.__summary_core_count(domain['dynamic_groups'], "Identity Domains - DynGroups")
+
+ if 'identity_providers' in domain:
+ self.__summary_core_count(domain['identity_providers'], "Identity Domains - IDPs")
+
+ # aggregate the data
+ self.summary_global_list = self.__summary_group_by("type", self.summary_global_list)
+
+ # append data to global data
+ self.summary_global_data.append({'type': 'identity', 'summary': self.summary_global_list})
+
+ self.__summary_print_results(self.summary_global_list, "Summary Identity", 3)
+
+ # Merge to Total
+ self.summary_global_total.extend(self.summary_global_list)
+
+ except Exception as e:
+ self.__print_error("__summary_identity", e)
+
##########################################################################
# edge services
##########################################################################
@@ -3437,7 +3591,6 @@ def __summary_core_size(self, objects, sum_info="sum_info", sum_size="sum_size_g
##########################################################################
# sum core count
##########################################################################
-
def __summary_core_count(self, objects, object_name):
try:
if len(objects) == 0:
@@ -3552,6 +3705,13 @@ def __summary_core_network_main(self, data):
if 'drg' in data:
self.__summary_core_count(data['drg'], "Network DRG Count")
+ # Network Firewall
+ if 'network_firewall' in data:
+ self.__summary_core_count(data['network_firewall'], "Network Firewall Count")
+
+ if 'network_firewall_policies' in data:
+ self.__summary_core_count(data['network_firewall_policies'], "Network Firewall Policies Count")
+
# CPE
if 'cpe' in data:
self.__summary_core_count(data['cpe'], "Network CPEs")
@@ -3740,6 +3900,9 @@ class ShowOCICSV(object):
csv_db_autonomous = []
csv_database = []
csv_database_backups = []
+ csv_db_goldengate_deployments = []
+ csv_db_nosql = []
+ csv_db_mysql = []
csv_network_drg = []
csv_network_drg_ipsec_tunnels = []
csv_network_drg_virtual_circuits = []
@@ -3750,6 +3913,8 @@ class ShowOCICSV(object):
csv_network_security_group = []
csv_network_routes = []
csv_network_dhcp_options = []
+ csv_network_firewall = []
+ csv_network_firewall_policies = []
csv_file_storage = []
csv_load_balancer = []
csv_load_balancer_bs = []
@@ -3772,6 +3937,7 @@ class ShowOCICSV(object):
csv_paas_oce = []
csv_paas_vb = []
csv_paas_devops = []
+ csv_paas_open_search = []
csv_data_ai_oda = []
csv_data_ai_bds = []
csv_data_science = []
@@ -3854,6 +4020,8 @@ def generate_csv(self, data, csv_file_header, tenancy, add_date_field=True, csv_
self.__export_to_csv_file("network_security_list", self.csv_network_security_list)
self.__export_to_csv_file("network_security_group", self.csv_network_security_group)
self.__export_to_csv_file("network_dhcp_options", self.csv_network_dhcp_options)
+ self.__export_to_csv_file("network_firewalls", self.csv_network_firewall)
+ self.__export_to_csv_file("network_firewalls_policies", self.csv_network_firewall_policies)
self.__export_to_csv_file("database", self.csv_database)
self.__export_to_csv_file("database_backups", self.csv_database_backups)
self.__export_to_csv_file("database_autonomous", self.csv_db_autonomous)
@@ -3862,6 +4030,9 @@ def generate_csv(self, data, csv_file_header, tenancy, add_date_field=True, csv_
self.__export_to_csv_file("database_db_exa_infra", self.csv_db_exa_infrastructure)
self.__export_to_csv_file("database_db_exacs", self.csv_db_exacs_vmclusters)
self.__export_to_csv_file("database_db_exacc", self.csv_db_exacc_vmclusters)
+ self.__export_to_csv_file("database_goldengate_deployments", self.csv_db_goldengate_deployments)
+ self.__export_to_csv_file("database_mysql", self.csv_db_mysql)
+ self.__export_to_csv_file("database_nosql", self.csv_db_nosql)
self.__export_to_csv_file("load_balancer_listeners", self.csv_load_balancer)
self.__export_to_csv_file("load_balancer_backendset", self.csv_load_balancer_bs)
self.__export_to_csv_file("file_storage", self.csv_file_storage)
@@ -3885,6 +4056,7 @@ def generate_csv(self, data, csv_file_header, tenancy, add_date_field=True, csv_
self.__export_to_csv_file("paas_oce", self.csv_paas_oce)
self.__export_to_csv_file("paas_devops", self.csv_paas_devops)
self.__export_to_csv_file("paas_visualbuilder", self.csv_paas_vb)
+ self.__export_to_csv_file("paas_opensearch", self.csv_paas_open_search)
self.__export_to_csv_file("data_science", self.csv_data_science)
self.__export_to_csv_file("data_flow", self.csv_data_flow)
self.__export_to_csv_file("data_catalog", self.csv_data_catalog)
@@ -4939,6 +5111,75 @@ def __csv_core_network_virtual_circuit(self, region_name, vcs):
except Exception as e:
self.__print_error("__csv_core_network_virtual_circuit", e)
+ ##########################################################################
+ # CSV Network Firewall
+ ##########################################################################
+ def __csv_core_network_firewall(self, region_name, network_firewalls):
+ try:
+ if not network_firewalls:
+ return
+
+ for arr in network_firewalls:
+ data = {
+ 'region_name': region_name,
+ 'compartment_name': arr['compartment_name'],
+ 'compartment_path': arr['compartment_path'],
+ 'compartment_id': arr['compartment_id'],
+ 'name': arr['display_name'],
+ 'subnet_id': arr['subnet_id'],
+ 'subnet_name': arr['subnet_name'],
+ 'availability_domain': arr['availability_domain'],
+ 'ipv4_address': arr['ipv4_address'],
+ 'ipv6_address': arr['ipv6_address'],
+ 'network_firewall_policy_id': arr['network_firewall_policy_id'],
+ 'network_firewall_policy_name': arr['network_firewall_policy_name'],
+ 'time_created': arr['time_created'],
+ 'time_updated': arr['time_updated'],
+ 'lifecycle_state': arr['lifecycle_state'],
+ 'id': arr['id'],
+ 'freeform_tags': self.__get_freeform_tags(arr['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(arr['defined_tags'])
+ }
+ self.csv_network_firewall.append(data)
+
+ except Exception as e:
+ self.__print_error("__csv_core_network_virtual_circuit", e)
+
+ ##########################################################################
+ # CSV Network Firewall Policies
+ ##########################################################################
+ def __csv_core_network_firewall_policies(self, region_name, network_firewalls_policies):
+ try:
+ if not network_firewalls_policies:
+ return
+
+ for arr in network_firewalls_policies:
+ data = {
+ 'region_name': region_name,
+ 'compartment_name': arr['compartment_name'],
+ 'compartment_path': arr['compartment_path'],
+ 'compartment_id': arr['compartment_id'],
+ 'name': arr['display_name'],
+ 'lifecycle_state': arr['lifecycle_state'],
+ 'url_lists': arr['url_lists'],
+ 'mapped_secrets': arr['mapped_secrets'],
+ 'application_lists': arr['application_lists'],
+ 'ip_address_lists': arr['ip_address_lists'],
+ 'security_rules': arr['security_rules'],
+ 'decryption_rules': arr['decryption_rules'],
+ 'decryption_profiles': arr['decryption_profiles'],
+ 'is_firewall_attached': arr['is_firewall_attached'],
+ 'time_created': arr['time_created'],
+ 'time_updated': arr['time_updated'],
+ 'id': arr['id'],
+ 'freeform_tags': self.__get_freeform_tags(arr['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(arr['defined_tags'])
+ }
+ self.csv_network_firewall_policies.append(data)
+
+ except Exception as e:
+ self.__print_error("__csv_core_network_firewall_policies", e)
+
##########################################################################
# CSV for Network vcn security group
##########################################################################
@@ -5191,6 +5432,12 @@ def __csv_core_network_main(self, region_name, data):
if 'virtual_circuit' in data:
self.__csv_core_network_virtual_circuit(region_name, data['virtual_circuit'])
+ if 'network_firewall' in data:
+ self.__csv_core_network_firewall(region_name, data['network_firewall'])
+
+ if 'network_firewall_policies' in data:
+ self.__csv_core_network_firewall_policies(region_name, data['network_firewall_policies'])
+
except Exception as e:
self.__print_error("__csv_core_network_main", e)
@@ -5910,6 +6157,136 @@ def __csv_database_db_autonomous_databases(self, region_name, databases):
except Exception as e:
self.__print_error("__csv_database_db_autonomous_databases", e)
+ ##########################################################################
+ # __csv_database_goldengate
+ ##########################################################################
+
+ def __csv_database_goldengate(self, region_name, goldengates):
+ try:
+ if 'gg_deployments' in goldengates:
+ for db in goldengates['gg_deployments']:
+ gg = {
+ 'region_name': region_name,
+ 'compartment_name': db['compartment_name'],
+ 'compartment_path': db['compartment_path'],
+ 'display_name': db['display_name'],
+ 'description': db['description'],
+ 'time_created': db['time_created'],
+ 'time_updated': db['time_updated'],
+ 'lifecycle_state': db['lifecycle_state'],
+ 'subnet_id': db['subnet_id'],
+ 'subnet_name': db['subnet_name'],
+ 'license_model': db['license_model'],
+ 'fqdn': db['fqdn'],
+ 'cpu_core_count': db['cpu_core_count'],
+ 'is_auto_scaling_enabled': db['is_auto_scaling_enabled'],
+ 'is_public': db['is_public'],
+ 'public_ip_address': db['public_ip_address'],
+ 'private_ip_address': db['private_ip_address'],
+ 'deployment_url': db['deployment_url'],
+ 'is_latest_version': db['is_latest_version'],
+ 'deployment_type': db['deployment_type'],
+ 'freeform_tags': self.__get_freeform_tags(db['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(db['defined_tags']),
+ 'id': db['id']
+ }
+
+ self.csv_db_goldengate_deployments.append(gg)
+
+ except Exception as e:
+ self.__print_error("__csv_database_goldengate", e)
+
+ ##########################################################################
+ # __csv_database_mysql
+ ##########################################################################
+
+ def __csv_database_mysql(self, region_name, mysql):
+ try:
+ for db in mysql:
+ var = {
+ 'region_name': region_name,
+ 'compartment_name': db['compartment_name'],
+ 'compartment_path': db['compartment_path'],
+ 'compartment_id': db['compartment_id'],
+ 'display_name': db['display_name'],
+ 'description': db['description'],
+ 'is_highly_available': db['is_highly_available'],
+ 'current_placement': db['current_placement'],
+ 'is_analytics_cluster_attached': db['is_analytics_cluster_attached'],
+ 'analytics_cluster': db['analytics_cluster'],
+ 'is_heat_wave_cluster_attached': db['is_heat_wave_cluster_attached'],
+ 'heat_wave_cluster': db['heat_wave_cluster'],
+ 'availability_domain': db['availability_domain'],
+ 'fault_domain': db['fault_domain'],
+ 'endpoints': db['endpoints'],
+ 'endpoints_text': db['endpoints_text'],
+ 'lifecycle_state': db['lifecycle_state'],
+ 'mysql_version': db['mysql_version'],
+ 'time_created': db['time_created'],
+ 'time_updated': db['time_updated'],
+ 'deletion_policy': db['deletion_policy'],
+ 'shape_name': db['shape_name'],
+ 'shape_ocpu': db['shape_ocpu'],
+ 'shape_memory_gb': db['shape_memory_gb'],
+ 'crash_recovery': db['crash_recovery'],
+ 'backup_is_enabled': db['backup_is_enabled'],
+ 'sum_info': db['sum_info'],
+ 'sum_info_storage': db['sum_info_storage'],
+ 'sum_size_gb': db['sum_size_gb'],
+ 'subnet_id': db['subnet_id'],
+ 'subnet_name': db['subnet_name'],
+ 'configuration_id': db['configuration_id'],
+ 'source': db['source'],
+ 'hostname_label': db['hostname_label'],
+ 'ip_address': db['ip_address'],
+ 'port': db['port'],
+ 'port_x': db['port_x'],
+ 'channels': db['channels'],
+ 'maintenance': db['maintenance'],
+ 'time_earliest_recovery_point': db['time_earliest_recovery_point'],
+ 'time_latest_recovery_point': db['time_latest_recovery_point'],
+ 'data_storage_size_in_gbs': db['data_storage_size_in_gbs'],
+ 'freeform_tags': self.__get_freeform_tags(db['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(db['defined_tags']),
+ 'id': db['id']
+ }
+
+ self.csv_db_mysql.append(var)
+
+ except Exception as e:
+ self.__print_error("__csv_database_mysql", e)
+
+ ##########################################################################
+ # __csv_database_nosql
+ ##########################################################################
+
+ def __csv_database_nosql(self, region_name, nosqls):
+ try:
+ for db in nosqls:
+ arr = {
+ 'region_name': region_name,
+ 'compartment_name': db['compartment_name'],
+ 'compartment_path': db['compartment_path'],
+ 'name': db['name'],
+ 'time_created': db['time_created'],
+ 'time_updated': db['time_updated'],
+ 'lifecycle_state': db['lifecycle_state'],
+ 'is_auto_reclaimable': db['is_auto_reclaimable'],
+ 'time_of_expiration': db['time_of_expiration'],
+ 'capacity_mode': db['capacity_mode'],
+ 'max_read_units': db['max_read_units'],
+ 'max_write_units': db['max_write_units'],
+ 'max_storage_in_g_bs': db['max_storage_in_g_bs'],
+ 'freeform_tags': self.__get_freeform_tags(db['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(db['defined_tags']),
+ 'id': db['id']
+ }
+
+ self.csv_db_nosql.append(arr)
+
+ except Exception as e:
+ self.__print_error("__csv_database_goldengate", e)
+
##########################################################################
# database
##########################################################################
@@ -5939,6 +6316,15 @@ def __csv_database_main(self, region_name, list_databases):
if 'autonomous' in list_databases:
self.__csv_database_db_autonomous(region_name, list_databases['autonomous'])
+ if 'goldengate' in list_databases:
+ self.__csv_database_goldengate(region_name, list_databases['goldengate'])
+
+ if 'nosql' in list_databases:
+ self.__csv_database_nosql(region_name, list_databases['nosql'])
+
+ if 'mysql' in list_databases:
+ self.__csv_database_mysql(region_name, list_databases['mysql'])
+
except Exception as e:
self.__print_error("__print_database_main", e)
@@ -6641,17 +7027,43 @@ def __csv_security_cloud_guard(self, region_name, cloud_guards):
data = {
'region_name': region_name,
'compartment_name': ar['compartment_name'],
+ 'compartment_id': ar['compartment_id'],
'compartment_path': ar['compartment_path'],
'name': ar['display_name'],
'target_resource_type': ar['target_resource_type'],
'target_resource_id': ar['target_resource_id'],
+ 'target_resource_name': ar['target_resource_name'],
+ 'inherited_by_compartments': ar['inherited_by_compartments'],
+ 'inherited_by_compartments_names': ar['inherited_by_compartments_names'],
+ 'target_detector_recipes': str(', '.join(x['display_name'] for x in ar['target_detector_recipes'])),
+ 'target_responder_recipes': str(', '.join(x['display_name'] for x in ar['target_responder_recipes'])),
+ 'target_detector_rules': "",
+ 'target_responder_rules': "",
'recipe_count': ar['recipe_count'],
'time_created': ar['time_created'][0:16],
'time_updated': ar['time_updated'][0:16],
'lifecycle_state': ar['lifecycle_state'],
+ 'freeform_tags': self.__get_freeform_tags(ar['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(ar['defined_tags']),
'id': ar['id']
}
+ # target_detector_rules
+ if ar['target_detector_recipes']:
+ arrrules = []
+ for dt in ar['target_detector_recipes']:
+ for rule in dt['effective_detector_rules']:
+ arrrules.append(rule)
+ data['target_detector_rules'] = str(', '.join(x for x in list(set(arrrules))))
+
+ # target_detector_rules
+ if ar['target_responder_recipes']:
+ arrrules = []
+ for dt in ar['target_responder_recipes']:
+ for rule in dt['effective_responder_rules']:
+ arrrules.append(rule)
+ data['target_responder_rules'] = str(', '.join(x for x in list(set(arrrules))))
+
self.csv_security_cloud_guard.append(data)
except Exception as e:
@@ -7223,6 +7635,66 @@ def __csv_paas_visualbuilder(self, region_name, services):
except Exception as e:
self.__print_error("__csv_paas_visualbuilder", e)
+ ##########################################################################
+ # __csv_paas_open_search
+ ##########################################################################
+ def __csv_paas_open_search(self, region_name, services):
+ try:
+
+ if len(services) == 0:
+ return
+
+ if services:
+ for ar in services:
+
+ data = {
+ 'region_name': region_name,
+ 'compartment_name': ar['compartment_name'],
+ 'compartment_path': ar['compartment_path'],
+ 'display_name': ar['display_name'],
+ 'time_created': ar['time_created'][0:16],
+ 'time_updated': ar['time_updated'][0:16],
+ 'lifecycle_state': ar['lifecycle_state'],
+ 'software_version': ar['software_version'],
+ 'total_storage_gb': ar['total_storage_gb'],
+ 'security_mode': ar['security_mode'],
+ 'availability_domains': ar['availability_domains'],
+ 'opensearch_fqdn': ar['opensearch_fqdn'],
+ 'opensearch_private_ip': ar['opensearch_private_ip'],
+ 'opendashboard_fqdn': ar['opendashboard_fqdn'],
+ 'opendashboard_private_ip': ar['opendashboard_private_ip'],
+ 'master_node_count': ar['master_node_count'],
+ 'master_node_host_type': ar['master_node_host_type'],
+ 'master_node_host_bare_metal_shape': ar['master_node_host_bare_metal_shape'],
+ 'master_node_host_ocpu_count': ar['master_node_host_ocpu_count'],
+ 'master_node_host_memory_gb': ar['master_node_host_memory_gb'],
+ 'data_node_count': ar['data_node_count'],
+ 'data_node_host_type': ar['data_node_host_type'],
+ 'data_node_host_bare_metal_shape': ar['data_node_host_bare_metal_shape'],
+ 'data_node_host_ocpu_count': ar['data_node_host_ocpu_count'],
+ 'data_node_host_memory_gb': ar['data_node_host_memory_gb'],
+ 'data_node_storage_gb': ar['data_node_storage_gb'],
+ 'opendashboard_node_count': ar['opendashboard_node_count'],
+ 'opendashboard_node_host_ocpu_count': ar['opendashboard_node_host_ocpu_count'],
+ 'opendashboard_node_host_memory_gb': ar['opendashboard_node_host_memory_gb'],
+ 'vcn_id': ar['vcn_id'],
+ 'vcn_name': ar['vcn_name'],
+ 'subnet_id': ar['subnet_id'],
+ 'subnet_name': ar['subnet_name'],
+ 'vcn_compartment_id': ar['vcn_compartment_id'],
+ 'subnet_compartment_id': ar['subnet_compartment_id'],
+ 'security_master_user_name': ar['security_master_user_name'],
+ 'security_master_user_password_hash': ar['security_master_user_password_hash'],
+ 'freeform_tags': self.__get_freeform_tags(ar['freeform_tags']),
+ 'defined_tags': self.__get_defined_tags(ar['defined_tags']),
+ 'id': ar['id']
+ }
+
+ self.csv_paas_open_search.append(data)
+
+ except Exception as e:
+ self.__print_error("__csv_paas_open_search", e)
+
##########################################################################
# Paas VB
##########################################################################
@@ -7334,6 +7806,9 @@ def __csv_paas_main(self, region_name, data):
if 'devops' in data:
self.__csv_paas_devops(region_name, data['devops'])
+ if 'open_search' in data:
+ self.__csv_paas_open_search(region_name, data['open_search'])
+
except Exception as e:
self.__print_error("__csv_paas_main", e)
diff --git a/examples/showoci/showoci_service.py b/examples/showoci/showoci_service.py
index 80a4d78b6c..bca5a07d57 100644
--- a/examples/showoci/showoci_service.py
+++ b/examples/showoci/showoci_service.py
@@ -34,7 +34,7 @@
# class ShowOCIService
##########################################################################
class ShowOCIService(object):
- version = "23.03.21"
+ version = "23.03.28"
oci_compatible_version = "2.95.0"
##########################################################################
@@ -68,6 +68,8 @@ class ShowOCIService(object):
C_NETWORK_VC = 'virtualcircuit'
C_NETWORK_PRIVATEIP = 'privateip'
C_NETWORK_DNS_RESOLVERS = 'dns_resolvers'
+ C_NETWORK_FIREWALL = 'network_firewall'
+ C_NETWORK_FIREWALL_POLICY = 'network_firewall_policy'
# Identity Identifiers
C_IDENTITY = 'identity'
@@ -208,6 +210,7 @@ class ShowOCIService(object):
C_PAAS_NATIVE_OCVS = "ocvs"
C_PAAS_NATIVE_VB = "vb"
C_PAAS_NATIVE_DEVOPS = "devops"
+ C_PAAS_NATIVE_OPEN_SEARCH = "opensearch"
# function
C_FUNCTION = "functions"
@@ -1008,7 +1011,10 @@ def __load_data_main(self):
# print filter by
if self.flags.filter_by_region:
- print("Filtered by Region = " + self.flags.filter_by_region)
+ print("Filtered by Regions = " + self.flags.filter_by_region)
+
+ if self.flags.filter_by_region_not:
+ print("Filtered by Regions (Not) = " + self.flags.filter_by_region_not)
if self.flags.filter_by_compartment:
print("Filtered by Compartment like " + self.flags.filter_by_compartment)
@@ -1048,9 +1054,31 @@ def __load_data_main(self):
tenancy = self.data[self.C_IDENTITY][self.C_IDENTITY_TENANCY]
for region_name in tenancy['list_region_subscriptions']:
- # if filtered by region skip if not cmd.region
- if self.flags.filter_by_region and str(self.flags.filter_by_region) not in region_name:
- continue
+ # Region Filter
+ if self.flags.filter_by_region:
+ if ',' not in self.flags.filter_by_region:
+ if str(self.flags.filter_by_region) not in region_name:
+ continue
+ else:
+ region_found = False
+ for rg in str(self.flags.filter_by_region).split(","):
+ if rg in region_name:
+ region_found = True
+ if not region_found:
+ continue
+
+ # Region Filter Not
+ if self.flags.filter_by_region_not:
+ if ',' not in self.flags.filter_by_region_not:
+ if str(self.flags.filter_by_region_not) in region_name:
+ continue
+ else:
+ region_found = False
+ for rg in str(self.flags.filter_by_region_not).split(","):
+ if rg in region_name:
+ region_found = True
+ if region_found:
+ continue
# load region into data
self.__load_oci_region_data(region_name)
@@ -2038,6 +2066,11 @@ def __load_core_network_main(self):
if self.flags.proxy:
dns_client.base_client.session.proxies = {'https': self.flags.proxy}
+ # Open connectivity to OCI
+ nwf_client = oci.network_firewall.NetworkFirewallClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
+ if self.flags.proxy:
+ nwf_client.base_client.session.proxies = {'https': self.flags.proxy}
+
# reference to compartments
compartments = self.data[self.C_IDENTITY][self.C_IDENTITY_COMPARTMENTS]
@@ -2067,6 +2100,8 @@ def __load_core_network_main(self):
self.__initialize_data_key(self.C_NETWORK, self.C_NETWORK_DHCP)
self.__initialize_data_key(self.C_NETWORK, self.C_NETWORK_PRIVATEIP)
self.__initialize_data_key(self.C_NETWORK, self.C_NETWORK_DNS_RESOLVERS)
+ self.__initialize_data_key(self.C_NETWORK, self.C_NETWORK_FIREWALL)
+ self.__initialize_data_key(self.C_NETWORK, self.C_NETWORK_FIREWALL_POLICY)
# reference to network:
network = self.data[self.C_NETWORK]
@@ -2105,6 +2140,8 @@ def __load_core_network_main(self):
network[self.C_NETWORK_SLIST] += self.__load_core_network_seclst(virtual_network, compartments)
network[self.C_NETWORK_DHCP] += self.__load_core_network_dhcpop(virtual_network, compartments)
network[self.C_NETWORK_DNS_RESOLVERS] += self.__load_core_network_dns_resolvers(dns_client, compartments)
+ network[self.C_NETWORK_FIREWALL_POLICY] += self.__load_core_network_firewall_policy(nwf_client, compartments)
+ network[self.C_NETWORK_FIREWALL] += self.__load_core_network_firewall(nwf_client, compartments)
routes = self.__load_core_network_routet(virtual_network, compartments)
network[self.C_NETWORK_ROUTE] += routes
@@ -3696,6 +3733,193 @@ def __load_core_network_cpe(self, virtual_network, compartments):
self.__print_error("__load_core_network_cpe", e)
return data
+ ##########################################################################
+ # load network FW
+ ##########################################################################
+ def __load_core_network_firewall(self, network_firewall_client, compartments):
+
+ data = []
+ cnt = 0
+ start_time = time.time()
+
+ try:
+
+ self.__load_print_status("Network Firewalls")
+
+ # loop on all compartments
+ for compartment in compartments:
+
+ arrs = []
+ try:
+ arrs = oci.pagination.list_call_get_all_results(
+ network_firewall_client.list_network_firewalls,
+ compartment['id'],
+ retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
+ ).data
+
+ except oci.exceptions.ServiceError as e:
+ if self.__check_service_error(e.code):
+ self.__load_print_auth_warning()
+ continue
+ raise
+
+ print(".", end="")
+
+ # loop on array
+ # arr = oci.network_firewall.models.NetworkFirewallSummary
+ for arr in arrs:
+ if not self.check_lifecycle_state_active(arr.lifecycle_state):
+ continue
+
+ val = {'id': str(arr.id),
+ 'name': str(arr.display_name) + " - " + str(arr.ipv4_address),
+ 'display_name': str(arr.display_name),
+ 'subnet_id': str(arr.subnet_id),
+ 'subnet_name': "" if arr.subnet_id is None else self.get_network_subnet(arr.subnet_id, True),
+ 'availability_domain': str(arr.availability_domain),
+ 'ipv4_address': str(arr.ipv4_address),
+ 'ipv6_address': str(arr.ipv6_address),
+ 'network_firewall_policy_id': str(arr.network_firewall_policy_id),
+ 'network_firewall_policy_name': "",
+ 'time_created': str(arr.time_created),
+ 'time_updated': str(arr.time_updated),
+ 'lifecycle_state': str(arr.lifecycle_state),
+ 'compartment_name': str(compartment['name']),
+ 'compartment_path': str(compartment['path']),
+ 'defined_tags': [] if arr.defined_tags is None else arr.defined_tags,
+ 'freeform_tags': [] if arr.freeform_tags is None else arr.freeform_tags,
+ 'compartment_id': str(compartment['id']),
+ 'region_name': str(self.config['region'])
+ }
+
+ # get name of the policy
+ nwfpolicy = self.search_unique_item(self.C_NETWORK, self.C_NETWORK_FIREWALL_POLICY, 'id', arr.network_firewall_policy_id)
+ if nwfpolicy:
+ val['network_firewall_policy_name'] = nwfpolicy['display_name']
+
+ data.append(val)
+ cnt += 1
+
+ self.__load_print_cnt(cnt, start_time)
+ return data
+
+ except oci.exceptions.RequestException as e:
+
+ if self.__check_request_error(e):
+ return data
+
+ raise
+ except Exception as e:
+ self.__print_error("__load_core_network_firewall", e)
+ return data
+
+ ##########################################################################
+ # load network FW Policies
+ ##########################################################################
+ def __load_core_network_firewall_policy(self, network_firewall_client, compartments):
+
+ data = []
+ cnt = 0
+ start_time = time.time()
+
+ try:
+
+ self.__load_print_status("Network Firewalls Policies")
+
+ # loop on all compartments
+ for compartment in compartments:
+
+ arrs = []
+ try:
+ arrs = oci.pagination.list_call_get_all_results(
+ network_firewall_client.list_network_firewall_policies,
+ compartment['id'],
+ retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
+ ).data
+
+ except oci.exceptions.ServiceError as e:
+ if self.__check_service_error(e.code):
+ self.__load_print_auth_warning()
+ continue
+ raise
+
+ print(".", end="")
+
+ # loop on array
+ # arr = oci.network_firewall.models.NetworkFirewallPolicySummary
+ for arr in arrs:
+ if not self.check_lifecycle_state_active(arr.lifecycle_state):
+ continue
+
+ val = {'id': str(arr.id),
+ 'display_name': str(arr.display_name),
+ 'time_created': str(arr.time_created),
+ 'time_updated': str(arr.time_updated),
+ 'lifecycle_state': str(arr.lifecycle_state),
+ 'compartment_id': str(compartment['id']),
+ 'compartment_name': str(compartment['name']),
+ 'compartment_path': str(compartment['path']),
+ 'url_lists': "",
+ 'mapped_secrets': "",
+ 'application_lists': "",
+ 'ip_address_lists': "",
+ 'security_rules': "",
+ 'decryption_rules': "",
+ 'decryption_profiles': "",
+ 'is_firewall_attached': "",
+ 'defined_tags': [] if arr.defined_tags is None else arr.defined_tags,
+ 'freeform_tags': [] if arr.freeform_tags is None else arr.freeform_tags,
+ 'region_name': str(self.config['region'])
+ }
+
+ # retrieve more details with get
+ try:
+ nfw = network_firewall_client.get_network_firewall_policy(
+ arr.id,
+ retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
+ ).data
+
+ # (dict(str, list[UrlPattern]))
+ val['url_lists'] = str(nfw.url_lists) if nfw.url_lists else ""
+
+ # (dict(str, MappedSecret))
+ val['mapped_secrets'] = str(nfw.mapped_secrets) if nfw.mapped_secrets else ""
+
+ # (dict(str, list[Application]))
+ val['application_lists'] = str(nfw.application_lists) if nfw.application_lists else ""
+
+ # (dict(str, list[str]))
+ val['ip_address_lists'] = str(nfw.ip_address_lists) if nfw.ip_address_lists else ""
+
+ # (list[oci.network_firewall.models.SecurityRule])
+ val['security_rules'] = str(nfw.security_rules) if nfw.security_rules else ""
+
+ # (list[oci.network_firewall.models.DecryptionRule])
+ val['decryption_rules'] = str(nfw.decryption_rules) if nfw.decryption_rules else ""
+
+ # (dict(str, DecryptionProfile))
+ val['decryption_profiles'] = str(nfw.decryption_profiles) if nfw.decryption_profiles else ""
+ val['is_firewall_attached'] = str(nfw.is_firewall_attached) if nfw.is_firewall_attached else ""
+
+ except Exception:
+ print("w", end="")
+
+ data.append(val)
+ cnt += 1
+
+ self.__load_print_cnt(cnt, start_time)
+ return data
+
+ except oci.exceptions.RequestException as e:
+
+ if self.__check_request_error(e):
+ return data
+
+ raise
+ except Exception as e:
+ self.__print_error("__load_core_network_firewall_policy", e)
+ return data
+
##########################################################################
# query private ip
##########################################################################
@@ -9387,11 +9611,14 @@ def __load_database_nosql(self, nosql_client, compartments):
'time_updated': str(tab.time_updated),
'lifecycle_state': str(tab.lifecycle_state),
'lifecycle_details': str(tab.lifecycle_details),
+ 'is_auto_reclaimable': str(tab.is_auto_reclaimable),
+ 'time_of_expiration': str(tab.time_of_expiration),
'sum_info': "NOSQL Database Tables",
'sum_size_gb': str("1"),
'max_read_units': str(tab.table_limits.max_read_units),
'max_write_units': str(tab.table_limits.max_write_units),
'max_storage_in_g_bs': str(tab.table_limits.max_storage_in_g_bs),
+ 'capacity_mode': str(tab.table_limits.capacity_mode),
'compartment_name': str(compartment['name']),
'compartment_path': str(compartment['path']),
'compartment_id': str(compartment['id']),
@@ -9464,63 +9691,94 @@ def __load_database_mysql(self, mysql_client, compartments):
if not self.check_lifecycle_state_active(mysqls.lifecycle_state):
continue
+ value = {
+ 'id': str(mysqls.id),
+ 'display_name': str(mysqls.display_name),
+ 'description': str(mysqls.description),
+ 'is_highly_available': str(mysqls.is_highly_available),
+ 'current_placement': str(mysqls.current_placement.availability_domain) if mysqls.current_placement else "",
+ 'is_analytics_cluster_attached': str(mysqls.is_analytics_cluster_attached),
+ 'analytics_cluster': str(mysqls.analytics_cluster.shape_name) + "-" + str(mysqls.analytics_cluster.cluster_size) if mysqls.analytics_cluster else "",
+ 'is_heat_wave_cluster_attached': str(mysqls.is_heat_wave_cluster_attached),
+ 'heat_wave_cluster': str(mysqls.heat_wave_cluster.shape_name) + "-" + str(mysqls.heat_wave_cluster.cluster_size) if mysqls.heat_wave_cluster else "",
+ 'availability_domain': str(mysqls.availability_domain),
+ 'fault_domain': str(mysqls.fault_domain),
+ 'endpoints': [],
+ 'endpoints_text': str(', '.join(str(x.ip_address) + ":" + str(x.port) for x in mysqls.endpoints)),
+ 'lifecycle_state': str(mysqls.lifecycle_state),
+ 'mysql_version': str(mysqls.mysql_version),
+ 'time_created': str(mysqls.time_created),
+ 'time_updated': str(mysqls.time_updated),
+ 'deletion_policy': ("Retention: " + str(mysqls.deletion_policy.automatic_backup_retention) + ", Final Backup: " + str(mysqls.deletion_policy.final_backup) + ", Protected: " + str(mysqls.deletion_policy.is_delete_protected)) if mysqls.deletion_policy else "",
+ 'shape_name': str(mysqls.shape_name),
+ 'shape_ocpu': 0,
+ 'shape_memory_gb': 0,
+ 'crash_recovery': str(mysqls.crash_recovery),
+ 'backup_is_enabled': str(mysqls.backup_policy.is_enabled) if mysqls.backup_policy else "false",
+ 'sum_info': 'Database Mysql - ' + str(mysqls.shape_name),
+ 'sum_info_storage': 'Database - Storage (GB)',
+ 'sum_size_gb': 0,
+ 'subnet_id': "",
+ 'subnet_name': "",
+ 'configuration_id': "",
+ 'source': "",
+ 'hostname_label': "",
+ 'ip_address': "",
+ 'port': "",
+ 'port_x': "",
+ 'channels': "",
+ 'maintenance': "",
+ 'time_earliest_recovery_point': "",
+ 'time_latest_recovery_point': "",
+ 'data_storage_size_in_gbs': "",
+ 'compartment_name': str(compartment['name']),
+ 'compartment_path': str(compartment['path']),
+ 'compartment_id': str(compartment['id']),
+ 'defined_tags': [] if mysqls.defined_tags is None else mysqls.defined_tags,
+ 'freeform_tags': [] if mysqls.freeform_tags is None else mysqls.freeform_tags,
+ 'region_name': str(self.config['region'])
+ }
+
+ # get shape
+ if mysqls.shape_name:
+ shape_sizes = self.get_shape_details(str(mysqls.shape_name))
+ if shape_sizes:
+ value['shape_ocpu'] = shape_sizes['cpu']
+ value['shape_memory_gb'] = shape_sizes['memory']
+
+ # get endpoints
+ for ep in mysqls.endpoints:
+ epval = {
+ 'hostname': str(ep.hostname),
+ 'ip_address': str(ep.ip_address),
+ 'port': str(ep.port),
+ 'port_x': str(ep.port_x),
+ 'modes': str(', '.join(x for x in ep.modes)),
+ 'status': str(ep.status),
+ 'status_details': str(ep.status_details)
+ }
+ value['endpoints'].append(epval)
+
try:
# get the full DBSystem - oci.mysql.models.DbSystem
- mysql = mysql_client.get_db_system((mysqls.id)).data
-
- value = {'id': str(mysql.id),
- 'display_name': str(mysql.display_name),
- 'description': str(mysql.description),
- 'availability_domain': str(mysql.availability_domain),
- 'fault_domain': str(mysql.fault_domain),
- 'lifecycle_state': str(mysql.lifecycle_state),
- 'mysql_version': str(mysql.mysql_version),
- 'endpoints': [],
- 'time_created': str(mysql.time_created),
- 'time_updated': str(mysql.time_updated),
- 'subnet_id': str(mysql.subnet_id),
- 'shape_name': str(mysql.shape_name),
- 'shape_ocpu': 0,
- 'shape_memory_gb': 0,
- 'backup_is_enabled': str(mysql.backup_policy.is_enabled) if mysql.backup_policy else "false",
- 'configuration_id': str(mysql.configuration_id),
- 'data_storage_size_in_gbs': str(mysql.data_storage_size_in_gbs),
- 'sum_info': 'Database Mysql - ' + str(mysql.shape_name),
- 'sum_info_storage': 'Database - Storage (GB)',
- 'sum_size_gb': str(mysql.data_storage_size_in_gbs),
- 'compartment_name': str(compartment['name']),
- 'compartment_path': str(compartment['path']),
- 'compartment_id': str(compartment['id']),
- 'defined_tags': [] if mysql.defined_tags is None else mysql.defined_tags,
- 'freeform_tags': [] if mysql.freeform_tags is None else mysql.freeform_tags,
- 'region_name': str(self.config['region'])
- }
-
- # get shape
- if mysql.shape_name:
- shape_sizes = self.get_shape_details(str(mysql.shape_name))
- if shape_sizes:
- value['shape_ocpu'] = shape_sizes['cpu']
- value['shape_memory_gb'] = shape_sizes['memory']
-
- # get endpoints
- for ep in mysql.endpoints:
- epval = {'hostname': str(ep.hostname),
- 'ip_address': str(ep.ip_address),
- 'port': str(ep.port),
- 'port_x': str(ep.port_x),
- 'modes': str(', '.join(x for x in ep.modes)),
- 'status': str(ep.status),
- 'status_details': str(ep.status_details)
- }
- value['endpoints'].append(epval)
+ mysql = mysql_client.get_db_system(mysqls.id, retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY).data
+
+ value['subnet_id'] = str(mysql.subnet_id)
+ value['configuration_id'] = str(mysql.configuration_id)
+ value['data_storage_size_in_gbs'] = str(mysql.data_storage_size_in_gbs)
+ value['sum_size_gb'] = str(mysql.data_storage_size_in_gbs)
+ value['source'] = str(mysql.source) if mysql.source else ""
+ value['hostname_label'] = str(mysql.hostname_label) if mysql.hostname_label else ""
+ value['ip_address'] = str(mysql.ip_address)
+ value['port'] = str(mysql.port)
+ value['port_x'] = str(mysql.port_x)
+ value['maintenance'] = str(mysql.maintenance.window_start_time) if mysql.maintenance else ""
+ value['channels'] = str(', '.join(str(x.display_name) for x in mysql.channels))
+ value['time_earliest_recovery_point'] = str(mysql.point_in_time_recovery_details.time_earliest_recovery_point)[0:16] if mysql.point_in_time_recovery_details else ""
+ value['time_latest_recovery_point'] = str(mysql.point_in_time_recovery_details.time_latest_recovery_point)[0:16] if mysql.point_in_time_recovery_details else ""
- except oci.exceptions.ServiceError as e:
- if self.__check_service_error(e.code):
- self.__load_print_auth_warning()
- continue
- else:
- raise
+ except Exception:
+ print("w", end="")
# add the data
cnt += 1
@@ -12594,6 +12852,7 @@ def __load_paas_native_main(self):
ocvs_client = oci.ocvp.SddcClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
esxi_client = oci.ocvp.EsxiHostClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
vb_client = oci.visual_builder.VbInstanceClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
+ opensearch_client = oci.opensearch.OpensearchClusterClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
virtual_network = oci.core.VirtualNetworkClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
devops_client = oci.devops.DevopsClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
@@ -12605,6 +12864,7 @@ def __load_paas_native_main(self):
vb_client.base_client.session.proxies = {'https': self.flags.proxy}
esxi_client.base_client.session.proxies = {'https': self.flags.proxy}
virtual_network.base_client.session.proxies = {'https': self.flags.proxy}
+ opensearch_client.base_client.session.proxies = {'https': self.flags.proxy}
devops_client.base_client.session.proxies = {'https': self.flags.proxy}
# reference to compartments
@@ -12617,6 +12877,7 @@ def __load_paas_native_main(self):
self.__initialize_data_key(self.C_PAAS_NATIVE, self.C_PAAS_NATIVE_OCVS)
self.__initialize_data_key(self.C_PAAS_NATIVE, self.C_PAAS_NATIVE_VB)
self.__initialize_data_key(self.C_PAAS_NATIVE, self.C_PAAS_NATIVE_DEVOPS)
+ self.__initialize_data_key(self.C_PAAS_NATIVE, self.C_PAAS_NATIVE_OPEN_SEARCH)
# reference to paas
paas = self.data[self.C_PAAS_NATIVE]
@@ -12628,6 +12889,7 @@ def __load_paas_native_main(self):
paas[self.C_PAAS_NATIVE_OAC] += self.__load_paas_oac(oac_client, compartments)
paas[self.C_PAAS_NATIVE_VB] += self.__load_paas_visualbuilder(vb_client, compartments)
paas[self.C_PAAS_NATIVE_DEVOPS] += self.__load_paas_devops(devops_client, compartments)
+ paas[self.C_PAAS_NATIVE_OPEN_SEARCH] += self.__load_paas_open_search(opensearch_client, compartments)
print("")
except oci.exceptions.RequestException:
@@ -13143,6 +13405,150 @@ def __load_paas_visualbuilder(self, vb_client, compartments):
self.__print_error("__load_paas_visualbuilder", e)
return data
+ ##########################################################################
+ # __load_paas_open_search
+ ##########################################################################
+ def __load_paas_open_search(self, open_client, compartments):
+
+ data = []
+ cnt = 0
+ start_time = time.time()
+
+ try:
+ self.__load_print_status("Open Search Cluster")
+
+ # loop on all compartments
+ for compartment in compartments:
+
+ # skip managed paas compartment
+ if self.__if_managed_paas_compartment(compartment['name']):
+ print(".", end="")
+ continue
+
+ opens = []
+ try:
+ opens = oci.pagination.list_call_get_all_results(
+ open_client.list_opensearch_clusters,
+ compartment['id'],
+ sort_by="displayName",
+ retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
+ ).data
+
+ except oci.exceptions.ServiceError as e:
+ if self.__check_service_error(e.code):
+ self.__load_print_auth_warning()
+ continue
+ raise
+ except oci.exceptions.ConnectTimeout:
+ self.__load_print_auth_warning()
+ continue
+
+ print(".", end="")
+
+ # arr = oci.opensearch.models.OpensearchClusterSummary
+ for arr in opens:
+ if not self.check_lifecycle_state_active(arr.lifecycle_state):
+ continue
+
+ val = {
+ 'id': str(arr.id),
+ 'display_name': str(arr.display_name),
+ 'time_created': str(arr.time_created),
+ 'time_updated': str(arr.time_updated),
+ 'lifecycle_state': str(arr.lifecycle_state),
+ 'software_version': str(arr.software_version),
+ 'total_storage_gb': str(arr.total_storage_gb),
+ 'security_mode': str(arr.security_mode) if arr.security_mode else "",
+ 'availability_domains': str(", ").join(x for x in arr.availability_domains) if arr.availability_domains else "",
+ 'sum_info': "PaaS Open Search Cluster",
+ 'sum_size_gb': str(1),
+ 'compartment_name': str(compartment['name']),
+ 'compartment_path': str(compartment['path']),
+ 'compartment_id': str(compartment['id']),
+ 'defined_tags': [] if arr.defined_tags is None else arr.defined_tags,
+ 'freeform_tags': [] if arr.freeform_tags is None else arr.freeform_tags,
+ 'region_name': str(self.config['region'])
+ }
+
+ val['opensearch_fqdn'] = ""
+ val['opensearch_private_ip'] = ""
+ val['opendashboard_fqdn'] = ""
+ val['opendashboard_private_ip'] = ""
+ val['master_node_count'] = ""
+ val['master_node_host_type'] = ""
+ val['master_node_host_bare_metal_shape'] = ""
+ val['master_node_host_ocpu_count'] = ""
+ val['master_node_host_memory_gb'] = ""
+ val['data_node_count'] = ""
+ val['data_node_host_type'] = ""
+ val['data_node_host_bare_metal_shape'] = ""
+ val['data_node_host_ocpu_count'] = ""
+ val['data_node_host_memory_gb'] = ""
+ val['data_node_storage_gb'] = ""
+ val['opendashboard_node_count'] = ""
+ val['opendashboard_node_host_ocpu_count'] = ""
+ val['opendashboard_node_host_memory_gb'] = ""
+ val['vcn_id'] = ""
+ val['vcn_name'] = ""
+ val['subnet_id'] = ""
+ val['subnet_name'] = ""
+ val['vcn_compartment_id'] = ""
+ val['subnet_compartment_id'] = ""
+ val['security_master_user_name'] = ""
+ val['security_master_user_password_hash'] = ""
+
+ try:
+ # get the target with more info
+ arf = open_client.get_opensearch_cluster(
+ arr.id,
+ retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
+ ).data
+
+ # target_detector_recipes
+ val['opensearch_fqdn'] = str(arf.opensearch_fqdn)
+ val['opensearch_private_ip'] = str(arf.opensearch_private_ip)
+ val['opendashboard_fqdn'] = str(arf.opendashboard_fqdn)
+ val['opendashboard_private_ip'] = str(arf.opendashboard_private_ip)
+ val['master_node_count'] = str(arf.master_node_count)
+ val['master_node_host_type'] = str(arf.master_node_host_type)
+ val['master_node_host_bare_metal_shape'] = str(arf.master_node_host_bare_metal_shape)
+ val['master_node_host_ocpu_count'] = str(arf.master_node_host_ocpu_count)
+ val['master_node_host_memory_gb'] = str(arf.master_node_host_memory_gb)
+ val['data_node_count'] = str(arf.data_node_count)
+ val['data_node_host_type'] = str(arf.data_node_host_type)
+ val['data_node_host_bare_metal_shape'] = str(arf.data_node_host_bare_metal_shape)
+ val['data_node_host_ocpu_count'] = str(arf.data_node_host_ocpu_count)
+ val['data_node_host_memory_gb'] = str(arf.data_node_host_memory_gb)
+ val['data_node_storage_gb'] = str(arf.data_node_storage_gb)
+ val['opendashboard_node_count'] = str(arf.opendashboard_node_count)
+ val['opendashboard_node_host_ocpu_count'] = str(arf.opendashboard_node_host_ocpu_count)
+ val['opendashboard_node_host_memory_gb'] = str(arf.opendashboard_node_host_memory_gb)
+ val['vcn_id'] = str(arf.vcn_id)
+ val['vcn_name'] = self.get_network_vcn(arf.vcn_id)
+ val['subnet_id'] = self.get_network_subnet(arf.subnet_id, detailed=True)
+ val['vcn_compartment_id'] = str(arf.vcn_compartment_id)
+ val['subnet_compartment_id'] = str(arf.subnet_compartment_id)
+ val['security_master_user_name'] = str(arf.security_master_user_name)
+ val['security_master_user_password_hash'] = str(arf.security_master_user_password_hash)
+
+ except Exception as e:
+ self.__print_error("__load_paas_open_search", e)
+
+ # add the data
+ cnt += 1
+ data.append(val)
+
+ self.__load_print_cnt(cnt, start_time)
+ return data
+
+ except oci.exceptions.RequestException as e:
+ if self.__check_request_error(e):
+ return data
+ raise
+ except Exception as e:
+ self.__print_error("__load_paas_open_search", e)
+ return data
+
##########################################################################
# __load_paas_devops
##########################################################################
@@ -13573,11 +13979,6 @@ def __load_quotas(self, quotas_client, compartments):
# oci.cloud_guard.CloudGuardClient(config, **kwargs)
# oci.logging.LoggingManagementClient(config, **kwargs)
#
- # TBD
- # list_detector_recipes
- # list_responder_recipes
- # list_security_recipes
- # list_problems
##########################################################################
def __load_security_main(self):
@@ -13610,9 +14011,9 @@ def __load_security_main(self):
# append the data
sec[self.C_SECURITY_BASTION] += self.__load_security_bastions(bs_client, compartments)
- sec[self.C_SECURITY_CLOUD_GUARD] += self.__load_security_cloud_guard(cg_client, compartments)
sec[self.C_SECURITY_LOGGING] += self.__load_security_log_groups(log_client, compartments)
sec[self.C_SECURITY_VAULTS] += self.__load_security_kms_vaults(kms_client, compartments)
+ sec[self.C_SECURITY_CLOUD_GUARD] += self.__load_security_cloud_guard(cg_client, compartments)
print("")
@@ -13623,48 +14024,6 @@ def __load_security_main(self):
except Exception as e:
self.__print_error("__load_security_main", e)
- ##########################################################################
- # __load_security_scores_main
- ##########################################################################
- #
- # OCI Classes used:
- #
- # oci.cloud_guard.CloudGuardClient(config, **kwargs)
- ##########################################################################
- def __load_security_scores_main(self):
-
- try:
- print("Cloud Guard Scores...")
-
- # clients
- cg_client = oci.cloud_guard.CloudGuardClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
-
- if self.flags.proxy:
- cg_client.base_client.session.proxies = {'https': self.flags.proxy}
-
- # reference to compartments
- root_compartment = self.get_tenancy_id()
-
- # add the key if not exists
- self.__initialize_data_key(self.C_SECURITY_SCORES, self.C_SECURITY_SCORES_GUARD_SECURITY_SCORES)
- self.__initialize_data_key(self.C_SECURITY_SCORES, self.C_SECURITY_SCORES_GUARD_RISK_SCORES)
-
- # reference to paas
- sec = self.data[self.C_SECURITY_SCORES]
-
- # append the data
- sec[self.C_SECURITY_SCORES_GUARD_SECURITY_SCORES] += self.__load_security_cloud_guard_security_scores(cg_client, root_compartment)
- sec[self.C_SECURITY_SCORES_GUARD_RISK_SCORES] += self.__load_security_cloud_guard_risk_scores(cg_client, root_compartment)
-
- print("")
-
- except oci.exceptions.RequestException:
- raise
- except oci.exceptions.ServiceError:
- raise
- except Exception as e:
- self.__print_error("__load_security_scores_main", e)
-
##########################################################################
# __load_security_cloud_guard
##########################################################################
@@ -13707,30 +14066,89 @@ def __load_security_cloud_guard(self, cg_client, compartments):
# item = oci.cloud_guard.models.TargetSummary
for item in array:
- if self.check_lifecycle_state_active(item.lifecycle_state):
+ if not self.check_lifecycle_state_active(item.lifecycle_state):
+ continue
- val = {'id': str(item.id),
- 'display_name': str(item.display_name),
- 'target_resource_type': str(item.target_resource_type),
- 'target_resource_id': str(item.target_resource_id),
- 'recipe_count': str(item.recipe_count),
- 'time_created': str(item.time_created),
- 'time_updated': str(item.time_updated),
- 'lifecycle_state': str(item.lifecycle_state),
- 'lifecyle_details': str(item.lifecyle_details),
- 'sum_info': "Cloud Guard",
- 'sum_size_gb': str(1),
- 'system_tags': [] if item.system_tags is None else item.system_tags,
- 'defined_tags': [] if item.defined_tags is None else item.defined_tags,
- 'freeform_tags': [] if item.freeform_tags is None else item.freeform_tags,
- 'compartment_name': str(compartment['name']),
- 'compartment_path': str(compartment['path']),
- 'compartment_id': str(compartment['id']),
- 'region_name': str(self.config['region'])}
+ val = {
+ 'id': str(item.id),
+ 'display_name': str(item.display_name),
+ 'target_resource_type': str(item.target_resource_type),
+ 'target_resource_id': str(item.target_resource_id),
+ 'target_resource_name': "",
+ 'inherited_by_compartments': "",
+ 'inherited_by_compartments_names': "",
+ 'target_detector_recipes': [],
+ 'target_responder_recipes': [],
+ 'recipe_count': str(item.recipe_count),
+ 'time_created': str(item.time_created),
+ 'time_updated': str(item.time_updated),
+ 'lifecycle_state': str(item.lifecycle_state),
+ 'lifecyle_details': str(item.lifecyle_details),
+ 'sum_info': "Cloud Guard",
+ 'sum_size_gb': str(1),
+ 'system_tags': [] if item.system_tags is None else item.system_tags,
+ 'defined_tags': [] if item.defined_tags is None else item.defined_tags,
+ 'freeform_tags': [] if item.freeform_tags is None else item.freeform_tags,
+ 'compartment_name': str(compartment['name']),
+ 'compartment_path': str(compartment['path']),
+ 'compartment_id': str(compartment['id']),
+ 'region_name': str(self.config['region'])}
- # add the data
- cnt += 1
- data.append(val)
+ # target compartment name
+ target_arr = self.get_compartment_by_id(item.target_resource_id)
+ if target_arr:
+ val['target_resource_name'] = target_arr['name']
+
+ try:
+ # get the target with more info
+ itemfull = cg_client.get_target(
+ item.id,
+ retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
+ ).data
+
+ if itemfull.inherited_by_compartments:
+ incp = []
+ for cp in itemfull.inherited_by_compartments:
+ cpname = self.get_compartment_by_id(cp)
+ if cpname:
+ incp.append(cpname['name'])
+ val['inherited_by_compartments'] = str(','.join(y for y in itemfull.inherited_by_compartments))
+ val['inherited_by_compartments_names'] = str(','.join(y for y in incp))
+
+ # target_detector_recipes
+ val['target_detector_recipes'] = [{
+ 'id': str(arr.id),
+ 'display_name': str(arr.display_name),
+ 'description': str(arr.description),
+ 'compartment_id': str(arr.compartment_id),
+ 'detector_recipe_id': str(arr.detector_recipe_id),
+ 'owner': str(arr.owner),
+ 'detector': str(arr.detector),
+ 'effective_detector_rules': [y.detector_rule_id for y in arr.effective_detector_rules] if arr.effective_detector_rules else [],
+ 'time_created': str(arr.time_created),
+ 'time_updated': str(arr.time_updated),
+ 'lifecycle_state': str(arr.lifecycle_state),
+ 'source_data_retention': str(arr.source_data_retention)
+ } for arr in itemfull.target_detector_recipes] if itemfull.target_detector_recipes else []
+
+ # target_responder_recipes
+ val['target_responder_recipes'] = [{
+ 'id': str(arr.id),
+ 'responder_recipe_id': str(arr.responder_recipe_id),
+ 'compartment_id': str(arr.compartment_id),
+ 'display_name': str(arr.display_name),
+ 'description': str(arr.description),
+ 'owner': str(arr.owner),
+ 'time_created': str(arr.time_created),
+ 'time_updated': str(arr.time_updated),
+ 'effective_responder_rules': [y.responder_rule_id for y in arr.effective_responder_rules] if arr.effective_responder_rules else [],
+ } for arr in itemfull.target_responder_recipes] if itemfull.target_responder_recipes else []
+ except Exception as e:
+ self.__print_error("__load_security_cloud_guard", e)
+
+ # add the data
+ cnt += 1
+ data.append(val)
self.__load_print_cnt(cnt, start_time)
return data
@@ -13743,6 +14161,48 @@ def __load_security_cloud_guard(self, cg_client, compartments):
self.__print_error("__load_security_cloud_guard", e)
return data
+ ##########################################################################
+ # __load_security_scores_main
+ ##########################################################################
+ #
+ # OCI Classes used:
+ #
+ # oci.cloud_guard.CloudGuardClient(config, **kwargs)
+ ##########################################################################
+ def __load_security_scores_main(self):
+
+ try:
+ print("Cloud Guard Scores...")
+
+ # clients
+ cg_client = oci.cloud_guard.CloudGuardClient(self.config, signer=self.signer, timeout=(self.flags.connection_timeout, self.flags.read_timeout))
+
+ if self.flags.proxy:
+ cg_client.base_client.session.proxies = {'https': self.flags.proxy}
+
+ # reference to compartments
+ root_compartment = self.get_tenancy_id()
+
+ # add the key if not exists
+ self.__initialize_data_key(self.C_SECURITY_SCORES, self.C_SECURITY_SCORES_GUARD_SECURITY_SCORES)
+ self.__initialize_data_key(self.C_SECURITY_SCORES, self.C_SECURITY_SCORES_GUARD_RISK_SCORES)
+
+ # reference to paas
+ sec = self.data[self.C_SECURITY_SCORES]
+
+ # append the data
+ sec[self.C_SECURITY_SCORES_GUARD_SECURITY_SCORES] += self.__load_security_cloud_guard_security_scores(cg_client, root_compartment)
+ sec[self.C_SECURITY_SCORES_GUARD_RISK_SCORES] += self.__load_security_cloud_guard_risk_scores(cg_client, root_compartment)
+
+ print("")
+
+ except oci.exceptions.RequestException:
+ raise
+ except oci.exceptions.ServiceError:
+ raise
+ except Exception as e:
+ self.__print_error("__load_security_scores_main", e)
+
##########################################################################
# __load_security_kms_vaults
##########################################################################
@@ -14215,6 +14675,7 @@ class ShowOCIFlags(object):
# filter flags
filter_by_region = ""
+ filter_by_region_not = ""
filter_by_compartment = ""
filter_by_compartment_recursive = ""
filter_by_compartment_path = ""
diff --git a/examples/showoci/showoci_upgrade.sh b/examples/showoci/showoci_upgrade.sh
index 880c960761..690a2a3c16 100755
--- a/examples/showoci/showoci_upgrade.sh
+++ b/examples/showoci/showoci_upgrade.sh
@@ -58,7 +58,9 @@ download_file CHANGELOG.rst
download_file README.md
echo "Rename run_daily_report.sh to run_daily_report.sh.bak" | tee -a $LOG
-mv run_daily_report.sh run_daily_report.sh.bak
+if [ -f "${APPDIR}/run_daily_report.sh" ]; then
+ mv ${APPDIR}/run_daily_report.sh ${APPDIR}/run_daily_report.sh.bak
+fi
download_file run_daily_report.sh
###########################################
diff --git a/examples/usage_reports_to_adw/CHANGELOG.rst b/examples/usage_reports_to_adw/CHANGELOG.rst
index 4bb554472d..1754202910 100755
--- a/examples/usage_reports_to_adw/CHANGELOG.rst
+++ b/examples/usage_reports_to_adw/CHANGELOG.rst
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_.
+=====================
+23.03.2 - 2023.03.22
+=====================
+* Added OCI_RESOURCES Table populated from showoci
+
=====================
23.03.15 - 2023.03.15
=====================
diff --git a/examples/usage_reports_to_adw/step_by_step_howto.md b/examples/usage_reports_to_adw/step_by_step_howto.md
index 7ff9b29e64..cb90321b6b 100644
--- a/examples/usage_reports_to_adw/step_by_step_howto.md
+++ b/examples/usage_reports_to_adw/step_by_step_howto.md
@@ -417,6 +417,10 @@ Run on oci vm
bash -c "$(curl -L https://raw.githubusercontent.com/adizohar/showoci/master/showoci_upgrade.sh)"
```
+```
+mkdir -p ${HOME}/usage_reports_to_adw/cron
+```
+
### 9.2 Add read all-resources policy to allow showoci to extract data
Update the policy for the dynamic group of the host as below (inspect can be used instead but some information won't be exported)
diff --git a/examples/usage_reports_to_adw/usage2adw.py b/examples/usage_reports_to_adw/usage2adw.py
index e0014e359c..f93ca2704a 100644
--- a/examples/usage_reports_to_adw/usage2adw.py
+++ b/examples/usage_reports_to_adw/usage2adw.py
@@ -67,7 +67,7 @@
import time
-version = "23.03.15"
+version = "23.03.22"
usage_report_namespace = "bling"
work_report_dir = os.curdir + "/work_report_dir"
@@ -383,6 +383,42 @@ def check_database_table_structure_usage(connection, tenant_name):
raise Exception("\nError manipulating database at check_database_table_structure_usage() - " + str(e))
+##########################################################################
+# Check Resource Table Structure
+##########################################################################
+def check_database_table_structure_resource(connection):
+ try:
+ # open cursor
+ with connection.cursor() as cursor:
+
+ # check if OCI_USAGE table exist, if not create
+ sql = "select count(*) from user_tables where table_name = 'OCI_RESOURCES'"
+ cursor.execute(sql)
+ val, = cursor.fetchone()
+
+ # if table not exist, create it
+ if val == 0:
+ print(" Table OCI_RESOURCES was not exist, creating")
+ sql = """create table OCI_RESOURCES (
+ RESOURCE_ID VARCHAR2(200) NOT NULL,
+ RESOURCE_NAME VARCHAR2(1000),
+ SOURCE_TENANT VARCHAR2(100),
+ SOURCE_TABLE VARCHAR2(100),
+ LAST_LOADED DATE,
+ CONSTRAINT OCI_RESOURCES_PK PRIMARY KEY (RESOURCE_ID) USING INDEX)"""
+ cursor.execute(sql)
+ print(" Table OCI_RESOURCES created")
+ else:
+ print(" Table OCI_RESOURCES exist")
+
+ except oracledb.DatabaseError as e:
+ print("\nError manipulating database at check_database_table_structure_resource() - " + str(e) + "\n")
+ raise SystemExit
+
+ except Exception as e:
+ raise Exception("\nError manipulating database at check_database_table_structure_resource() - " + str(e))
+
+
##########################################################################
# Check Index Structure Usage to be created after the first load
##########################################################################
@@ -1877,6 +1913,7 @@ def main_process():
check_database_table_structure_cost(connection, cmd.tagspecial, cmd.tagspecial2, tenancy.name)
check_database_table_structure_price_list(connection, tenancy.name)
check_database_table_structure_load_status(connection)
+ check_database_table_structure_resource(connection)
###############################
# enable hints
@@ -1929,6 +1966,14 @@ def main_process():
usage_num += load_usage_file(connection, object_storage, object_file, max_usage_file_id, cmd, tenancy, compartments, index, total_files)
print("\n Total " + str(usage_num) + " Usage Files Loaded, conmpleted at " + get_current_date_time())
+ #############################
+ # Update oci_usage_stats if
+ # there were files
+ #############################
+ if usage_num > 0 or cmd.force:
+ update_usage_stats(connection, tenancy.name)
+ update_usage_reference(connection, cmd.tagspecial, cmd.tagspecial2, tenancy.name)
+
#############################
# Handle Cost Usage
#############################
@@ -1947,11 +1992,10 @@ def main_process():
check_database_index_structure_usage(connection)
check_database_index_structure_cost(connection)
- # Update oci_usage_stats and oci_cost_stats if there were files
- if usage_num > 0 or cmd.force:
- update_usage_stats(connection, tenancy.name)
- update_usage_reference(connection, cmd.tagspecial, cmd.tagspecial2, tenancy.name)
-
+ #############################
+ # Update oci_cost_stats if
+ # there were files
+ #############################
if cost_num > 0 or cmd.force:
update_cost_stats(connection, tenancy.name)
update_price_list(connection, tenancy.name)
diff --git a/src/oci/container_engine/models/__init__.py b/src/oci/container_engine/models/__init__.py
index 906bb85939..7269c88177 100644
--- a/src/oci/container_engine/models/__init__.py
+++ b/src/oci/container_engine/models/__init__.py
@@ -61,11 +61,14 @@
from .pod_configuration import PodConfiguration
from .pod_shape import PodShape
from .pod_shape_summary import PodShapeSummary
+from .preemptible_node_config_details import PreemptibleNodeConfigDetails
+from .preemption_action import PreemptionAction
from .service_lb_config_details import ServiceLbConfigDetails
from .shape_memory_options import ShapeMemoryOptions
from .shape_network_bandwidth_options import ShapeNetworkBandwidthOptions
from .shape_ocpu_options import ShapeOcpuOptions
from .taint import Taint
+from .terminate_preemption_action import TerminatePreemptionAction
from .update_addon_details import UpdateAddonDetails
from .update_cluster_details import UpdateClusterDetails
from .update_cluster_endpoint_config_details import UpdateClusterEndpointConfigDetails
@@ -146,11 +149,14 @@
"PodConfiguration": PodConfiguration,
"PodShape": PodShape,
"PodShapeSummary": PodShapeSummary,
+ "PreemptibleNodeConfigDetails": PreemptibleNodeConfigDetails,
+ "PreemptionAction": PreemptionAction,
"ServiceLbConfigDetails": ServiceLbConfigDetails,
"ShapeMemoryOptions": ShapeMemoryOptions,
"ShapeNetworkBandwidthOptions": ShapeNetworkBandwidthOptions,
"ShapeOcpuOptions": ShapeOcpuOptions,
"Taint": Taint,
+ "TerminatePreemptionAction": TerminatePreemptionAction,
"UpdateAddonDetails": UpdateAddonDetails,
"UpdateClusterDetails": UpdateClusterDetails,
"UpdateClusterEndpointConfigDetails": UpdateClusterEndpointConfigDetails,
diff --git a/src/oci/container_engine/models/node_pool_placement_config_details.py b/src/oci/container_engine/models/node_pool_placement_config_details.py
index 263e61198e..2f95690ff5 100644
--- a/src/oci/container_engine/models/node_pool_placement_config_details.py
+++ b/src/oci/container_engine/models/node_pool_placement_config_details.py
@@ -30,6 +30,10 @@ def __init__(self, **kwargs):
The value to assign to the capacity_reservation_id property of this NodePoolPlacementConfigDetails.
:type capacity_reservation_id: str
+ :param preemptible_node_config:
+ The value to assign to the preemptible_node_config property of this NodePoolPlacementConfigDetails.
+ :type preemptible_node_config: oci.container_engine.models.PreemptibleNodeConfigDetails
+
:param fault_domains:
The value to assign to the fault_domains property of this NodePoolPlacementConfigDetails.
:type fault_domains: list[str]
@@ -39,6 +43,7 @@ def __init__(self, **kwargs):
'availability_domain': 'str',
'subnet_id': 'str',
'capacity_reservation_id': 'str',
+ 'preemptible_node_config': 'PreemptibleNodeConfigDetails',
'fault_domains': 'list[str]'
}
@@ -46,12 +51,14 @@ def __init__(self, **kwargs):
'availability_domain': 'availabilityDomain',
'subnet_id': 'subnetId',
'capacity_reservation_id': 'capacityReservationId',
+ 'preemptible_node_config': 'preemptibleNodeConfig',
'fault_domains': 'faultDomains'
}
self._availability_domain = None
self._subnet_id = None
self._capacity_reservation_id = None
+ self._preemptible_node_config = None
self._fault_domains = None
@property
@@ -128,6 +135,26 @@ def capacity_reservation_id(self, capacity_reservation_id):
"""
self._capacity_reservation_id = capacity_reservation_id
+ @property
+ def preemptible_node_config(self):
+ """
+ Gets the preemptible_node_config of this NodePoolPlacementConfigDetails.
+
+ :return: The preemptible_node_config of this NodePoolPlacementConfigDetails.
+ :rtype: oci.container_engine.models.PreemptibleNodeConfigDetails
+ """
+ return self._preemptible_node_config
+
+ @preemptible_node_config.setter
+ def preemptible_node_config(self, preemptible_node_config):
+ """
+ Sets the preemptible_node_config of this NodePoolPlacementConfigDetails.
+
+ :param preemptible_node_config: The preemptible_node_config of this NodePoolPlacementConfigDetails.
+ :type: oci.container_engine.models.PreemptibleNodeConfigDetails
+ """
+ self._preemptible_node_config = preemptible_node_config
+
@property
def fault_domains(self):
"""
diff --git a/src/oci/container_engine/models/preemptible_node_config_details.py b/src/oci/container_engine/models/preemptible_node_config_details.py
new file mode 100644
index 0000000000..eb773ad144
--- /dev/null
+++ b/src/oci/container_engine/models/preemptible_node_config_details.py
@@ -0,0 +1,66 @@
+# coding: utf-8
+# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class PreemptibleNodeConfigDetails(object):
+ """
+ Configuration options for preemptible nodes.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new PreemptibleNodeConfigDetails object with values from keyword arguments.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param preemption_action:
+ The value to assign to the preemption_action property of this PreemptibleNodeConfigDetails.
+ :type preemption_action: oci.container_engine.models.PreemptionAction
+
+ """
+ self.swagger_types = {
+ 'preemption_action': 'PreemptionAction'
+ }
+
+ self.attribute_map = {
+ 'preemption_action': 'preemptionAction'
+ }
+
+ self._preemption_action = None
+
+ @property
+ def preemption_action(self):
+ """
+ **[Required]** Gets the preemption_action of this PreemptibleNodeConfigDetails.
+
+ :return: The preemption_action of this PreemptibleNodeConfigDetails.
+ :rtype: oci.container_engine.models.PreemptionAction
+ """
+ return self._preemption_action
+
+ @preemption_action.setter
+ def preemption_action(self, preemption_action):
+ """
+ Sets the preemption_action of this PreemptibleNodeConfigDetails.
+
+ :param preemption_action: The preemption_action of this PreemptibleNodeConfigDetails.
+ :type: oci.container_engine.models.PreemptionAction
+ """
+ self._preemption_action = preemption_action
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/container_engine/models/preemption_action.py b/src/oci/container_engine/models/preemption_action.py
new file mode 100644
index 0000000000..b2db96dff4
--- /dev/null
+++ b/src/oci/container_engine/models/preemption_action.py
@@ -0,0 +1,99 @@
+# coding: utf-8
+# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+
+
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class PreemptionAction(object):
+ """
+ The action to run when the preemptible node is interrupted for eviction.
+ """
+
+ #: A constant which can be used with the type property of a PreemptionAction.
+ #: This constant has a value of "TERMINATE"
+ TYPE_TERMINATE = "TERMINATE"
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new PreemptionAction object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
+ to a service operations then you should favor using a subclass over the base class:
+
+ * :class:`~oci.container_engine.models.TerminatePreemptionAction`
+
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param type:
+ The value to assign to the type property of this PreemptionAction.
+ Allowed values for this property are: "TERMINATE", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+ :type type: str
+
+ """
+ self.swagger_types = {
+ 'type': 'str'
+ }
+
+ self.attribute_map = {
+ 'type': 'type'
+ }
+
+ self._type = None
+
+ @staticmethod
+ def get_subtype(object_dictionary):
+ """
+ Given the hash representation of a subtype of this class,
+ use the info in the hash to return the class of the subtype.
+ """
+ type = object_dictionary['type']
+
+ if type == 'TERMINATE':
+ return 'TerminatePreemptionAction'
+ else:
+ return 'PreemptionAction'
+
+ @property
+ def type(self):
+ """
+ **[Required]** Gets the type of this PreemptionAction.
+ The type of action to run when the instance is interrupted for eviction.
+
+ Allowed values for this property are: "TERMINATE", 'UNKNOWN_ENUM_VALUE'.
+ Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
+
+
+ :return: The type of this PreemptionAction.
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """
+ Sets the type of this PreemptionAction.
+ The type of action to run when the instance is interrupted for eviction.
+
+
+ :param type: The type of this PreemptionAction.
+ :type: str
+ """
+ allowed_values = ["TERMINATE"]
+ if not value_allowed_none_or_none_sentinel(type, allowed_values):
+ type = 'UNKNOWN_ENUM_VALUE'
+ self._type = type
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/container_engine/models/terminate_preemption_action.py b/src/oci/container_engine/models/terminate_preemption_action.py
new file mode 100644
index 0000000000..a51a199f79
--- /dev/null
+++ b/src/oci/container_engine/models/terminate_preemption_action.py
@@ -0,0 +1,80 @@
+# coding: utf-8
+# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
+
+from .preemption_action import PreemptionAction
+from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401
+from oci.decorators import init_model_state_from_kwargs
+
+
+@init_model_state_from_kwargs
+class TerminatePreemptionAction(PreemptionAction):
+ """
+ Terminates the preemptible instance when it is interrupted for eviction.
+ """
+
+ def __init__(self, **kwargs):
+ """
+ Initializes a new TerminatePreemptionAction object with values from keyword arguments. The default value of the :py:attr:`~oci.container_engine.models.TerminatePreemptionAction.type` attribute
+ of this class is ``TERMINATE`` and it should not be changed.
+ The following keyword arguments are supported (corresponding to the getters/setters of this class):
+
+ :param type:
+ The value to assign to the type property of this TerminatePreemptionAction.
+ Allowed values for this property are: "TERMINATE"
+ :type type: str
+
+ :param is_preserve_boot_volume:
+ The value to assign to the is_preserve_boot_volume property of this TerminatePreemptionAction.
+ :type is_preserve_boot_volume: bool
+
+ """
+ self.swagger_types = {
+ 'type': 'str',
+ 'is_preserve_boot_volume': 'bool'
+ }
+
+ self.attribute_map = {
+ 'type': 'type',
+ 'is_preserve_boot_volume': 'isPreserveBootVolume'
+ }
+
+ self._type = None
+ self._is_preserve_boot_volume = None
+ self._type = 'TERMINATE'
+
+ @property
+ def is_preserve_boot_volume(self):
+ """
+ Gets the is_preserve_boot_volume of this TerminatePreemptionAction.
+ Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified.
+
+
+ :return: The is_preserve_boot_volume of this TerminatePreemptionAction.
+ :rtype: bool
+ """
+ return self._is_preserve_boot_volume
+
+ @is_preserve_boot_volume.setter
+ def is_preserve_boot_volume(self, is_preserve_boot_volume):
+ """
+ Sets the is_preserve_boot_volume of this TerminatePreemptionAction.
+ Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified.
+
+
+ :param is_preserve_boot_volume: The is_preserve_boot_volume of this TerminatePreemptionAction.
+ :type: bool
+ """
+ self._is_preserve_boot_volume = is_preserve_boot_volume
+
+ def __repr__(self):
+ return formatted_flat_dict(self)
+
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self == other
diff --git a/src/oci/load_balancer/models/forward_to_backend_set.py b/src/oci/load_balancer/models/forward_to_backend_set.py
index a089bcfbbb..b905000438 100644
--- a/src/oci/load_balancer/models/forward_to_backend_set.py
+++ b/src/oci/load_balancer/models/forward_to_backend_set.py
@@ -46,7 +46,7 @@ def __init__(self, **kwargs):
@property
def backend_set_name(self):
"""
- Gets the backend_set_name of this ForwardToBackendSet.
+ **[Required]** Gets the backend_set_name of this ForwardToBackendSet.
Name of the backend set the listener will forward the traffic to.
Example: `backendSetForImages`
diff --git a/src/oci/load_balancer/models/health_checker.py b/src/oci/load_balancer/models/health_checker.py
index 06750ac1e3..0eae267779 100644
--- a/src/oci/load_balancer/models/health_checker.py
+++ b/src/oci/load_balancer/models/health_checker.py
@@ -53,6 +53,10 @@ def __init__(self, **kwargs):
The value to assign to the response_body_regex property of this HealthChecker.
:type response_body_regex: str
+ :param is_force_plain_text:
+ The value to assign to the is_force_plain_text property of this HealthChecker.
+ :type is_force_plain_text: bool
+
"""
self.swagger_types = {
'protocol': 'str',
@@ -62,7 +66,8 @@ def __init__(self, **kwargs):
'retries': 'int',
'timeout_in_millis': 'int',
'interval_in_millis': 'int',
- 'response_body_regex': 'str'
+ 'response_body_regex': 'str',
+ 'is_force_plain_text': 'bool'
}
self.attribute_map = {
@@ -73,7 +78,8 @@ def __init__(self, **kwargs):
'retries': 'retries',
'timeout_in_millis': 'timeoutInMillis',
'interval_in_millis': 'intervalInMillis',
- 'response_body_regex': 'responseBodyRegex'
+ 'response_body_regex': 'responseBodyRegex',
+ 'is_force_plain_text': 'isForcePlainText'
}
self._protocol = None
@@ -84,6 +90,7 @@ def __init__(self, **kwargs):
self._timeout_in_millis = None
self._interval_in_millis = None
self._response_body_regex = None
+ self._is_force_plain_text = None
@property
def protocol(self):
@@ -317,6 +324,48 @@ def response_body_regex(self, response_body_regex):
"""
self._response_body_regex = response_body_regex
+ @property
+ def is_force_plain_text(self):
+ """
+ Gets the is_force_plain_text of this HealthChecker.
+ Specifies if health checks should always be done using plain text instead of depending on
+ whether or not the associated backend set is using SSL.
+
+ If \"true\", health checks will be done using plain text even if the associated backend set is configured
+ to use SSL.
+
+ If \"false\", health checks will be done using SSL encryption if the associated backend set is configured
+ to use SSL. If the backend set is not so configured the health checks will be done using plain text.
+
+ Example: `false`
+
+
+ :return: The is_force_plain_text of this HealthChecker.
+ :rtype: bool
+ """
+ return self._is_force_plain_text
+
+ @is_force_plain_text.setter
+ def is_force_plain_text(self, is_force_plain_text):
+ """
+ Sets the is_force_plain_text of this HealthChecker.
+ Specifies if health checks should always be done using plain text instead of depending on
+ whether or not the associated backend set is using SSL.
+
+ If \"true\", health checks will be done using plain text even if the associated backend set is configured
+ to use SSL.
+
+ If \"false\", health checks will be done using SSL encryption if the associated backend set is configured
+ to use SSL. If the backend set is not so configured the health checks will be done using plain text.
+
+ Example: `false`
+
+
+ :param is_force_plain_text: The is_force_plain_text of this HealthChecker.
+ :type: bool
+ """
+ self._is_force_plain_text = is_force_plain_text
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/load_balancer/models/health_checker_details.py b/src/oci/load_balancer/models/health_checker_details.py
index bcadf424a1..e443883531 100644
--- a/src/oci/load_balancer/models/health_checker_details.py
+++ b/src/oci/load_balancer/models/health_checker_details.py
@@ -50,6 +50,10 @@ def __init__(self, **kwargs):
The value to assign to the response_body_regex property of this HealthCheckerDetails.
:type response_body_regex: str
+ :param is_force_plain_text:
+ The value to assign to the is_force_plain_text property of this HealthCheckerDetails.
+ :type is_force_plain_text: bool
+
"""
self.swagger_types = {
'protocol': 'str',
@@ -59,7 +63,8 @@ def __init__(self, **kwargs):
'retries': 'int',
'timeout_in_millis': 'int',
'interval_in_millis': 'int',
- 'response_body_regex': 'str'
+ 'response_body_regex': 'str',
+ 'is_force_plain_text': 'bool'
}
self.attribute_map = {
@@ -70,7 +75,8 @@ def __init__(self, **kwargs):
'retries': 'retries',
'timeout_in_millis': 'timeoutInMillis',
'interval_in_millis': 'intervalInMillis',
- 'response_body_regex': 'responseBodyRegex'
+ 'response_body_regex': 'responseBodyRegex',
+ 'is_force_plain_text': 'isForcePlainText'
}
self._protocol = None
@@ -81,6 +87,7 @@ def __init__(self, **kwargs):
self._timeout_in_millis = None
self._interval_in_millis = None
self._response_body_regex = None
+ self._is_force_plain_text = None
@property
def protocol(self):
@@ -312,6 +319,48 @@ def response_body_regex(self, response_body_regex):
"""
self._response_body_regex = response_body_regex
+ @property
+ def is_force_plain_text(self):
+ """
+ Gets the is_force_plain_text of this HealthCheckerDetails.
+ Specifies if health checks should always be done using plain text instead of depending on
+ whether or not the associated backend set is using SSL.
+
+ If \"true\", health checks will be done using plain text even if the associated backend set is configured
+ to use SSL.
+
+ If \"false\", health checks will be done using SSL encryption if the associated backend set is configured
+ to use SSL. If the backend set is not so configured the health checks will be done using plain text.
+
+ Example: `false`
+
+
+ :return: The is_force_plain_text of this HealthCheckerDetails.
+ :rtype: bool
+ """
+ return self._is_force_plain_text
+
+ @is_force_plain_text.setter
+ def is_force_plain_text(self, is_force_plain_text):
+ """
+ Sets the is_force_plain_text of this HealthCheckerDetails.
+ Specifies if health checks should always be done using plain text instead of depending on
+ whether or not the associated backend set is using SSL.
+
+ If \"true\", health checks will be done using plain text even if the associated backend set is configured
+ to use SSL.
+
+ If \"false\", health checks will be done using SSL encryption if the associated backend set is configured
+ to use SSL. If the backend set is not so configured the health checks will be done using plain text.
+
+ Example: `false`
+
+
+ :param is_force_plain_text: The is_force_plain_text of this HealthCheckerDetails.
+ :type: bool
+ """
+ self._is_force_plain_text = is_force_plain_text
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/load_balancer/models/update_health_checker_details.py b/src/oci/load_balancer/models/update_health_checker_details.py
index 3a4ffafda5..909afd36f7 100644
--- a/src/oci/load_balancer/models/update_health_checker_details.py
+++ b/src/oci/load_balancer/models/update_health_checker_details.py
@@ -50,6 +50,10 @@ def __init__(self, **kwargs):
The value to assign to the response_body_regex property of this UpdateHealthCheckerDetails.
:type response_body_regex: str
+ :param is_force_plain_text:
+ The value to assign to the is_force_plain_text property of this UpdateHealthCheckerDetails.
+ :type is_force_plain_text: bool
+
"""
self.swagger_types = {
'protocol': 'str',
@@ -59,7 +63,8 @@ def __init__(self, **kwargs):
'retries': 'int',
'timeout_in_millis': 'int',
'interval_in_millis': 'int',
- 'response_body_regex': 'str'
+ 'response_body_regex': 'str',
+ 'is_force_plain_text': 'bool'
}
self.attribute_map = {
@@ -70,7 +75,8 @@ def __init__(self, **kwargs):
'retries': 'retries',
'timeout_in_millis': 'timeoutInMillis',
'interval_in_millis': 'intervalInMillis',
- 'response_body_regex': 'responseBodyRegex'
+ 'response_body_regex': 'responseBodyRegex',
+ 'is_force_plain_text': 'isForcePlainText'
}
self._protocol = None
@@ -81,6 +87,7 @@ def __init__(self, **kwargs):
self._timeout_in_millis = None
self._interval_in_millis = None
self._response_body_regex = None
+ self._is_force_plain_text = None
@property
def protocol(self):
@@ -310,6 +317,48 @@ def response_body_regex(self, response_body_regex):
"""
self._response_body_regex = response_body_regex
+ @property
+ def is_force_plain_text(self):
+ """
+ Gets the is_force_plain_text of this UpdateHealthCheckerDetails.
+ Specifies if health checks should always be done using plain text instead of depending on
+ whether or not the associated backend set is using SSL.
+
+ If \"true\", health checks will be done using plain text even if the associated backend set is configured
+ to use SSL.
+
+ If \"false\", health checks will be done using SSL encryption if the associated backend set is configured
+ to use SSL. If the backend set is not so configured the health checks will be done using plain text.
+
+ Example: `true`
+
+
+ :return: The is_force_plain_text of this UpdateHealthCheckerDetails.
+ :rtype: bool
+ """
+ return self._is_force_plain_text
+
+ @is_force_plain_text.setter
+ def is_force_plain_text(self, is_force_plain_text):
+ """
+ Sets the is_force_plain_text of this UpdateHealthCheckerDetails.
+ Specifies if health checks should always be done using plain text instead of depending on
+ whether or not the associated backend set is using SSL.
+
+ If \"true\", health checks will be done using plain text even if the associated backend set is configured
+ to use SSL.
+
+ If \"false\", health checks will be done using SSL encryption if the associated backend set is configured
+ to use SSL. If the backend set is not so configured the health checks will be done using plain text.
+
+ Example: `true`
+
+
+ :param is_force_plain_text: The is_force_plain_text of this UpdateHealthCheckerDetails.
+ :type: bool
+ """
+ self._is_force_plain_text = is_force_plain_text
+
def __repr__(self):
return formatted_flat_dict(self)
diff --git a/src/oci/mysql/models/update_db_system_details.py b/src/oci/mysql/models/update_db_system_details.py
index 167b5dd639..a0cec05023 100644
--- a/src/oci/mysql/models/update_db_system_details.py
+++ b/src/oci/mysql/models/update_db_system_details.py
@@ -516,8 +516,10 @@ def data_storage_size_in_gbs(self):
Expands the DB System's storage to the specified value. Only supports values larger than the current DB System's
storage size.
- DB Systems with initial storage of 400 GB or less can be expanded up to 32 TB. DB Systems with initial storage
- larger than 400 GB can be expanded up to 64 TB.
+ DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB.
+ DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB.
+ DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB.
+ DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB.
It is not possible to decrease data storage size.
@@ -534,8 +536,10 @@ def data_storage_size_in_gbs(self, data_storage_size_in_gbs):
Expands the DB System's storage to the specified value. Only supports values larger than the current DB System's
storage size.
- DB Systems with initial storage of 400 GB or less can be expanded up to 32 TB. DB Systems with initial storage
- larger than 400 GB can be expanded up to 64 TB.
+ DB Systems with an initial storage size of 400 GB or less can be expanded up to 32 TB.
+ DB Systems with an initial storage size between 401-800 GB can be expanded up to 64 TB.
+ DB Systems with an initial storage size between 801-1200 GB can be expanded up to 96 TB.
+ DB Systems with an initial storage size of 1201 GB or more can be expanded up to 128 TB.
It is not possible to decrease data storage size.
diff --git a/src/oci/version.py b/src/oci/version.py
index 45d66f51ca..ac5d29a776 100644
--- a/src/oci/version.py
+++ b/src/oci/version.py
@@ -2,4 +2,4 @@
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
-__version__ = "2.96.1"
+__version__ = "2.97.0"