diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 54f5b2e105..c44a0f948e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,18 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.96.1 - 2023-03-28 +==================== + +Added +----- +* Support for ACD and OKV wallet naming for autonomous databases and dedicated autonomous databases on Exadata Cloud at Customer in the Database service +* Support for validating the credentials of a connection in the DevOps service +* Support for GoldenGate Replicat performance profiles when creating a migration in the Database Migration service +* Support for connection diagnostics on registered databases in the Database Migration service +* Support for launching bare metal instances in an RDMA network in the Compute service + ==================== 2.96.0 - 2023-03-21 ==================== diff --git a/docs/api/core.rst b/docs/api/core.rst index d9d9126c29..733f69e00b 100644 --- a/docs/api/core.rst +++ b/docs/api/core.rst @@ -100,6 +100,7 @@ Core Services oci.core.models.ChangeCaptureFilterCompartmentDetails oci.core.models.ChangeClusterNetworkCompartmentDetails oci.core.models.ChangeComputeCapacityReservationCompartmentDetails + oci.core.models.ChangeComputeClusterCompartmentDetails oci.core.models.ChangeComputeImageCapabilitySchemaCompartmentDetails oci.core.models.ChangeCpeCompartmentDetails oci.core.models.ChangeCrossConnectCompartmentDetails @@ -131,6 +132,7 @@ Core Services oci.core.models.ChangeVolumeGroupBackupCompartmentDetails oci.core.models.ChangeVolumeGroupCompartmentDetails oci.core.models.ChangeVtapCompartmentDetails + oci.core.models.ClusterConfigDetails oci.core.models.ClusterNetwork oci.core.models.ClusterNetworkPlacementConfigurationDetails oci.core.models.ClusterNetworkSummary @@ -138,6 +140,9 @@ Core Services oci.core.models.ComputeCapacityReservation oci.core.models.ComputeCapacityReservationInstanceShapeSummary oci.core.models.ComputeCapacityReservationSummary + oci.core.models.ComputeCluster + oci.core.models.ComputeClusterCollection + oci.core.models.ComputeClusterSummary oci.core.models.ComputeGlobalImageCapabilitySchema oci.core.models.ComputeGlobalImageCapabilitySchemaSummary oci.core.models.ComputeGlobalImageCapabilitySchemaVersion @@ -165,6 +170,7 @@ Core Services oci.core.models.CreateClusterNetworkDetails oci.core.models.CreateClusterNetworkInstancePoolDetails oci.core.models.CreateComputeCapacityReservationDetails + oci.core.models.CreateComputeClusterDetails oci.core.models.CreateComputeImageCapabilitySchemaDetails oci.core.models.CreateCpeDetails oci.core.models.CreateCrossConnectDetails @@ -450,6 +456,7 @@ Core Services oci.core.models.UpdateClusterNetworkDetails oci.core.models.UpdateClusterNetworkInstancePoolDetails oci.core.models.UpdateComputeCapacityReservationDetails + oci.core.models.UpdateComputeClusterDetails oci.core.models.UpdateComputeImageCapabilitySchemaDetails oci.core.models.UpdateConsoleHistoryDetails oci.core.models.UpdateCpeDetails diff --git a/docs/api/core/models/oci.core.models.ChangeComputeClusterCompartmentDetails.rst b/docs/api/core/models/oci.core.models.ChangeComputeClusterCompartmentDetails.rst new file mode 100644 index 0000000000..9d2f63f93a --- /dev/null +++ b/docs/api/core/models/oci.core.models.ChangeComputeClusterCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeComputeClusterCompartmentDetails +====================================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ChangeComputeClusterCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.ClusterConfigDetails.rst b/docs/api/core/models/oci.core.models.ClusterConfigDetails.rst new file mode 100644 index 0000000000..20f5b7806f --- /dev/null +++ b/docs/api/core/models/oci.core.models.ClusterConfigDetails.rst @@ -0,0 +1,11 @@ +ClusterConfigDetails +==================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ClusterConfigDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.ComputeCluster.rst b/docs/api/core/models/oci.core.models.ComputeCluster.rst new file mode 100644 index 0000000000..d2f22efab6 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ComputeCluster.rst @@ -0,0 +1,11 @@ +ComputeCluster +============== + +.. currentmodule:: oci.core.models + +.. autoclass:: ComputeCluster + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.ComputeClusterCollection.rst b/docs/api/core/models/oci.core.models.ComputeClusterCollection.rst new file mode 100644 index 0000000000..27dc0117d9 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ComputeClusterCollection.rst @@ -0,0 +1,11 @@ +ComputeClusterCollection +======================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ComputeClusterCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.ComputeClusterSummary.rst b/docs/api/core/models/oci.core.models.ComputeClusterSummary.rst new file mode 100644 index 0000000000..eee0f760a8 --- /dev/null +++ b/docs/api/core/models/oci.core.models.ComputeClusterSummary.rst @@ -0,0 +1,11 @@ +ComputeClusterSummary +===================== + +.. currentmodule:: oci.core.models + +.. autoclass:: ComputeClusterSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.CreateComputeClusterDetails.rst b/docs/api/core/models/oci.core.models.CreateComputeClusterDetails.rst new file mode 100644 index 0000000000..1a822878ca --- /dev/null +++ b/docs/api/core/models/oci.core.models.CreateComputeClusterDetails.rst @@ -0,0 +1,11 @@ +CreateComputeClusterDetails +=========================== + +.. currentmodule:: oci.core.models + +.. autoclass:: CreateComputeClusterDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/core/models/oci.core.models.UpdateComputeClusterDetails.rst b/docs/api/core/models/oci.core.models.UpdateComputeClusterDetails.rst new file mode 100644 index 0000000000..bca20fb3b8 --- /dev/null +++ b/docs/api/core/models/oci.core.models.UpdateComputeClusterDetails.rst @@ -0,0 +1,11 @@ +UpdateComputeClusterDetails +=========================== + +.. currentmodule:: oci.core.models + +.. autoclass:: UpdateComputeClusterDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database_migration.rst b/docs/api/database_migration.rst index eecc30319e..437c6a9203 100644 --- a/docs/api/database_migration.rst +++ b/docs/api/database_migration.rst @@ -76,6 +76,7 @@ Database Migration oci.database_migration.models.DataTransferMediumDetails oci.database_migration.models.DatabaseLinkDetails oci.database_migration.models.DatabaseObject + oci.database_migration.models.DiagnosticsResult oci.database_migration.models.DirectoryObject oci.database_migration.models.DumpTransferDetails oci.database_migration.models.ExcludedObjectSummary @@ -111,6 +112,7 @@ Database Migration oci.database_migration.models.PhaseStatus oci.database_migration.models.PrivateEndpointDetails oci.database_migration.models.Replicat + oci.database_migration.models.ResultError oci.database_migration.models.ResumeJobDetails oci.database_migration.models.SshDetails oci.database_migration.models.StartMigrationDetails diff --git a/docs/api/database_migration/models/oci.database_migration.models.DiagnosticsResult.rst b/docs/api/database_migration/models/oci.database_migration.models.DiagnosticsResult.rst new file mode 100644 index 0000000000..b35cb852d8 --- /dev/null +++ b/docs/api/database_migration/models/oci.database_migration.models.DiagnosticsResult.rst @@ -0,0 +1,11 @@ +DiagnosticsResult +================= + +.. currentmodule:: oci.database_migration.models + +.. autoclass:: DiagnosticsResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/database_migration/models/oci.database_migration.models.ResultError.rst b/docs/api/database_migration/models/oci.database_migration.models.ResultError.rst new file mode 100644 index 0000000000..e4bdb428b3 --- /dev/null +++ b/docs/api/database_migration/models/oci.database_migration.models.ResultError.rst @@ -0,0 +1,11 @@ +ResultError +=========== + +.. currentmodule:: oci.database_migration.models + +.. autoclass:: ResultError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/devops.rst b/docs/api/devops.rst index cf1a2bce4d..715b0bd0f8 100644 --- a/docs/api/devops.rst +++ b/docs/api/devops.rst @@ -110,6 +110,7 @@ Devops oci.devops.models.Connection oci.devops.models.ConnectionCollection oci.devops.models.ConnectionSummary + oci.devops.models.ConnectionValidationResult oci.devops.models.ContainerConfig oci.devops.models.ContainerInstanceConfig oci.devops.models.ContainerRegistryDeliveredArtifact diff --git a/docs/api/devops/models/oci.devops.models.ConnectionValidationResult.rst b/docs/api/devops/models/oci.devops.models.ConnectionValidationResult.rst new file mode 100644 index 0000000000..3133f6abed --- /dev/null +++ b/docs/api/devops/models/oci.devops.models.ConnectionValidationResult.rst @@ -0,0 +1,11 @@ +ConnectionValidationResult +========================== + +.. currentmodule:: oci.devops.models + +.. autoclass:: ConnectionValidationResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/src/oci/core/compute_client.py b/src/oci/core/compute_client.py index 406e9550cb..cf5b8e7fb6 100644 --- a/src/oci/core/compute_client.py +++ b/src/oci/core/compute_client.py @@ -803,6 +803,130 @@ def change_compute_capacity_reservation_compartment(self, capacity_reservation_i operation_name=operation_name, api_reference_link=api_reference_link) + def change_compute_cluster_compartment(self, compute_cluster_id, change_compute_cluster_compartment_details, **kwargs): + """ + Moves a compute cluster into a different compartment within the same tenancy. + A compute cluster is a remote direct memory access (RDMA) network group. + + For information about moving resources between compartments, see + `Moving Resources to a Different Compartment`__. + + __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes + + + :param str compute_cluster_id: (required) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param oci.core.models.ChangeComputeClusterCompartmentDetails change_compute_cluster_compartment_details: (required) + The request to move the compute cluster to a different compartment. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations (for example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_compute_cluster_compartment API. + """ + resource_path = "/computeClusters/{computeClusterId}/actions/changeCompartment" + method = "POST" + operation_name = "change_compute_cluster_compartment" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/ChangeComputeClusterCompartment" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "change_compute_cluster_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "computeClusterId": compute_cluster_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_compute_cluster_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_compute_cluster_compartment_details, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + def change_compute_image_capability_schema_compartment(self, compute_image_capability_schema_id, change_compute_image_capability_schema_compartment_details, **kwargs): """ Moves a compute image capability schema into a different compartment within the same tenancy. @@ -1468,6 +1592,116 @@ def create_compute_capacity_reservation(self, create_compute_capacity_reservatio operation_name=operation_name, api_reference_link=api_reference_link) + def create_compute_cluster(self, create_compute_cluster_details, **kwargs): + """ + Creates an empty compute cluster, which is a remote direct memory access (RDMA) network group. + After the compute cluster is created, you can use the compute cluster's OCID with the + :func:`launch_instance` operation to create instances in the compute cluster. + For more information, see `Compute Clusters`__. + + To create a cluster network that uses intance pools to manage groups of identical instances, + see :func:`create_cluster_network`. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + + :param oci.core.models.CreateComputeClusterDetails create_compute_cluster_details: (required) + Details for creating a `compute cluster`__, which is a remote direct memory access (RDMA) network group. + When first created, the compute cluster is empty. + After the compute cluster is created, you can use the compute cluster's OCID with the :func:`launch_instance` + operation to create instances in the compute cluster. + Compute clusters allow you to manage instances in the cluster individually. + + For details about creating a cluster network that uses intance pools to manage groups of identical instances, + see :func:`create_cluster_network_details`. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations (for example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeCluster` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_compute_cluster API. + """ + resource_path = "/computeClusters" + method = "POST" + operation_name = "create_compute_cluster" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/CreateComputeCluster" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_compute_cluster got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_compute_cluster_details, + response_type="ComputeCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_compute_cluster_details, + response_type="ComputeCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + def create_compute_image_capability_schema(self, create_compute_image_capability_schema_details, **kwargs): """ Creates compute image capability schema. @@ -2047,6 +2281,110 @@ def delete_compute_capacity_reservation(self, capacity_reservation_id, **kwargs) operation_name=operation_name, api_reference_link=api_reference_link) + def delete_compute_cluster(self, compute_cluster_id, **kwargs): + """ + Deletes the compute cluster, which is a remote direct memory access (RDMA) network group. + To delete a compute cluster, all instances in the cluster must be deleted first. + + + :param str compute_cluster_id: (required) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_compute_cluster API. + """ + resource_path = "/computeClusters/{computeClusterId}" + method = "DELETE" + operation_name = "delete_compute_cluster" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/DeleteComputeCluster" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_compute_cluster got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "computeClusterId": compute_cluster_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + def delete_compute_image_capability_schema(self, compute_image_capability_schema_id, **kwargs): """ Deletes the specified Compute Image Capability Schema @@ -3317,10 +3655,108 @@ def get_compute_capacity_reservation(self, capacity_reservation_id, **kwargs): extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_compute_capacity_reservation got unknown kwargs: {!r}".format(extra_kwargs)) + "get_compute_capacity_reservation got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "capacityReservationId": capacity_reservation_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ComputeCapacityReservation", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ComputeCapacityReservation", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + + def get_compute_cluster(self, compute_cluster_id, **kwargs): + """ + Gets information about the specified compute cluster. + + + :param str compute_cluster_id: (required) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeCluster` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_compute_cluster API. + """ + resource_path = "/computeClusters/{computeClusterId}" + method = "GET" + operation_name = "get_compute_cluster" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/GetComputeCluster" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_compute_cluster got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "capacityReservationId": capacity_reservation_id + "computeClusterId": compute_cluster_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3351,7 +3787,7 @@ def get_compute_capacity_reservation(self, capacity_reservation_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ComputeCapacityReservation", + response_type="ComputeCluster", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) @@ -3361,7 +3797,7 @@ def get_compute_capacity_reservation(self, capacity_reservation_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - response_type="ComputeCapacityReservation", + response_type="ComputeCluster", allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) @@ -6046,6 +6482,167 @@ def list_compute_capacity_reservations(self, compartment_id, **kwargs): operation_name=operation_name, api_reference_link=api_reference_link) + def list_compute_clusters(self, compartment_id, **kwargs): + """ + Lists the compute clusters in the specified compartment. + A `compute cluster`__ is a remote direct memory access (RDMA) network group. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + + :param str compartment_id: (required) + The `OCID`__ of the compartment. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + :param str availability_domain: (optional) + The name of the availability domain. + + Example: `Uocm:PHX-AD-1` + + :param str display_name: (optional) + A filter to return only resources that match the given display name exactly. + + :param int limit: (optional) + For list pagination. The maximum number of results per page, or items to return in a paginated + \"List\" call. For important details about how pagination works, see + `List Pagination`__. + + Example: `50` + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The value of the `opc-next-page` response header from the previous \"List\" + call. For important details about how pagination works, see + `List Pagination`__. + + __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_by: (optional) + The field to sort by. You can provide one sort order (`sortOrder`). Default order for + TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + sort order is case sensitive. + + **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you + optionally filter by availability domain if the scope of the resource type is within a + single availability domain. If you call one of these \"List\" operations without specifying + an availability domain, the resources are grouped by availability domain, then sorted. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str sort_order: (optional) + The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + is case sensitive. + + Allowed values are: "ASC", "DESC" + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeClusterCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_compute_clusters API. + """ + resource_path = "/computeClusters" + method = "GET" + operation_name = "list_compute_clusters" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/ListComputeClusters" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "availability_domain", + "display_name", + "limit", + "page", + "sort_by", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_compute_clusters got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "availabilityDomain": kwargs.get("availability_domain", missing), + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ComputeClusterCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ComputeClusterCollection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + def list_compute_global_image_capability_schema_versions(self, compute_global_image_capability_schema_id, **kwargs): """ Lists Compute Global Image Capability Schema versions in the specified compartment. @@ -7887,6 +8484,14 @@ def list_instances(self, compartment_id, **kwargs): :param str capacity_reservation_id: (optional) The OCID of the compute capacity reservation. + :param str compute_cluster_id: (optional) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + :param str display_name: (optional) A filter to return only resources that match the given display name exactly. @@ -7959,6 +8564,7 @@ def list_instances(self, compartment_id, **kwargs): "retry_strategy", "availability_domain", "capacity_reservation_id", + "compute_cluster_id", "display_name", "limit", "page", @@ -7995,6 +8601,7 @@ def list_instances(self, compartment_id, **kwargs): query_params = { "availabilityDomain": kwargs.get("availability_domain", missing), "capacityReservationId": kwargs.get("capacity_reservation_id", missing), + "computeClusterId": kwargs.get("compute_cluster_id", missing), "compartmentId": compartment_id, "displayName": kwargs.get("display_name", missing), "limit": kwargs.get("limit", missing), @@ -8709,6 +9316,126 @@ def update_compute_capacity_reservation(self, capacity_reservation_id, update_co operation_name=operation_name, api_reference_link=api_reference_link) + def update_compute_cluster(self, compute_cluster_id, update_compute_cluster_details, **kwargs): + """ + Updates the specified compute cluster. + + + :param str compute_cluster_id: (required) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param oci.core.models.UpdateComputeClusterDetails update_compute_cluster_details: (required) + Details for updating the compute cluster. + + :param str opc_request_id: (optional) + Unique identifier for the request. + If you need to contact Oracle about a particular request, please provide the request ID. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations (for example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + parameter to the value of the etag from a previous GET or POST response for that resource. The resource + will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.core.models.ComputeCluster` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_compute_cluster API. + """ + resource_path = "/computeClusters/{computeClusterId}" + method = "PUT" + operation_name = "update_compute_cluster" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/ComputeCluster/UpdateComputeCluster" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "opc_retry_token", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_compute_cluster got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "computeClusterId": compute_cluster_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_compute_cluster_details, + response_type="ComputeCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_compute_cluster_details, + response_type="ComputeCluster", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + def update_compute_image_capability_schema(self, compute_image_capability_schema_id, update_compute_image_capability_schema_details, **kwargs): """ Updates the specified Compute Image Capability Schema diff --git a/src/oci/core/compute_client_composite_operations.py b/src/oci/core/compute_client_composite_operations.py index 8fddb1ea31..7869dd971f 100644 --- a/src/oci/core/compute_client_composite_operations.py +++ b/src/oci/core/compute_client_composite_operations.py @@ -397,6 +397,58 @@ def create_compute_capacity_reservation_and_wait_for_state(self, create_compute_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_compute_cluster_and_wait_for_state(self, create_compute_cluster_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeClient.create_compute_cluster` and waits for the :py:class:`~oci.core.models.ComputeCluster` acted upon + to enter the given state(s). + + :param oci.core.models.CreateComputeClusterDetails create_compute_cluster_details: (required) + Details for creating a `compute cluster`__, which is a remote direct memory access (RDMA) network group. + When first created, the compute cluster is empty. + After the compute cluster is created, you can use the compute cluster's OCID with the :func:`launch_instance` + operation to create instances in the compute cluster. + Compute clusters allow you to manage instances in the cluster individually. + + For details about creating a cluster network that uses intance pools to manage groups of identical instances, + see :func:`create_cluster_network_details`. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.ComputeCluster.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeClient.create_compute_cluster` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_compute_cluster(create_compute_cluster_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + compute_cluster_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_compute_cluster(compute_cluster_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def create_dedicated_vm_host_and_wait_for_work_request(self, create_dedicated_vm_host_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.ComputeClient.create_dedicated_vm_host` and waits for the oci.work_requests.models.WorkRequest @@ -631,6 +683,63 @@ def delete_compute_capacity_reservation_and_wait_for_work_request(self, capacity except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_compute_cluster_and_wait_for_state(self, compute_cluster_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeClient.delete_compute_cluster` and waits for the :py:class:`~oci.core.models.ComputeCluster` acted upon + to enter the given state(s). + + :param str compute_cluster_id: (required) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.ComputeCluster.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeClient.delete_compute_cluster` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_compute_cluster(compute_cluster_id) + operation_result = None + try: + operation_result = self.client.delete_compute_cluster(compute_cluster_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + waiter_result = oci.wait_until( + self.client, + initial_get_result, # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + succeed_on_not_found=True, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def delete_console_history_and_wait_for_state(self, instance_console_history_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.ComputeClient.delete_console_history` and waits for the :py:class:`~oci.core.models.ConsoleHistory` acted upon @@ -1288,6 +1397,57 @@ def update_compute_capacity_reservation_and_wait_for_work_request(self, capacity except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_compute_cluster_and_wait_for_state(self, compute_cluster_id, update_compute_cluster_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.core.ComputeClient.update_compute_cluster` and waits for the :py:class:`~oci.core.models.ComputeCluster` acted upon + to enter the given state(s). + + :param str compute_cluster_id: (required) + The `OCID`__ of the compute cluster. + A compute cluster is a remote direct memory access (RDMA) network group. + For more information, see `Compute Clusters`__. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + :param oci.core.models.UpdateComputeClusterDetails update_compute_cluster_details: (required) + Details for updating the compute cluster. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.core.models.ComputeCluster.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.core.ComputeClient.update_compute_cluster` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_compute_cluster(compute_cluster_id, update_compute_cluster_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + compute_cluster_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_compute_cluster(compute_cluster_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_console_history_and_wait_for_state(self, instance_console_history_id, update_console_history_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.core.ComputeClient.update_console_history` and waits for the :py:class:`~oci.core.models.ConsoleHistory` acted upon diff --git a/src/oci/core/models/__init__.py b/src/oci/core/models/__init__.py index 0604421794..c1ffd46d52 100644 --- a/src/oci/core/models/__init__.py +++ b/src/oci/core/models/__init__.py @@ -80,6 +80,7 @@ from .change_capture_filter_compartment_details import ChangeCaptureFilterCompartmentDetails from .change_cluster_network_compartment_details import ChangeClusterNetworkCompartmentDetails from .change_compute_capacity_reservation_compartment_details import ChangeComputeCapacityReservationCompartmentDetails +from .change_compute_cluster_compartment_details import ChangeComputeClusterCompartmentDetails from .change_compute_image_capability_schema_compartment_details import ChangeComputeImageCapabilitySchemaCompartmentDetails from .change_cpe_compartment_details import ChangeCpeCompartmentDetails from .change_cross_connect_compartment_details import ChangeCrossConnectCompartmentDetails @@ -111,6 +112,7 @@ from .change_volume_group_backup_compartment_details import ChangeVolumeGroupBackupCompartmentDetails from .change_volume_group_compartment_details import ChangeVolumeGroupCompartmentDetails from .change_vtap_compartment_details import ChangeVtapCompartmentDetails +from .cluster_config_details import ClusterConfigDetails from .cluster_network import ClusterNetwork from .cluster_network_placement_configuration_details import ClusterNetworkPlacementConfigurationDetails from .cluster_network_summary import ClusterNetworkSummary @@ -118,6 +120,9 @@ from .compute_capacity_reservation import ComputeCapacityReservation from .compute_capacity_reservation_instance_shape_summary import ComputeCapacityReservationInstanceShapeSummary from .compute_capacity_reservation_summary import ComputeCapacityReservationSummary +from .compute_cluster import ComputeCluster +from .compute_cluster_collection import ComputeClusterCollection +from .compute_cluster_summary import ComputeClusterSummary from .compute_global_image_capability_schema import ComputeGlobalImageCapabilitySchema from .compute_global_image_capability_schema_summary import ComputeGlobalImageCapabilitySchemaSummary from .compute_global_image_capability_schema_version import ComputeGlobalImageCapabilitySchemaVersion @@ -145,6 +150,7 @@ from .create_cluster_network_details import CreateClusterNetworkDetails from .create_cluster_network_instance_pool_details import CreateClusterNetworkInstancePoolDetails from .create_compute_capacity_reservation_details import CreateComputeCapacityReservationDetails +from .create_compute_cluster_details import CreateComputeClusterDetails from .create_compute_image_capability_schema_details import CreateComputeImageCapabilitySchemaDetails from .create_cpe_details import CreateCpeDetails from .create_cross_connect_details import CreateCrossConnectDetails @@ -430,6 +436,7 @@ from .update_cluster_network_details import UpdateClusterNetworkDetails from .update_cluster_network_instance_pool_details import UpdateClusterNetworkInstancePoolDetails from .update_compute_capacity_reservation_details import UpdateComputeCapacityReservationDetails +from .update_compute_cluster_details import UpdateComputeClusterDetails from .update_compute_image_capability_schema_details import UpdateComputeImageCapabilitySchemaDetails from .update_console_history_details import UpdateConsoleHistoryDetails from .update_cpe_details import UpdateCpeDetails @@ -607,6 +614,7 @@ "ChangeCaptureFilterCompartmentDetails": ChangeCaptureFilterCompartmentDetails, "ChangeClusterNetworkCompartmentDetails": ChangeClusterNetworkCompartmentDetails, "ChangeComputeCapacityReservationCompartmentDetails": ChangeComputeCapacityReservationCompartmentDetails, + "ChangeComputeClusterCompartmentDetails": ChangeComputeClusterCompartmentDetails, "ChangeComputeImageCapabilitySchemaCompartmentDetails": ChangeComputeImageCapabilitySchemaCompartmentDetails, "ChangeCpeCompartmentDetails": ChangeCpeCompartmentDetails, "ChangeCrossConnectCompartmentDetails": ChangeCrossConnectCompartmentDetails, @@ -638,6 +646,7 @@ "ChangeVolumeGroupBackupCompartmentDetails": ChangeVolumeGroupBackupCompartmentDetails, "ChangeVolumeGroupCompartmentDetails": ChangeVolumeGroupCompartmentDetails, "ChangeVtapCompartmentDetails": ChangeVtapCompartmentDetails, + "ClusterConfigDetails": ClusterConfigDetails, "ClusterNetwork": ClusterNetwork, "ClusterNetworkPlacementConfigurationDetails": ClusterNetworkPlacementConfigurationDetails, "ClusterNetworkSummary": ClusterNetworkSummary, @@ -645,6 +654,9 @@ "ComputeCapacityReservation": ComputeCapacityReservation, "ComputeCapacityReservationInstanceShapeSummary": ComputeCapacityReservationInstanceShapeSummary, "ComputeCapacityReservationSummary": ComputeCapacityReservationSummary, + "ComputeCluster": ComputeCluster, + "ComputeClusterCollection": ComputeClusterCollection, + "ComputeClusterSummary": ComputeClusterSummary, "ComputeGlobalImageCapabilitySchema": ComputeGlobalImageCapabilitySchema, "ComputeGlobalImageCapabilitySchemaSummary": ComputeGlobalImageCapabilitySchemaSummary, "ComputeGlobalImageCapabilitySchemaVersion": ComputeGlobalImageCapabilitySchemaVersion, @@ -672,6 +684,7 @@ "CreateClusterNetworkDetails": CreateClusterNetworkDetails, "CreateClusterNetworkInstancePoolDetails": CreateClusterNetworkInstancePoolDetails, "CreateComputeCapacityReservationDetails": CreateComputeCapacityReservationDetails, + "CreateComputeClusterDetails": CreateComputeClusterDetails, "CreateComputeImageCapabilitySchemaDetails": CreateComputeImageCapabilitySchemaDetails, "CreateCpeDetails": CreateCpeDetails, "CreateCrossConnectDetails": CreateCrossConnectDetails, @@ -957,6 +970,7 @@ "UpdateClusterNetworkDetails": UpdateClusterNetworkDetails, "UpdateClusterNetworkInstancePoolDetails": UpdateClusterNetworkInstancePoolDetails, "UpdateComputeCapacityReservationDetails": UpdateComputeCapacityReservationDetails, + "UpdateComputeClusterDetails": UpdateComputeClusterDetails, "UpdateComputeImageCapabilitySchemaDetails": UpdateComputeImageCapabilitySchemaDetails, "UpdateConsoleHistoryDetails": UpdateConsoleHistoryDetails, "UpdateCpeDetails": UpdateCpeDetails, diff --git a/src/oci/core/models/change_compute_cluster_compartment_details.py b/src/oci/core/models/change_compute_cluster_compartment_details.py new file mode 100644 index 0000000000..ee6b133297 --- /dev/null +++ b/src/oci/core/models/change_compute_cluster_compartment_details.py @@ -0,0 +1,76 @@ +# 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 ChangeComputeClusterCompartmentDetails(object): + """ + The configuration details for the compartment to move the compute cluster to. A `compute cluster`__ is a remote direct memory access (RDMA) network group. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeComputeClusterCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeComputeClusterCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeComputeClusterCompartmentDetails. + The `OCID`__ of the compartment to move the compute cluster to. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeComputeClusterCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeComputeClusterCompartmentDetails. + The `OCID`__ of the compartment to move the compute cluster to. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeComputeClusterCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + 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/core/models/cluster_config_details.py b/src/oci/core/models/cluster_config_details.py new file mode 100644 index 0000000000..a7c12c4f6e --- /dev/null +++ b/src/oci/core/models/cluster_config_details.py @@ -0,0 +1,110 @@ +# 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 ClusterConfigDetails(object): + """ + The HPC cluster configuration requested when launching instances in a compute capacity reservation. + + If the parameter is provided, the reservation is created with the HPC island and a list of HPC blocks that you + specify. If a list of HPC blocks are missing or not provided, the reservation is created with any HPC blocks in + the HPC island that you specify. If the values of HPC island or HPC block that you provide are not valid, an error + is returned. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ClusterConfigDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param hpc_island_id: + The value to assign to the hpc_island_id property of this ClusterConfigDetails. + :type hpc_island_id: str + + :param network_block_ids: + The value to assign to the network_block_ids property of this ClusterConfigDetails. + :type network_block_ids: list[str] + + """ + self.swagger_types = { + 'hpc_island_id': 'str', + 'network_block_ids': 'list[str]' + } + + self.attribute_map = { + 'hpc_island_id': 'hpcIslandId', + 'network_block_ids': 'networkBlockIds' + } + + self._hpc_island_id = None + self._network_block_ids = None + + @property + def hpc_island_id(self): + """ + **[Required]** Gets the hpc_island_id of this ClusterConfigDetails. + The `OCID`__ of the HpcIsland. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The hpc_island_id of this ClusterConfigDetails. + :rtype: str + """ + return self._hpc_island_id + + @hpc_island_id.setter + def hpc_island_id(self, hpc_island_id): + """ + Sets the hpc_island_id of this ClusterConfigDetails. + The `OCID`__ of the HpcIsland. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param hpc_island_id: The hpc_island_id of this ClusterConfigDetails. + :type: str + """ + self._hpc_island_id = hpc_island_id + + @property + def network_block_ids(self): + """ + Gets the network_block_ids of this ClusterConfigDetails. + The list of OCID of the network blocks. + + + :return: The network_block_ids of this ClusterConfigDetails. + :rtype: list[str] + """ + return self._network_block_ids + + @network_block_ids.setter + def network_block_ids(self, network_block_ids): + """ + Sets the network_block_ids of this ClusterConfigDetails. + The list of OCID of the network blocks. + + + :param network_block_ids: The network_block_ids of this ClusterConfigDetails. + :type: list[str] + """ + self._network_block_ids = network_block_ids + + 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/core/models/cluster_network.py b/src/oci/core/models/cluster_network.py index 6b0d3562d8..8eb4a93c56 100644 --- a/src/oci/core/models/cluster_network.py +++ b/src/oci/core/models/cluster_network.py @@ -62,6 +62,14 @@ def __init__(self, **kwargs): The value to assign to the compartment_id property of this ClusterNetwork. :type compartment_id: str + :param hpc_island_id: + The value to assign to the hpc_island_id property of this ClusterNetwork. + :type hpc_island_id: str + + :param network_block_ids: + The value to assign to the network_block_ids property of this ClusterNetwork. + :type network_block_ids: list[str] + :param defined_tags: The value to assign to the defined_tags property of this ClusterNetwork. :type defined_tags: dict(str, dict(str, object)) @@ -100,6 +108,8 @@ def __init__(self, **kwargs): self.swagger_types = { 'id': 'str', 'compartment_id': 'str', + 'hpc_island_id': 'str', + 'network_block_ids': 'list[str]', 'defined_tags': 'dict(str, dict(str, object))', 'display_name': 'str', 'freeform_tags': 'dict(str, str)', @@ -113,6 +123,8 @@ def __init__(self, **kwargs): self.attribute_map = { 'id': 'id', 'compartment_id': 'compartmentId', + 'hpc_island_id': 'hpcIslandId', + 'network_block_ids': 'networkBlockIds', 'defined_tags': 'definedTags', 'display_name': 'displayName', 'freeform_tags': 'freeformTags', @@ -125,6 +137,8 @@ def __init__(self, **kwargs): self._id = None self._compartment_id = None + self._hpc_island_id = None + self._network_block_ids = None self._defined_tags = None self._display_name = None self._freeform_tags = None @@ -190,6 +204,58 @@ def compartment_id(self, compartment_id): """ self._compartment_id = compartment_id + @property + def hpc_island_id(self): + """ + Gets the hpc_island_id of this ClusterNetwork. + The `OCID`__ of the hpc island used by the cluster network. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The hpc_island_id of this ClusterNetwork. + :rtype: str + """ + return self._hpc_island_id + + @hpc_island_id.setter + def hpc_island_id(self, hpc_island_id): + """ + Sets the hpc_island_id of this ClusterNetwork. + The `OCID`__ of the hpc island used by the cluster network. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param hpc_island_id: The hpc_island_id of this ClusterNetwork. + :type: str + """ + self._hpc_island_id = hpc_island_id + + @property + def network_block_ids(self): + """ + Gets the network_block_ids of this ClusterNetwork. + The list of network block OCIDs of the HPC island. + + + :return: The network_block_ids of this ClusterNetwork. + :rtype: list[str] + """ + return self._network_block_ids + + @network_block_ids.setter + def network_block_ids(self, network_block_ids): + """ + Sets the network_block_ids of this ClusterNetwork. + The list of network block OCIDs of the HPC island. + + + :param network_block_ids: The network_block_ids of this ClusterNetwork. + :type: list[str] + """ + self._network_block_ids = network_block_ids + @property def defined_tags(self): """ diff --git a/src/oci/core/models/compute_cluster.py b/src/oci/core/models/compute_cluster.py new file mode 100644 index 0000000000..4c27100f2b --- /dev/null +++ b/src/oci/core/models/compute_cluster.py @@ -0,0 +1,351 @@ +# 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 ComputeCluster(object): + """ + A remote direct memory access (RDMA) network group. Compute clusters are groups + of high performance computing (HPC) bare metal instances that are connected with an ultra low latency network. + Compute clusters allow you to manage instances in the cluster individually. + For more information, see `Compute Clusters`__. + + For details about cluster networks that use intance pools to manage groups of identical instances, + see :class:`ClusterNetwork`. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + """ + + #: A constant which can be used with the lifecycle_state property of a ComputeCluster. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ComputeCluster. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ComputeCluster object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this ComputeCluster. + :type availability_domain: str + + :param compartment_id: + The value to assign to the compartment_id property of this ComputeCluster. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this ComputeCluster. + :type display_name: str + + :param defined_tags: + The value to assign to the defined_tags property of this ComputeCluster. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this ComputeCluster. + :type freeform_tags: dict(str, str) + + :param id: + The value to assign to the id property of this ComputeCluster. + :type id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ComputeCluster. + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this ComputeCluster. + :type time_created: datetime + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags', + 'id': 'id', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated' + } + + self._availability_domain = None + self._compartment_id = None + self._display_name = None + self._defined_tags = None + self._freeform_tags = None + self._id = None + self._lifecycle_state = None + self._time_created = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this ComputeCluster. + The availability domain the compute cluster is running in. + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this ComputeCluster. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this ComputeCluster. + The availability domain the compute cluster is running in. + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this ComputeCluster. + :type: str + """ + self._availability_domain = availability_domain + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ComputeCluster. + The `OCID`__ of the compartment that contains this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ComputeCluster. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ComputeCluster. + The `OCID`__ of the compartment that contains this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ComputeCluster. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this ComputeCluster. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this ComputeCluster. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ComputeCluster. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this ComputeCluster. + :type: str + """ + self._display_name = display_name + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ComputeCluster. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ComputeCluster. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ComputeCluster. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ComputeCluster. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ComputeCluster. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ComputeCluster. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ComputeCluster. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ComputeCluster. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def id(self): + """ + **[Required]** Gets the id of this ComputeCluster. + The `OCID`__ of this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ComputeCluster. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ComputeCluster. + The `OCID`__ of this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ComputeCluster. + :type: str + """ + self._id = id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ComputeCluster. + The current state of the compute cluster. + + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ComputeCluster. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ComputeCluster. + The current state of the compute cluster. + + + :param lifecycle_state: The lifecycle_state of this ComputeCluster. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ComputeCluster. + The date and time the compute cluster was created, + in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ComputeCluster. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ComputeCluster. + The date and time the compute cluster was created, + in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ComputeCluster. + :type: datetime + """ + self._time_created = time_created + + 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/core/models/compute_cluster_collection.py b/src/oci/core/models/compute_cluster_collection.py new file mode 100644 index 0000000000..fb1599d949 --- /dev/null +++ b/src/oci/core/models/compute_cluster_collection.py @@ -0,0 +1,72 @@ +# 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 ComputeClusterCollection(object): + """ + A list of compute clusters that match filter criteria, if any. A `compute cluster`__ is a remote direct memory access (RDMA) network group. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + """ + + def __init__(self, **kwargs): + """ + Initializes a new ComputeClusterCollection object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param items: + The value to assign to the items property of this ComputeClusterCollection. + :type items: list[oci.core.models.ComputeClusterSummary] + + """ + self.swagger_types = { + 'items': 'list[ComputeClusterSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ComputeClusterCollection. + The list of compute clusters. + + + :return: The items of this ComputeClusterCollection. + :rtype: list[oci.core.models.ComputeClusterSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ComputeClusterCollection. + The list of compute clusters. + + + :param items: The items of this ComputeClusterCollection. + :type: list[oci.core.models.ComputeClusterSummary] + """ + self._items = items + + 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/core/models/compute_cluster_summary.py b/src/oci/core/models/compute_cluster_summary.py new file mode 100644 index 0000000000..5e6edc62c8 --- /dev/null +++ b/src/oci/core/models/compute_cluster_summary.py @@ -0,0 +1,329 @@ +# 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 ComputeClusterSummary(object): + """ + Summary information for a `compute cluster`__, which is a remote direct memory access (RDMA) network group. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + """ + + def __init__(self, **kwargs): + """ + Initializes a new ComputeClusterSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this ComputeClusterSummary. + :type availability_domain: str + + :param compartment_id: + The value to assign to the compartment_id property of this ComputeClusterSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this ComputeClusterSummary. + :type display_name: str + + :param id: + The value to assign to the id property of this ComputeClusterSummary. + :type id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ComputeClusterSummary. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this ComputeClusterSummary. + :type time_created: datetime + + :param defined_tags: + The value to assign to the defined_tags property of this ComputeClusterSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this ComputeClusterSummary. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'id': 'id', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._availability_domain = None + self._compartment_id = None + self._display_name = None + self._id = None + self._lifecycle_state = None + self._time_created = None + self._defined_tags = None + self._freeform_tags = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this ComputeClusterSummary. + The availability domain the compute cluster is running in. + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this ComputeClusterSummary. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this ComputeClusterSummary. + The availability domain the compute cluster is running in. + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this ComputeClusterSummary. + :type: str + """ + self._availability_domain = availability_domain + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ComputeClusterSummary. + The `OCID`__ of the compartment that contains this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ComputeClusterSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ComputeClusterSummary. + The `OCID`__ of the compartment that contains this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ComputeClusterSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this ComputeClusterSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this ComputeClusterSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ComputeClusterSummary. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this ComputeClusterSummary. + :type: str + """ + self._display_name = display_name + + @property + def id(self): + """ + **[Required]** Gets the id of this ComputeClusterSummary. + The `OCID`__ of this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The id of this ComputeClusterSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ComputeClusterSummary. + The `OCID`__ of this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param id: The id of this ComputeClusterSummary. + :type: str + """ + self._id = id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ComputeClusterSummary. + The current state of the compute cluster. + + + :return: The lifecycle_state of this ComputeClusterSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ComputeClusterSummary. + The current state of the compute cluster. + + + :param lifecycle_state: The lifecycle_state of this ComputeClusterSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ComputeClusterSummary. + The date and time the compute cluster was created, + in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this ComputeClusterSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ComputeClusterSummary. + The date and time the compute cluster was created, + in the format defined by `RFC3339`__. + Example: `2016-08-25T21:10:29.600Z` + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this ComputeClusterSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ComputeClusterSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ComputeClusterSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ComputeClusterSummary. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ComputeClusterSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ComputeClusterSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ComputeClusterSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ComputeClusterSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ComputeClusterSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/core/models/create_compute_cluster_details.py b/src/oci/core/models/create_compute_cluster_details.py new file mode 100644 index 0000000000..52341d040a --- /dev/null +++ b/src/oci/core/models/create_compute_cluster_details.py @@ -0,0 +1,231 @@ +# 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 CreateComputeClusterDetails(object): + """ + The data for creating a compute cluster, which is an empty remote direct memory access (RDMA) network group. + After the compute cluster is created, you can use the compute cluster's OCID with the + :func:`launch_instance` operation to create instances in the compute cluster. + Compute clusters allow you to manage instances in the cluster individually. + For more information, see `Compute Clusters`__. + + For details about creating a cluster network that uses intance pools to manage groups of identical instances, + see :func:`create_cluster_network_details`. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateComputeClusterDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param availability_domain: + The value to assign to the availability_domain property of this CreateComputeClusterDetails. + :type availability_domain: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateComputeClusterDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateComputeClusterDetails. + :type display_name: str + + :param defined_tags: + The value to assign to the defined_tags property of this CreateComputeClusterDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateComputeClusterDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'availability_domain': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._availability_domain = None + self._compartment_id = None + self._display_name = None + self._defined_tags = None + self._freeform_tags = None + + @property + def availability_domain(self): + """ + **[Required]** Gets the availability_domain of this CreateComputeClusterDetails. + The availability domain that the compute cluster is running in. + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this CreateComputeClusterDetails. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this CreateComputeClusterDetails. + The availability domain that the compute cluster is running in. + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this CreateComputeClusterDetails. + :type: str + """ + self._availability_domain = availability_domain + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateComputeClusterDetails. + The `OCID`__ of the compartment that contains this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateComputeClusterDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateComputeClusterDetails. + The `OCID`__ of the compartment that contains this compute cluster. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateComputeClusterDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateComputeClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this CreateComputeClusterDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateComputeClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this CreateComputeClusterDetails. + :type: str + """ + self._display_name = display_name + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateComputeClusterDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateComputeClusterDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateComputeClusterDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateComputeClusterDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateComputeClusterDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateComputeClusterDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateComputeClusterDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateComputeClusterDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/core/models/instance_reservation_config.py b/src/oci/core/models/instance_reservation_config.py index 9a86e0fe3a..9bf894dccf 100644 --- a/src/oci/core/models/instance_reservation_config.py +++ b/src/oci/core/models/instance_reservation_config.py @@ -22,6 +22,10 @@ def __init__(self, **kwargs): The value to assign to the fault_domain property of this InstanceReservationConfig. :type fault_domain: str + :param cluster_config: + The value to assign to the cluster_config property of this InstanceReservationConfig. + :type cluster_config: oci.core.models.ClusterConfigDetails + :param instance_shape: The value to assign to the instance_shape property of this InstanceReservationConfig. :type instance_shape: str @@ -41,6 +45,7 @@ def __init__(self, **kwargs): """ self.swagger_types = { 'fault_domain': 'str', + 'cluster_config': 'ClusterConfigDetails', 'instance_shape': 'str', 'instance_shape_config': 'InstanceReservationShapeConfigDetails', 'reserved_count': 'int', @@ -49,6 +54,7 @@ def __init__(self, **kwargs): self.attribute_map = { 'fault_domain': 'faultDomain', + 'cluster_config': 'clusterConfig', 'instance_shape': 'instanceShape', 'instance_shape_config': 'instanceShapeConfig', 'reserved_count': 'reservedCount', @@ -56,6 +62,7 @@ def __init__(self, **kwargs): } self._fault_domain = None + self._cluster_config = None self._instance_shape = None self._instance_shape_config = None self._reserved_count = None @@ -93,6 +100,26 @@ def fault_domain(self, fault_domain): """ self._fault_domain = fault_domain + @property + def cluster_config(self): + """ + Gets the cluster_config of this InstanceReservationConfig. + + :return: The cluster_config of this InstanceReservationConfig. + :rtype: oci.core.models.ClusterConfigDetails + """ + return self._cluster_config + + @cluster_config.setter + def cluster_config(self, cluster_config): + """ + Sets the cluster_config of this InstanceReservationConfig. + + :param cluster_config: The cluster_config of this InstanceReservationConfig. + :type: oci.core.models.ClusterConfigDetails + """ + self._cluster_config = cluster_config + @property def instance_shape(self): """ diff --git a/src/oci/core/models/instance_reservation_config_details.py b/src/oci/core/models/instance_reservation_config_details.py index bbe5320fd9..cdc5d23707 100644 --- a/src/oci/core/models/instance_reservation_config_details.py +++ b/src/oci/core/models/instance_reservation_config_details.py @@ -30,6 +30,10 @@ def __init__(self, **kwargs): The value to assign to the fault_domain property of this InstanceReservationConfigDetails. :type fault_domain: str + :param cluster_config: + The value to assign to the cluster_config property of this InstanceReservationConfigDetails. + :type cluster_config: oci.core.models.ClusterConfigDetails + :param reserved_count: The value to assign to the reserved_count property of this InstanceReservationConfigDetails. :type reserved_count: int @@ -39,6 +43,7 @@ def __init__(self, **kwargs): 'instance_shape': 'str', 'instance_shape_config': 'InstanceReservationShapeConfigDetails', 'fault_domain': 'str', + 'cluster_config': 'ClusterConfigDetails', 'reserved_count': 'int' } @@ -46,12 +51,14 @@ def __init__(self, **kwargs): 'instance_shape': 'instanceShape', 'instance_shape_config': 'instanceShapeConfig', 'fault_domain': 'faultDomain', + 'cluster_config': 'clusterConfig', 'reserved_count': 'reservedCount' } self._instance_shape = None self._instance_shape_config = None self._fault_domain = None + self._cluster_config = None self._reserved_count = None @property @@ -152,6 +159,26 @@ def fault_domain(self, fault_domain): """ self._fault_domain = fault_domain + @property + def cluster_config(self): + """ + Gets the cluster_config of this InstanceReservationConfigDetails. + + :return: The cluster_config of this InstanceReservationConfigDetails. + :rtype: oci.core.models.ClusterConfigDetails + """ + return self._cluster_config + + @cluster_config.setter + def cluster_config(self, cluster_config): + """ + Sets the cluster_config of this InstanceReservationConfigDetails. + + :param cluster_config: The cluster_config of this InstanceReservationConfigDetails. + :type: oci.core.models.ClusterConfigDetails + """ + self._cluster_config = cluster_config + @property def reserved_count(self): """ diff --git a/src/oci/core/models/launch_instance_details.py b/src/oci/core/models/launch_instance_details.py index 7935de2305..166877a574 100644 --- a/src/oci/core/models/launch_instance_details.py +++ b/src/oci/core/models/launch_instance_details.py @@ -59,6 +59,10 @@ def __init__(self, **kwargs): The value to assign to the freeform_tags property of this LaunchInstanceDetails. :type freeform_tags: dict(str, str) + :param compute_cluster_id: + The value to assign to the compute_cluster_id property of this LaunchInstanceDetails. + :type compute_cluster_id: str + :param hostname_label: The value to assign to the hostname_label property of this LaunchInstanceDetails. :type hostname_label: str @@ -131,6 +135,7 @@ def __init__(self, **kwargs): 'extended_metadata': 'dict(str, object)', 'fault_domain': 'str', 'freeform_tags': 'dict(str, str)', + 'compute_cluster_id': 'str', 'hostname_label': 'str', 'image_id': 'str', 'ipxe_script': 'str', @@ -159,6 +164,7 @@ def __init__(self, **kwargs): 'extended_metadata': 'extendedMetadata', 'fault_domain': 'faultDomain', 'freeform_tags': 'freeformTags', + 'compute_cluster_id': 'computeClusterId', 'hostname_label': 'hostnameLabel', 'image_id': 'imageId', 'ipxe_script': 'ipxeScript', @@ -186,6 +192,7 @@ def __init__(self, **kwargs): self._extended_metadata = None self._fault_domain = None self._freeform_tags = None + self._compute_cluster_id = None self._hostname_label = None self._image_id = None self._ipxe_script = None @@ -512,6 +519,36 @@ def freeform_tags(self, freeform_tags): """ self._freeform_tags = freeform_tags + @property + def compute_cluster_id(self): + """ + Gets the compute_cluster_id of this LaunchInstanceDetails. + The `OCID`__ of the `compute cluster`__ that the instance will be created in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + + :return: The compute_cluster_id of this LaunchInstanceDetails. + :rtype: str + """ + return self._compute_cluster_id + + @compute_cluster_id.setter + def compute_cluster_id(self, compute_cluster_id): + """ + Sets the compute_cluster_id of this LaunchInstanceDetails. + The `OCID`__ of the `compute cluster`__ that the instance will be created in. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + + + :param compute_cluster_id: The compute_cluster_id of this LaunchInstanceDetails. + :type: str + """ + self._compute_cluster_id = compute_cluster_id + @property def hostname_label(self): """ diff --git a/src/oci/core/models/update_compute_cluster_details.py b/src/oci/core/models/update_compute_cluster_details.py new file mode 100644 index 0000000000..59f695f85c --- /dev/null +++ b/src/oci/core/models/update_compute_cluster_details.py @@ -0,0 +1,156 @@ +# 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 UpdateComputeClusterDetails(object): + """ + The data to update a `compute cluster`__, which is a remote direct memory access (RDMA) network group. + + __ https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateComputeClusterDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateComputeClusterDetails. + :type display_name: str + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateComputeClusterDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateComputeClusterDetails. + :type freeform_tags: dict(str, str) + + """ + self.swagger_types = { + 'display_name': 'str', + 'defined_tags': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'defined_tags': 'definedTags', + 'freeform_tags': 'freeformTags' + } + + self._display_name = None + self._defined_tags = None + self._freeform_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateComputeClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :return: The display_name of this UpdateComputeClusterDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateComputeClusterDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. + + + :param display_name: The display_name of this UpdateComputeClusterDetails. + :type: str + """ + self._display_name = display_name + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateComputeClusterDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateComputeClusterDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateComputeClusterDetails. + Defined tags for this resource. Each key is predefined and scoped to a + namespace. For more information, see `Resource Tags`__. + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateComputeClusterDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateComputeClusterDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateComputeClusterDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateComputeClusterDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no + predefined name, type, or namespace. For more information, see `Resource Tags`__. + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateComputeClusterDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + 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/database/database_client.py b/src/oci/database/database_client.py index 5f274ce0d7..b32cf5efb4 100644 --- a/src/oci/database/database_client.py +++ b/src/oci/database/database_client.py @@ -21127,7 +21127,7 @@ def list_db_system_compute_performances(self, **kwargs): resource_path = "/dbSystemComputePerformance" method = "GET" operation_name = "list_db_system_compute_performances" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemComputePerformanceSummary/ListDbSystemComputePerformances" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystemComputePerformances" # Don't accept unknown kwargs expected_kwargs = [ @@ -21528,7 +21528,7 @@ def list_db_system_storage_performances(self, storage_management, **kwargs): resource_path = "/dbSystemStoragePerformance" method = "GET" operation_name = "list_db_system_storage_performances" - api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystemStoragePerformanceSummary/ListDbSystemStoragePerformances" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database/20160918/DbSystem/ListDbSystemStoragePerformances" # Don't accept unknown kwargs expected_kwargs = [ diff --git a/src/oci/database/models/autonomous_container_database.py b/src/oci/database/models/autonomous_container_database.py index 4a6e39ee50..c69b4b005c 100644 --- a/src/oci/database/models/autonomous_container_database.py +++ b/src/oci/database/models/autonomous_container_database.py @@ -150,6 +150,10 @@ def __init__(self, **kwargs): The value to assign to the db_unique_name property of this AutonomousContainerDatabase. :type db_unique_name: str + :param db_name: + The value to assign to the db_name property of this AutonomousContainerDatabase. + :type db_name: str + :param service_level_agreement_type: The value to assign to the service_level_agreement_type property of this AutonomousContainerDatabase. Allowed values for this property are: "STANDARD", "MISSION_CRITICAL", "AUTONOMOUS_DATAGUARD", 'UNKNOWN_ENUM_VALUE'. @@ -306,6 +310,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'display_name': 'str', 'db_unique_name': 'str', + 'db_name': 'str', 'service_level_agreement_type': 'str', 'autonomous_exadata_infrastructure_id': 'str', 'autonomous_vm_cluster_id': 'str', @@ -347,6 +352,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'display_name': 'displayName', 'db_unique_name': 'dbUniqueName', + 'db_name': 'dbName', 'service_level_agreement_type': 'serviceLevelAgreementType', 'autonomous_exadata_infrastructure_id': 'autonomousExadataInfrastructureId', 'autonomous_vm_cluster_id': 'autonomousVmClusterId', @@ -387,6 +393,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._display_name = None self._db_unique_name = None + self._db_name = None self._service_level_agreement_type = None self._autonomous_exadata_infrastructure_id = None self._autonomous_vm_cluster_id = None @@ -518,6 +525,30 @@ def db_unique_name(self, db_unique_name): """ self._db_unique_name = db_unique_name + @property + def db_name(self): + """ + Gets the db_name of this AutonomousContainerDatabase. + The database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, must start with an alphabetic character and followed by 1 to 7 alphanumeric characters. + + + :return: The db_name of this AutonomousContainerDatabase. + :rtype: str + """ + return self._db_name + + @db_name.setter + def db_name(self, db_name): + """ + Sets the db_name of this AutonomousContainerDatabase. + The database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, must start with an alphabetic character and followed by 1 to 7 alphanumeric characters. + + + :param db_name: The db_name of this AutonomousContainerDatabase. + :type: str + """ + self._db_name = db_name + @property def service_level_agreement_type(self): """ diff --git a/src/oci/database/models/autonomous_container_database_summary.py b/src/oci/database/models/autonomous_container_database_summary.py index 90d507fc16..5565e85b58 100644 --- a/src/oci/database/models/autonomous_container_database_summary.py +++ b/src/oci/database/models/autonomous_container_database_summary.py @@ -150,6 +150,10 @@ def __init__(self, **kwargs): The value to assign to the db_unique_name property of this AutonomousContainerDatabaseSummary. :type db_unique_name: str + :param db_name: + The value to assign to the db_name property of this AutonomousContainerDatabaseSummary. + :type db_name: str + :param service_level_agreement_type: The value to assign to the service_level_agreement_type property of this AutonomousContainerDatabaseSummary. Allowed values for this property are: "STANDARD", "MISSION_CRITICAL", "AUTONOMOUS_DATAGUARD", 'UNKNOWN_ENUM_VALUE'. @@ -306,6 +310,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'display_name': 'str', 'db_unique_name': 'str', + 'db_name': 'str', 'service_level_agreement_type': 'str', 'autonomous_exadata_infrastructure_id': 'str', 'autonomous_vm_cluster_id': 'str', @@ -347,6 +352,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'display_name': 'displayName', 'db_unique_name': 'dbUniqueName', + 'db_name': 'dbName', 'service_level_agreement_type': 'serviceLevelAgreementType', 'autonomous_exadata_infrastructure_id': 'autonomousExadataInfrastructureId', 'autonomous_vm_cluster_id': 'autonomousVmClusterId', @@ -387,6 +393,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._display_name = None self._db_unique_name = None + self._db_name = None self._service_level_agreement_type = None self._autonomous_exadata_infrastructure_id = None self._autonomous_vm_cluster_id = None @@ -518,6 +525,30 @@ def db_unique_name(self, db_unique_name): """ self._db_unique_name = db_unique_name + @property + def db_name(self): + """ + Gets the db_name of this AutonomousContainerDatabaseSummary. + The database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, must start with an alphabetic character and followed by 1 to 7 alphanumeric characters. + + + :return: The db_name of this AutonomousContainerDatabaseSummary. + :rtype: str + """ + return self._db_name + + @db_name.setter + def db_name(self, db_name): + """ + Sets the db_name of this AutonomousContainerDatabaseSummary. + The database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, must start with an alphabetic character and followed by 1 to 7 alphanumeric characters. + + + :param db_name: The db_name of this AutonomousContainerDatabaseSummary. + :type: str + """ + self._db_name = db_name + @property def service_level_agreement_type(self): """ diff --git a/src/oci/database/models/autonomous_data_warehouse.py b/src/oci/database/models/autonomous_data_warehouse.py index 191c3b6323..49efa91ca4 100644 --- a/src/oci/database/models/autonomous_data_warehouse.py +++ b/src/oci/database/models/autonomous_data_warehouse.py @@ -95,6 +95,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this AutonomousDataWarehouse. :type lifecycle_details: str + :param additional_database_status: + The value to assign to the additional_database_status property of this AutonomousDataWarehouse. + :type additional_database_status: list[str] + :param db_name: The value to assign to the db_name property of this AutonomousDataWarehouse. :type db_name: str @@ -146,6 +150,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'additional_database_status': 'list[str]', 'db_name': 'str', 'cpu_core_count': 'int', 'data_storage_size_in_tbs': 'int', @@ -164,6 +169,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'additional_database_status': 'additionalDatabaseStatus', 'db_name': 'dbName', 'cpu_core_count': 'cpuCoreCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', @@ -181,6 +187,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._lifecycle_state = None self._lifecycle_details = None + self._additional_database_status = None self._db_name = None self._cpu_core_count = None self._data_storage_size_in_tbs = None @@ -305,6 +312,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def additional_database_status(self): + """ + Gets the additional_database_status of this AutonomousDataWarehouse. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :return: The additional_database_status of this AutonomousDataWarehouse. + :rtype: list[str] + """ + return self._additional_database_status + + @additional_database_status.setter + def additional_database_status(self, additional_database_status): + """ + Sets the additional_database_status of this AutonomousDataWarehouse. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :param additional_database_status: The additional_database_status of this AutonomousDataWarehouse. + :type: list[str] + """ + self._additional_database_status = additional_database_status + @property def db_name(self): """ diff --git a/src/oci/database/models/autonomous_data_warehouse_summary.py b/src/oci/database/models/autonomous_data_warehouse_summary.py index 4de017f0e2..25d3a91fff 100644 --- a/src/oci/database/models/autonomous_data_warehouse_summary.py +++ b/src/oci/database/models/autonomous_data_warehouse_summary.py @@ -97,6 +97,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this AutonomousDataWarehouseSummary. :type lifecycle_details: str + :param additional_database_status: + The value to assign to the additional_database_status property of this AutonomousDataWarehouseSummary. + :type additional_database_status: list[str] + :param db_name: The value to assign to the db_name property of this AutonomousDataWarehouseSummary. :type db_name: str @@ -148,6 +152,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'additional_database_status': 'list[str]', 'db_name': 'str', 'cpu_core_count': 'int', 'data_storage_size_in_tbs': 'int', @@ -166,6 +171,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'additional_database_status': 'additionalDatabaseStatus', 'db_name': 'dbName', 'cpu_core_count': 'cpuCoreCount', 'data_storage_size_in_tbs': 'dataStorageSizeInTBs', @@ -183,6 +189,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._lifecycle_state = None self._lifecycle_details = None + self._additional_database_status = None self._db_name = None self._cpu_core_count = None self._data_storage_size_in_tbs = None @@ -307,6 +314,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def additional_database_status(self): + """ + Gets the additional_database_status of this AutonomousDataWarehouseSummary. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :return: The additional_database_status of this AutonomousDataWarehouseSummary. + :rtype: list[str] + """ + return self._additional_database_status + + @additional_database_status.setter + def additional_database_status(self, additional_database_status): + """ + Sets the additional_database_status of this AutonomousDataWarehouseSummary. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :param additional_database_status: The additional_database_status of this AutonomousDataWarehouseSummary. + :type: list[str] + """ + self._additional_database_status = additional_database_status + @property def db_name(self): """ diff --git a/src/oci/database/models/autonomous_database.py b/src/oci/database/models/autonomous_database.py index 645b8edcea..177c1ea3a8 100644 --- a/src/oci/database/models/autonomous_database.py +++ b/src/oci/database/models/autonomous_database.py @@ -312,6 +312,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this AutonomousDatabase. :type lifecycle_details: str + :param additional_database_status: + The value to assign to the additional_database_status property of this AutonomousDatabase. + :type additional_database_status: list[str] + :param kms_key_id: The value to assign to the kms_key_id property of this AutonomousDatabase. :type kms_key_id: str @@ -742,6 +746,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'additional_database_status': 'list[str]', 'kms_key_id': 'str', 'vault_id': 'str', 'kms_key_lifecycle_details': 'str', @@ -847,6 +852,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'additional_database_status': 'additionalDatabaseStatus', 'kms_key_id': 'kmsKeyId', 'vault_id': 'vaultId', 'kms_key_lifecycle_details': 'kmsKeyLifecycleDetails', @@ -951,6 +957,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._lifecycle_state = None self._lifecycle_details = None + self._additional_database_status = None self._kms_key_id = None self._vault_id = None self._kms_key_lifecycle_details = None @@ -1160,6 +1167,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def additional_database_status(self): + """ + Gets the additional_database_status of this AutonomousDatabase. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :return: The additional_database_status of this AutonomousDatabase. + :rtype: list[str] + """ + return self._additional_database_status + + @additional_database_status.setter + def additional_database_status(self, additional_database_status): + """ + Sets the additional_database_status of this AutonomousDatabase. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :param additional_database_status: The additional_database_status of this AutonomousDatabase. + :type: list[str] + """ + self._additional_database_status = additional_database_status + @property def kms_key_id(self): """ diff --git a/src/oci/database/models/autonomous_database_summary.py b/src/oci/database/models/autonomous_database_summary.py index b22c0c17fa..365d7331ad 100644 --- a/src/oci/database/models/autonomous_database_summary.py +++ b/src/oci/database/models/autonomous_database_summary.py @@ -314,6 +314,10 @@ def __init__(self, **kwargs): The value to assign to the lifecycle_details property of this AutonomousDatabaseSummary. :type lifecycle_details: str + :param additional_database_status: + The value to assign to the additional_database_status property of this AutonomousDatabaseSummary. + :type additional_database_status: list[str] + :param kms_key_id: The value to assign to the kms_key_id property of this AutonomousDatabaseSummary. :type kms_key_id: str @@ -744,6 +748,7 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'lifecycle_state': 'str', 'lifecycle_details': 'str', + 'additional_database_status': 'list[str]', 'kms_key_id': 'str', 'vault_id': 'str', 'kms_key_lifecycle_details': 'str', @@ -849,6 +854,7 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', + 'additional_database_status': 'additionalDatabaseStatus', 'kms_key_id': 'kmsKeyId', 'vault_id': 'vaultId', 'kms_key_lifecycle_details': 'kmsKeyLifecycleDetails', @@ -953,6 +959,7 @@ def __init__(self, **kwargs): self._compartment_id = None self._lifecycle_state = None self._lifecycle_details = None + self._additional_database_status = None self._kms_key_id = None self._vault_id = None self._kms_key_lifecycle_details = None @@ -1162,6 +1169,30 @@ def lifecycle_details(self, lifecycle_details): """ self._lifecycle_details = lifecycle_details + @property + def additional_database_status(self): + """ + Gets the additional_database_status of this AutonomousDatabaseSummary. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :return: The additional_database_status of this AutonomousDatabaseSummary. + :rtype: list[str] + """ + return self._additional_database_status + + @additional_database_status.setter + def additional_database_status(self, additional_database_status): + """ + Sets the additional_database_status of this AutonomousDatabaseSummary. + Additional details about the status of the database, such as the progress of a backup or restore operation. UNPUBLISHED \"HIDDEN\" FIELD. This field is being added to unblock console functionality but will not be published in the SDK or documentation. It will be present in responses, so deprecating will require coordination to ensure we do not break customers if they begin relying on this field. Please see https://confluence.oci.oraclecorp.com/pages/viewpage.action?pageId=58769459 for details regarding the motivation of this field and the longer term plan. + + + :param additional_database_status: The additional_database_status of this AutonomousDatabaseSummary. + :type: list[str] + """ + self._additional_database_status = additional_database_status + @property def kms_key_id(self): """ diff --git a/src/oci/database/models/create_autonomous_container_database_details.py b/src/oci/database/models/create_autonomous_container_database_details.py index 4e69bcc801..0c6725cbf0 100644 --- a/src/oci/database/models/create_autonomous_container_database_details.py +++ b/src/oci/database/models/create_autonomous_container_database_details.py @@ -58,6 +58,10 @@ def __init__(self, **kwargs): The value to assign to the db_unique_name property of this CreateAutonomousContainerDatabaseDetails. :type db_unique_name: str + :param db_name: + The value to assign to the db_name property of this CreateAutonomousContainerDatabaseDetails. + :type db_name: str + :param service_level_agreement_type: The value to assign to the service_level_agreement_type property of this CreateAutonomousContainerDatabaseDetails. Allowed values for this property are: "STANDARD", "AUTONOMOUS_DATAGUARD" @@ -174,6 +178,7 @@ def __init__(self, **kwargs): self.swagger_types = { 'display_name': 'str', 'db_unique_name': 'str', + 'db_name': 'str', 'service_level_agreement_type': 'str', 'autonomous_exadata_infrastructure_id': 'str', 'db_version': 'str', @@ -206,6 +211,7 @@ def __init__(self, **kwargs): self.attribute_map = { 'display_name': 'displayName', 'db_unique_name': 'dbUniqueName', + 'db_name': 'dbName', 'service_level_agreement_type': 'serviceLevelAgreementType', 'autonomous_exadata_infrastructure_id': 'autonomousExadataInfrastructureId', 'db_version': 'dbVersion', @@ -237,6 +243,7 @@ def __init__(self, **kwargs): self._display_name = None self._db_unique_name = None + self._db_name = None self._service_level_agreement_type = None self._autonomous_exadata_infrastructure_id = None self._db_version = None @@ -313,6 +320,30 @@ def db_unique_name(self, db_unique_name): """ self._db_unique_name = db_unique_name + @property + def db_name(self): + """ + Gets the db_name of this CreateAutonomousContainerDatabaseDetails. + The database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, must start with an alphabetic character and followed by 1 to 7 alphanumeric characters. + + + :return: The db_name of this CreateAutonomousContainerDatabaseDetails. + :rtype: str + """ + return self._db_name + + @db_name.setter + def db_name(self, db_name): + """ + Sets the db_name of this CreateAutonomousContainerDatabaseDetails. + The database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, must start with an alphabetic character and followed by 1 to 7 alphanumeric characters. + + + :param db_name: The db_name of this CreateAutonomousContainerDatabaseDetails. + :type: str + """ + self._db_name = db_name + @property def service_level_agreement_type(self): """ diff --git a/src/oci/database/models/db_system_shape_summary.py b/src/oci/database/models/db_system_shape_summary.py index 7f5e296e1f..0d1a7955bc 100644 --- a/src/oci/database/models/db_system_shape_summary.py +++ b/src/oci/database/models/db_system_shape_summary.py @@ -714,7 +714,7 @@ def maximum_node_count(self, maximum_node_count): def available_core_count_per_node(self): """ Gets the available_core_count_per_node of this DbSystemShapeSummary. - The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape, ExaCC Elastic shapes and VM Flex shapes. :return: The available_core_count_per_node of this DbSystemShapeSummary. @@ -726,7 +726,7 @@ def available_core_count_per_node(self): def available_core_count_per_node(self, available_core_count_per_node): """ Sets the available_core_count_per_node of this DbSystemShapeSummary. - The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape, ExaCC Elastic shapes and VM Flex shapes. :param available_core_count_per_node: The available_core_count_per_node of this DbSystemShapeSummary. diff --git a/src/oci/database_migration/database_migration_client.py b/src/oci/database_migration/database_migration_client.py index 1c33c5c3e5..4c5b2429a8 100644 --- a/src/oci/database_migration/database_migration_client.py +++ b/src/oci/database_migration/database_migration_client.py @@ -795,6 +795,120 @@ def clone_migration(self, migration_id, clone_migration_details, **kwargs): operation_name=operation_name, api_reference_link=api_reference_link) + def connection_diagnostics(self, connection_id, **kwargs): + """ + Perform connection test for a database connection. + + + :param str connection_id: (required) + The OCID of the database connection + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.database_migration.models.DiagnosticsResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use connection_diagnostics API. + """ + resource_path = "/connections/{connectionId}/actions/diagnostics" + method = "POST" + operation_name = "connection_diagnostics" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/database-migration/20210929/Connection/ConnectionDiagnostics" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "connection_diagnostics got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "connectionId": connection_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DiagnosticsResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DiagnosticsResult", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + def create_connection(self, create_connection_details, **kwargs): """ Create a Database Connection resource that contains the details to connect to either a Source or Target Database diff --git a/src/oci/database_migration/models/__init__.py b/src/oci/database_migration/models/__init__.py index 083dfa0b2a..3ac2bb941c 100644 --- a/src/oci/database_migration/models/__init__.py +++ b/src/oci/database_migration/models/__init__.py @@ -62,6 +62,7 @@ from .data_transfer_medium_details import DataTransferMediumDetails from .database_link_details import DatabaseLinkDetails from .database_object import DatabaseObject +from .diagnostics_result import DiagnosticsResult from .directory_object import DirectoryObject from .dump_transfer_details import DumpTransferDetails from .excluded_object_summary import ExcludedObjectSummary @@ -97,6 +98,7 @@ from .phase_status import PhaseStatus from .private_endpoint_details import PrivateEndpointDetails from .replicat import Replicat +from .result_error import ResultError from .resume_job_details import ResumeJobDetails from .ssh_details import SshDetails from .start_migration_details import StartMigrationDetails @@ -206,6 +208,7 @@ "DataTransferMediumDetails": DataTransferMediumDetails, "DatabaseLinkDetails": DatabaseLinkDetails, "DatabaseObject": DatabaseObject, + "DiagnosticsResult": DiagnosticsResult, "DirectoryObject": DirectoryObject, "DumpTransferDetails": DumpTransferDetails, "ExcludedObjectSummary": ExcludedObjectSummary, @@ -241,6 +244,7 @@ "PhaseStatus": PhaseStatus, "PrivateEndpointDetails": PrivateEndpointDetails, "Replicat": Replicat, + "ResultError": ResultError, "ResumeJobDetails": ResumeJobDetails, "SshDetails": SshDetails, "StartMigrationDetails": StartMigrationDetails, diff --git a/src/oci/database_migration/models/diagnostics_result.py b/src/oci/database_migration/models/diagnostics_result.py new file mode 100644 index 0000000000..f2df240684 --- /dev/null +++ b/src/oci/database_migration/models/diagnostics_result.py @@ -0,0 +1,117 @@ +# 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 DiagnosticsResult(object): + """ + Result from Database Connection Diagnostic action. + """ + + #: A constant which can be used with the result_type property of a DiagnosticsResult. + #: This constant has a value of "SUCCEEDED" + RESULT_TYPE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the result_type property of a DiagnosticsResult. + #: This constant has a value of "FAILED" + RESULT_TYPE_FAILED = "FAILED" + + #: A constant which can be used with the result_type property of a DiagnosticsResult. + #: This constant has a value of "TIMED_OUT" + RESULT_TYPE_TIMED_OUT = "TIMED_OUT" + + def __init__(self, **kwargs): + """ + Initializes a new DiagnosticsResult object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param result_type: + The value to assign to the result_type property of this DiagnosticsResult. + Allowed values for this property are: "SUCCEEDED", "FAILED", "TIMED_OUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type result_type: str + + :param error: + The value to assign to the error property of this DiagnosticsResult. + :type error: oci.database_migration.models.ResultError + + """ + self.swagger_types = { + 'result_type': 'str', + 'error': 'ResultError' + } + + self.attribute_map = { + 'result_type': 'resultType', + 'error': 'error' + } + + self._result_type = None + self._error = None + + @property + def result_type(self): + """ + **[Required]** Gets the result_type of this DiagnosticsResult. + Type of the Result (i.e. Success or Failure). + + Allowed values for this property are: "SUCCEEDED", "FAILED", "TIMED_OUT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The result_type of this DiagnosticsResult. + :rtype: str + """ + return self._result_type + + @result_type.setter + def result_type(self, result_type): + """ + Sets the result_type of this DiagnosticsResult. + Type of the Result (i.e. Success or Failure). + + + :param result_type: The result_type of this DiagnosticsResult. + :type: str + """ + allowed_values = ["SUCCEEDED", "FAILED", "TIMED_OUT"] + if not value_allowed_none_or_none_sentinel(result_type, allowed_values): + result_type = 'UNKNOWN_ENUM_VALUE' + self._result_type = result_type + + @property + def error(self): + """ + Gets the error of this DiagnosticsResult. + + :return: The error of this DiagnosticsResult. + :rtype: oci.database_migration.models.ResultError + """ + return self._error + + @error.setter + def error(self, error): + """ + Sets the error of this DiagnosticsResult. + + :param error: The error of this DiagnosticsResult. + :type: oci.database_migration.models.ResultError + """ + self._error = error + + 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/database_migration/models/result_error.py b/src/oci/database_migration/models/result_error.py new file mode 100644 index 0000000000..55cb3526ac --- /dev/null +++ b/src/oci/database_migration/models/result_error.py @@ -0,0 +1,163 @@ +# 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 ResultError(object): + """ + Error Information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ResultError object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param code: + The value to assign to the code property of this ResultError. + :type code: str + + :param message: + The value to assign to the message property of this ResultError. + :type message: str + + :param issue: + The value to assign to the issue property of this ResultError. + :type issue: str + + :param action: + The value to assign to the action property of this ResultError. + :type action: str + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str', + 'issue': 'str', + 'action': 'str' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message', + 'issue': 'issue', + 'action': 'action' + } + + self._code = None + self._message = None + self._issue = None + self._action = None + + @property + def code(self): + """ + **[Required]** Gets the code of this ResultError. + A short error code that defines the error, meant for programmatic parsing. + + + :return: The code of this ResultError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this ResultError. + A short error code that defines the error, meant for programmatic parsing. + + + :param code: The code of this ResultError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this ResultError. + A human-readable error string. + + + :return: The message of this ResultError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this ResultError. + A human-readable error string. + + + :param message: The message of this ResultError. + :type: str + """ + self._message = message + + @property + def issue(self): + """ + Gets the issue of this ResultError. + The text describing the root cause of the reported issue + + + :return: The issue of this ResultError. + :rtype: str + """ + return self._issue + + @issue.setter + def issue(self, issue): + """ + Sets the issue of this ResultError. + The text describing the root cause of the reported issue + + + :param issue: The issue of this ResultError. + :type: str + """ + self._issue = issue + + @property + def action(self): + """ + Gets the action of this ResultError. + The text describing the action required to fix the issue + + + :return: The action of this ResultError. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """ + Sets the action of this ResultError. + The text describing the action required to fix the issue + + + :param action: The action of this ResultError. + :type: str + """ + self._action = 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/devops/devops_client.py b/src/oci/devops/devops_client.py index da7dd19b54..ce01fa4c85 100644 --- a/src/oci/devops/devops_client.py +++ b/src/oci/devops/devops_client.py @@ -10014,3 +10014,108 @@ def update_trigger(self, trigger_id, update_trigger_details, **kwargs): allow_control_chars=kwargs.get('allow_control_chars'), operation_name=operation_name, api_reference_link=api_reference_link) + + def validate_connection(self, connection_id, **kwargs): + """ + Return whether the credentials of the connection are valid. + + + :param str connection_id: (required) + Unique connection identifier. + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :param bool allow_control_chars: (optional) + allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. + By default, the response will not allow control characters in strings + + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.devops.models.Connection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use validate_connection API. + """ + resource_path = "/connections/{connectionId}/actions/validate" + method = "POST" + operation_name = "validate_connection" + api_reference_link = "https://docs.oracle.com/iaas/api/#/en/devops/20210630/Connection/ValidateConnection" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "validate_connection got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "connectionId": connection_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + if retry_strategy is None: + retry_strategy = retry.DEFAULT_RETRY_STRATEGY + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Connection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Connection", + allow_control_chars=kwargs.get('allow_control_chars'), + operation_name=operation_name, + api_reference_link=api_reference_link) diff --git a/src/oci/devops/devops_client_composite_operations.py b/src/oci/devops/devops_client_composite_operations.py index 0ede97acc8..7595fa9baf 100644 --- a/src/oci/devops/devops_client_composite_operations.py +++ b/src/oci/devops/devops_client_composite_operations.py @@ -1836,3 +1836,46 @@ def update_trigger_and_wait_for_state(self, trigger_id, update_trigger_details, return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def validate_connection_and_wait_for_state(self, connection_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.devops.DevopsClient.validate_connection` and waits for the :py:class:`~oci.devops.models.Connection` acted upon + to enter the given state(s). + + :param str connection_id: (required) + Unique connection identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.devops.models.Connection.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.devops.DevopsClient.validate_connection` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.validate_connection(connection_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + connection_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_connection(connection_id), # noqa: F821 + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except (NameError, TypeError) as e: + if not e.args: + e.args = ('',) + e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', ) + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/devops/models/__init__.py b/src/oci/devops/models/__init__.py index 9fcae1381b..0470f904d5 100644 --- a/src/oci/devops/models/__init__.py +++ b/src/oci/devops/models/__init__.py @@ -96,6 +96,7 @@ from .connection import Connection from .connection_collection import ConnectionCollection from .connection_summary import ConnectionSummary +from .connection_validation_result import ConnectionValidationResult from .container_config import ContainerConfig from .container_instance_config import ContainerInstanceConfig from .container_registry_delivered_artifact import ContainerRegistryDeliveredArtifact @@ -547,6 +548,7 @@ "Connection": Connection, "ConnectionCollection": ConnectionCollection, "ConnectionSummary": ConnectionSummary, + "ConnectionValidationResult": ConnectionValidationResult, "ContainerConfig": ContainerConfig, "ContainerInstanceConfig": ContainerInstanceConfig, "ContainerRegistryDeliveredArtifact": ContainerRegistryDeliveredArtifact, diff --git a/src/oci/devops/models/bitbucket_cloud_app_password_connection.py b/src/oci/devops/models/bitbucket_cloud_app_password_connection.py index 5ab842d2fd..540a578034 100644 --- a/src/oci/devops/models/bitbucket_cloud_app_password_connection.py +++ b/src/oci/devops/models/bitbucket_cloud_app_password_connection.py @@ -53,6 +53,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this BitbucketCloudAppPasswordConnection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this BitbucketCloudAppPasswordConnection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this BitbucketCloudAppPasswordConnection. :type lifecycle_details: str @@ -92,6 +96,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -110,6 +115,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -127,6 +133,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/bitbucket_cloud_app_password_connection_summary.py b/src/oci/devops/models/bitbucket_cloud_app_password_connection_summary.py index b7bb05f203..20714bba9d 100644 --- a/src/oci/devops/models/bitbucket_cloud_app_password_connection_summary.py +++ b/src/oci/devops/models/bitbucket_cloud_app_password_connection_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this BitbucketCloudAppPasswordConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this BitbucketCloudAppPasswordConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this BitbucketCloudAppPasswordConnectionSummary. :type lifecycle_details: str @@ -90,6 +94,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -108,6 +113,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -125,6 +131,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/bitbucket_server_access_token_connection.py b/src/oci/devops/models/bitbucket_server_access_token_connection.py index f616689f82..33e15fe3a2 100644 --- a/src/oci/devops/models/bitbucket_server_access_token_connection.py +++ b/src/oci/devops/models/bitbucket_server_access_token_connection.py @@ -53,6 +53,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this BitbucketServerAccessTokenConnection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this BitbucketServerAccessTokenConnection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this BitbucketServerAccessTokenConnection. :type lifecycle_details: str @@ -96,6 +100,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -115,6 +120,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -133,6 +139,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/bitbucket_server_token_connection_summary.py b/src/oci/devops/models/bitbucket_server_token_connection_summary.py index 89e8c3e0b0..d43578d9c1 100644 --- a/src/oci/devops/models/bitbucket_server_token_connection_summary.py +++ b/src/oci/devops/models/bitbucket_server_token_connection_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this BitbucketServerTokenConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this BitbucketServerTokenConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this BitbucketServerTokenConnectionSummary. :type lifecycle_details: str @@ -94,6 +98,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -113,6 +118,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -131,6 +137,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/connection.py b/src/oci/devops/models/connection.py index 62d58d68a3..b4e1318887 100644 --- a/src/oci/devops/models/connection.py +++ b/src/oci/devops/models/connection.py @@ -93,6 +93,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this Connection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this Connection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this Connection. :type lifecycle_details: str @@ -125,6 +129,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -141,6 +146,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -156,6 +162,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None @@ -396,6 +403,26 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def last_connection_validation_result(self): + """ + Gets the last_connection_validation_result of this Connection. + + :return: The last_connection_validation_result of this Connection. + :rtype: oci.devops.models.ConnectionValidationResult + """ + return self._last_connection_validation_result + + @last_connection_validation_result.setter + def last_connection_validation_result(self, last_connection_validation_result): + """ + Sets the last_connection_validation_result of this Connection. + + :param last_connection_validation_result: The last_connection_validation_result of this Connection. + :type: oci.devops.models.ConnectionValidationResult + """ + self._last_connection_validation_result = last_connection_validation_result + @property def lifecycle_details(self): """ diff --git a/src/oci/devops/models/connection_summary.py b/src/oci/devops/models/connection_summary.py index 544ef4006b..e0c55e1730 100644 --- a/src/oci/devops/models/connection_summary.py +++ b/src/oci/devops/models/connection_summary.py @@ -59,6 +59,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this ConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this ConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this ConnectionSummary. :type lifecycle_details: str @@ -89,6 +93,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -105,6 +110,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -120,6 +126,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None @@ -354,6 +361,26 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def last_connection_validation_result(self): + """ + Gets the last_connection_validation_result of this ConnectionSummary. + + :return: The last_connection_validation_result of this ConnectionSummary. + :rtype: oci.devops.models.ConnectionValidationResult + """ + return self._last_connection_validation_result + + @last_connection_validation_result.setter + def last_connection_validation_result(self, last_connection_validation_result): + """ + Sets the last_connection_validation_result of this ConnectionSummary. + + :param last_connection_validation_result: The last_connection_validation_result of this ConnectionSummary. + :type: oci.devops.models.ConnectionValidationResult + """ + self._last_connection_validation_result = last_connection_validation_result + @property def lifecycle_details(self): """ diff --git a/src/oci/devops/models/connection_validation_result.py b/src/oci/devops/models/connection_validation_result.py new file mode 100644 index 0000000000..c91e5d7be0 --- /dev/null +++ b/src/oci/devops/models/connection_validation_result.py @@ -0,0 +1,152 @@ +# 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 ConnectionValidationResult(object): + """ + The result of validating the credentials of a connection. + """ + + #: A constant which can be used with the result property of a ConnectionValidationResult. + #: This constant has a value of "PASS" + RESULT_PASS = "PASS" + + #: A constant which can be used with the result property of a ConnectionValidationResult. + #: This constant has a value of "FAIL" + RESULT_FAIL = "FAIL" + + def __init__(self, **kwargs): + """ + Initializes a new ConnectionValidationResult object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param result: + The value to assign to the result property of this ConnectionValidationResult. + Allowed values for this property are: "PASS", "FAIL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type result: str + + :param time_validated: + The value to assign to the time_validated property of this ConnectionValidationResult. + :type time_validated: datetime + + :param message: + The value to assign to the message property of this ConnectionValidationResult. + :type message: str + + """ + self.swagger_types = { + 'result': 'str', + 'time_validated': 'datetime', + 'message': 'str' + } + + self.attribute_map = { + 'result': 'result', + 'time_validated': 'timeValidated', + 'message': 'message' + } + + self._result = None + self._time_validated = None + self._message = None + + @property + def result(self): + """ + Gets the result of this ConnectionValidationResult. + The latest result of whether the credentials pass the validation. + + Allowed values for this property are: "PASS", "FAIL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The result of this ConnectionValidationResult. + :rtype: str + """ + return self._result + + @result.setter + def result(self, result): + """ + Sets the result of this ConnectionValidationResult. + The latest result of whether the credentials pass the validation. + + + :param result: The result of this ConnectionValidationResult. + :type: str + """ + allowed_values = ["PASS", "FAIL"] + if not value_allowed_none_or_none_sentinel(result, allowed_values): + result = 'UNKNOWN_ENUM_VALUE' + self._result = result + + @property + def time_validated(self): + """ + Gets the time_validated of this ConnectionValidationResult. + The latest timestamp when the connection was validated. Format defined by `RFC3339`__. + + __ https://datatracker.ietf.org/doc/html/rfc3339 + + + :return: The time_validated of this ConnectionValidationResult. + :rtype: datetime + """ + return self._time_validated + + @time_validated.setter + def time_validated(self, time_validated): + """ + Sets the time_validated of this ConnectionValidationResult. + The latest timestamp when the connection was validated. Format defined by `RFC3339`__. + + __ https://datatracker.ietf.org/doc/html/rfc3339 + + + :param time_validated: The time_validated of this ConnectionValidationResult. + :type: datetime + """ + self._time_validated = time_validated + + @property + def message(self): + """ + Gets the message of this ConnectionValidationResult. + A message describing the result of connection validation in more detail. + + + :return: The message of this ConnectionValidationResult. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this ConnectionValidationResult. + A message describing the result of connection validation in more detail. + + + :param message: The message of this ConnectionValidationResult. + :type: str + """ + self._message = message + + 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/devops/models/github_access_token_connection.py b/src/oci/devops/models/github_access_token_connection.py index 87e64ce7ca..9697207ec4 100644 --- a/src/oci/devops/models/github_access_token_connection.py +++ b/src/oci/devops/models/github_access_token_connection.py @@ -53,6 +53,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this GithubAccessTokenConnection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this GithubAccessTokenConnection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this GithubAccessTokenConnection. :type lifecycle_details: str @@ -88,6 +92,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -105,6 +110,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -121,6 +127,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/github_access_token_connection_summary.py b/src/oci/devops/models/github_access_token_connection_summary.py index 3e3e8731c1..f9edb470e3 100644 --- a/src/oci/devops/models/github_access_token_connection_summary.py +++ b/src/oci/devops/models/github_access_token_connection_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this GithubAccessTokenConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this GithubAccessTokenConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this GithubAccessTokenConnectionSummary. :type lifecycle_details: str @@ -86,6 +90,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -103,6 +108,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -119,6 +125,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/gitlab_access_token_connection.py b/src/oci/devops/models/gitlab_access_token_connection.py index 395dc1476f..b840a6bb93 100644 --- a/src/oci/devops/models/gitlab_access_token_connection.py +++ b/src/oci/devops/models/gitlab_access_token_connection.py @@ -53,6 +53,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this GitlabAccessTokenConnection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this GitlabAccessTokenConnection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this GitlabAccessTokenConnection. :type lifecycle_details: str @@ -88,6 +92,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -105,6 +110,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -121,6 +127,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/gitlab_access_token_connection_summary.py b/src/oci/devops/models/gitlab_access_token_connection_summary.py index e643bfbb15..f2655c4a27 100644 --- a/src/oci/devops/models/gitlab_access_token_connection_summary.py +++ b/src/oci/devops/models/gitlab_access_token_connection_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this GitlabAccessTokenConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this GitlabAccessTokenConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this GitlabAccessTokenConnectionSummary. :type lifecycle_details: str @@ -86,6 +90,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -103,6 +108,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -119,6 +125,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/gitlab_server_access_token_connection.py b/src/oci/devops/models/gitlab_server_access_token_connection.py index b32a2d0787..fba3f6e6a0 100644 --- a/src/oci/devops/models/gitlab_server_access_token_connection.py +++ b/src/oci/devops/models/gitlab_server_access_token_connection.py @@ -54,6 +54,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this GitlabServerAccessTokenConnection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this GitlabServerAccessTokenConnection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this GitlabServerAccessTokenConnection. :type lifecycle_details: str @@ -97,6 +101,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -116,6 +121,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -134,6 +140,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/gitlab_server_access_token_connection_summary.py b/src/oci/devops/models/gitlab_server_access_token_connection_summary.py index ddccbef427..40974914e6 100644 --- a/src/oci/devops/models/gitlab_server_access_token_connection_summary.py +++ b/src/oci/devops/models/gitlab_server_access_token_connection_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this GitlabServerAccessTokenConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this GitlabServerAccessTokenConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this GitlabServerAccessTokenConnectionSummary. :type lifecycle_details: str @@ -94,6 +98,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -113,6 +118,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -131,6 +137,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/vbs_access_token_connection.py b/src/oci/devops/models/vbs_access_token_connection.py index f790621d36..54ed485d41 100644 --- a/src/oci/devops/models/vbs_access_token_connection.py +++ b/src/oci/devops/models/vbs_access_token_connection.py @@ -53,6 +53,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this VbsAccessTokenConnection. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this VbsAccessTokenConnection. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this VbsAccessTokenConnection. :type lifecycle_details: str @@ -92,6 +96,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -110,6 +115,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -127,6 +133,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/devops/models/vbs_access_token_connection_summary.py b/src/oci/devops/models/vbs_access_token_connection_summary.py index 5ea6c66459..5b759f9efc 100644 --- a/src/oci/devops/models/vbs_access_token_connection_summary.py +++ b/src/oci/devops/models/vbs_access_token_connection_summary.py @@ -52,6 +52,10 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this VbsAccessTokenConnectionSummary. :type time_updated: datetime + :param last_connection_validation_result: + The value to assign to the last_connection_validation_result property of this VbsAccessTokenConnectionSummary. + :type last_connection_validation_result: oci.devops.models.ConnectionValidationResult + :param lifecycle_details: The value to assign to the lifecycle_details property of this VbsAccessTokenConnectionSummary. :type lifecycle_details: str @@ -90,6 +94,7 @@ def __init__(self, **kwargs): 'connection_type': 'str', 'time_created': 'datetime', 'time_updated': 'datetime', + 'last_connection_validation_result': 'ConnectionValidationResult', 'lifecycle_details': 'str', 'lifecycle_state': 'str', 'freeform_tags': 'dict(str, str)', @@ -108,6 +113,7 @@ def __init__(self, **kwargs): 'connection_type': 'connectionType', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'last_connection_validation_result': 'lastConnectionValidationResult', 'lifecycle_details': 'lifecycleDetails', 'lifecycle_state': 'lifecycleState', 'freeform_tags': 'freeformTags', @@ -125,6 +131,7 @@ def __init__(self, **kwargs): self._connection_type = None self._time_created = None self._time_updated = None + self._last_connection_validation_result = None self._lifecycle_details = None self._lifecycle_state = None self._freeform_tags = None diff --git a/src/oci/version.py b/src/oci/version.py index a363486cf0..45d66f51ca 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.0" +__version__ = "2.96.1"