diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3c02074595..dfe7c81af3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +1.3.5 - 2017-07-20 +==================== + +Added +------- +* Support for VCN multi-VNIC operations. +* Support for VCN secondary IP operations. +* Support for compute image import/export operations. + ==================== 1.3.4 - 2017-06-16 ==================== diff --git a/src/oraclebmc/core/blockstorage_client.py b/src/oraclebmc/core/blockstorage_client.py index be118ff690..47b9562305 100644 --- a/src/oraclebmc/core/blockstorage_client.py +++ b/src/oraclebmc/core/blockstorage_client.py @@ -29,7 +29,8 @@ def __init__(self, config): def create_volume(self, create_volume_details, **kwargs): """ CreateVolume - Creates a new volume in the specified compartment. The size of a volume can be either 256 GB or 2 TB. + Creates a new volume in the specified compartment. Volumes can be created in sizes ranging from + 50 GB (51200 MB) to 2 TB (2097152 MB), in 1 GB (1024 MB) increments. By default, volumes are 1 TB (1048576 MB). For general information about block volumes, see `Overview of Block Volume Service`__. @@ -41,7 +42,7 @@ def create_volume(self, create_volume_details, **kwargs): in the Identity and Access Management Service API. You may optionally specify a *display name* for the volume, which is simply a friendly name or - description. It does not have to be unique, and you can change it. + description. It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm @@ -430,13 +431,14 @@ def update_volume(self, volume_id, update_volume_details, **kwargs): """ UpdateVolume Updates the specified volume's display name. + Avoid entering confidential information. :param str volume_id: (required) The OCID of the volume. :param UpdateVolumeDetails update_volume_details: (required) - Update volume's display name. + Update volume's display name. Avoid entering confidential information. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` @@ -482,6 +484,7 @@ def update_volume_backup(self, volume_backup_id, update_volume_backup_details, * """ UpdateVolumeBackup Updates the display name for the specified volume backup. + Avoid entering confidential information. :param str volume_backup_id: (required) diff --git a/src/oraclebmc/core/compute_client.py b/src/oraclebmc/core/compute_client.py index 56fbaa7742..7a1e1224cb 100644 --- a/src/oraclebmc/core/compute_client.py +++ b/src/oraclebmc/core/compute_client.py @@ -26,6 +26,55 @@ def __init__(self, config): ) self.base_client = BaseClient("compute", config, signer, core_type_mapping) + def attach_vnic(self, attach_vnic_details, **kwargs): + """ + AttachVnic + Creates a secondary VNIC and attaches it to the specified instance. + For more information about secondary VNICs, see + `Managing Virtual Network Interface Cards (VNICs)`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm + + + :param AttachVnicDetails attach_vnic_details: (required) + Attach VNIC details. + + :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 (e.g., if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VnicAttachment` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/vnicAttachments/" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "attach_vnic 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) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=attach_vnic_details, + response_type="VnicAttachment") + def attach_volume(self, attach_volume_details, **kwargs): """ AttachVolume @@ -135,16 +184,34 @@ def capture_console_history(self, capture_console_history_details, **kwargs): def create_image(self, create_image_details, **kwargs): """ CreateImage - Creates a boot disk image for the specified instance. For more information about images, see - `Managing Custom Images`__. + Creates a boot disk image for the specified instance or imports an exported image from the Oracle Bare Metal Cloud Object Storage Service. + + When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and + the OCID of the compartment containing that instance. For more information about images, + see `Managing Custom Images`__. + + When importing an exported image from the Object Storage Service, you specify the source information + in :func:`image_source_details`. + + When importing an image based on the namespace, bucket name, and object name, + use :func:`image_source_via_object_storage_tuple_details`. + + When importing an image based on the Object Storage Service URL, use + :func:`image_source_via_object_storage_uri_details`. + See `Object Storage URLs`__ and `pre-authenticated requests`__ + for constructing URLs for image import/export. - You must provide the OCID of the instance you want to use as the basis for the image, and - the OCID of the compartment containing that instance. + For more information about importing exported images, see + `Image Import/Export`__. You may optionally specify a *display name* for the image, which is simply a friendly name or description. It does not have to be unique, and you can change it. See :func:`update_image`. + Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm :param CreateImageDetails create_image_details: (required) @@ -280,6 +347,56 @@ def delete_image(self, image_id, **kwargs): path_params=path_params, header_params=header_params) + def detach_vnic(self, vnic_attachment_id, **kwargs): + """ + DetachVnic + Detaches and deletes the specified secondary VNIC. + This operation cannot be used on the instance's primary VNIC. + When you terminate an instance, all attached VNICs (primary + and secondary) are automatically detached and deleted. + + + :param str vnic_attachment_id: (required) + The OCID of the VNIC attachment. + + :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. + + :return: A :class:`~oraclebmc.response.Response` object with data of type None + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/vnicAttachments/{vnicAttachmentId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "detach_vnic got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "vnicAttachmentId": vnic_attachment_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + def detach_volume(self, volume_attachment_id, **kwargs): """ DetachVolume @@ -330,6 +447,81 @@ def detach_volume(self, volume_attachment_id, **kwargs): path_params=path_params, header_params=header_params) + def export_image(self, image_id, export_image_details, **kwargs): + """ + ExportImage + Exports the specified image to the Oracle Bare Metal Cloud Object Storage Service. You can use the Object Storage Service URL, + or the namespace, bucket name, and object name when specifying the location to export to. + + For more information about exporting images, see `Image Import/Export`__. + + To perform an image export, you need write access to the Object Storage Service bucket for the image, + see `Let Users Write Objects to Object Storage Buckets`__. + + See `Object Storage URLs`__ and `pre-authenticated requests`__ + for constructing URLs for image import/export. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm#Let4 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth + + + :param str image_id: (required) + The OCID of the image. + + :param ExportImageDetails export_image_details: (required) + Details for the image export. + + :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 (e.g., 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. + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Image` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/images/{imageId}/actions/export" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "export_image got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "imageId": image_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "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} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=export_image_details, + response_type="Image") + def get_console_history(self, instance_console_history_id, **kwargs): """ GetConsoleHistory @@ -497,6 +689,42 @@ def get_instance(self, instance_id, **kwargs): header_params=header_params, response_type="Instance") + def get_vnic_attachment(self, vnic_attachment_id, **kwargs): + """ + GetVnicAttachment + Gets the information for the specified VNIC attachment. + + + :param str vnic_attachment_id: (required) + The OCID of the VNIC attachment. + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VnicAttachment` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/vnicAttachments/{vnicAttachmentId}" + method = "GET" + + if kwargs: + raise ValueError( + "get_vnic_attachment got unknown kwargs: {!r}".format(kwargs)) + + path_params = { + "vnicAttachmentId": vnic_attachment_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="VnicAttachment") + def get_volume_attachment(self, volume_attachment_id, **kwargs): """ GetVolumeAttachment @@ -672,16 +900,22 @@ def launch_instance(self, launch_instance_details, **kwargs): also retrieve a resource's OCID by using a List API operation on that resource type, or by viewing the resource in the Console. - When you launch an instance, it is automatically attached to a Virtual - Network Interface Card (VNIC). The VNIC has a private IP address from - the subnet's CIDR, and optionally a public IP address. - To get the addresses, use the :func:`list_vnic_attachments` + When you launch an instance, it is automatically attached to a virtual + network interface card (VNIC), called the *primary VNIC*. The VNIC + has a private IP address from the subnet's CIDR. You can either assign a + private IP address of your choice or let Oracle automatically assign one. + You can choose whether the instance has a public IP address. To retrieve the + addresses, use the :func:`list_vnic_attachments` operation to get the VNIC ID for the instance, and then call :func:`get_vnic` with the VNIC ID. + You can later add secondary VNICs to an instance. For more information, see + `Managing Virtual Network Interface Cards (VNICs)`__. + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVNICs.htm :param LaunchInstanceDetails launch_instance_details: (required) @@ -802,6 +1036,7 @@ def list_images(self, compartment_id, **kwargs): :param str display_name: (optional) A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My new resource` @@ -882,6 +1117,7 @@ def list_instances(self, compartment_id, **kwargs): :param str display_name: (optional) A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My new resource` @@ -1000,8 +1236,9 @@ def list_shapes(self, compartment_id, **kwargs): def list_vnic_attachments(self, compartment_id, **kwargs): """ ListVnicAttachments - Lists the VNIC attachments for the specified compartment. The list can be filtered by - instance and by VNIC. + Lists the VNIC attachments in the specified compartment. A VNIC attachment + resides in the same compartment as the attached instance. The list can be + filtered by instance, VNIC, or Availability Domain. :param str compartment_id: (required) @@ -1193,14 +1430,14 @@ def terminate_instance(self, instance_id, **kwargs): def update_image(self, image_id, update_image_details, **kwargs): """ UpdateImage - Updates the display name of the image. + Updates the display name of the image. Avoid entering confidential information. :param str image_id: (required) The OCID of the image. :param UpdateImageDetails update_image_details: (required) - Updates the image display name field. + Updates the image display name field. Avoid entering confidential information. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -1254,8 +1491,8 @@ def update_image(self, image_id, update_image_details, **kwargs): def update_instance(self, instance_id, update_instance_details, **kwargs): """ UpdateInstance - Updates the display name of the specified instance. The OCID of the instance - remains the same. + Updates the display name of the specified instance. Avoid entering confidential information. + The OCID of the instance remains the same. :param str instance_id: (required) diff --git a/src/oraclebmc/core/models/__init__.py b/src/oraclebmc/core/models/__init__.py index d06ac276b5..59f6208432 100644 --- a/src/oraclebmc/core/models/__init__.py +++ b/src/oraclebmc/core/models/__init__.py @@ -4,6 +4,7 @@ from __future__ import absolute_import from .attach_i_scsi_volume_details import AttachIScsiVolumeDetails +from .attach_vnic_details import AttachVnicDetails from .attach_volume_details import AttachVolumeDetails from .capture_console_history_details import CaptureConsoleHistoryDetails from .console_history import ConsoleHistory @@ -17,6 +18,7 @@ from .create_ip_sec_connection_details import CreateIPSecConnectionDetails from .create_image_details import CreateImageDetails from .create_internet_gateway_details import CreateInternetGatewayDetails +from .create_private_ip_details import CreatePrivateIpDetails from .create_route_table_details import CreateRouteTableDetails from .create_security_list_details import CreateSecurityListDetails from .create_subnet_details import CreateSubnetDetails @@ -38,6 +40,9 @@ from .drg import Drg from .drg_attachment import DrgAttachment from .egress_security_rule import EgressSecurityRule +from .export_image_details import ExportImageDetails +from .export_image_via_object_storage_tuple_details import ExportImageViaObjectStorageTupleDetails +from .export_image_via_object_storage_uri_details import ExportImageViaObjectStorageUriDetails from .fast_connect_provider_service import FastConnectProviderService from .ip_sec_connection import IPSecConnection from .ip_sec_connection_device_config import IPSecConnectionDeviceConfig @@ -45,6 +50,9 @@ from .i_scsi_volume_attachment import IScsiVolumeAttachment from .icmp_options import IcmpOptions from .image import Image +from .image_source_details import ImageSourceDetails +from .image_source_via_object_storage_tuple_details import ImageSourceViaObjectStorageTupleDetails +from .image_source_via_object_storage_uri_details import ImageSourceViaObjectStorageUriDetails from .ingress_security_rule import IngressSecurityRule from .instance import Instance from .instance_credentials import InstanceCredentials @@ -52,6 +60,7 @@ from .launch_instance_details import LaunchInstanceDetails from .letter_of_authority import LetterOfAuthority from .port_range import PortRange +from .private_ip import PrivateIp from .route_rule import RouteRule from .route_table import RouteTable from .security_list import SecurityList @@ -71,11 +80,13 @@ from .update_image_details import UpdateImageDetails from .update_instance_details import UpdateInstanceDetails from .update_internet_gateway_details import UpdateInternetGatewayDetails +from .update_private_ip_details import UpdatePrivateIpDetails from .update_route_table_details import UpdateRouteTableDetails from .update_security_list_details import UpdateSecurityListDetails from .update_subnet_details import UpdateSubnetDetails from .update_vcn_details import UpdateVcnDetails from .update_virtual_circuit_details import UpdateVirtualCircuitDetails +from .update_vnic_details import UpdateVnicDetails from .update_volume_backup_details import UpdateVolumeBackupDetails from .update_volume_details import UpdateVolumeDetails from .vcn import Vcn @@ -90,6 +101,7 @@ # Maps type names to classes for core services. core_type_mapping = { "AttachIScsiVolumeDetails": AttachIScsiVolumeDetails, + "AttachVnicDetails": AttachVnicDetails, "AttachVolumeDetails": AttachVolumeDetails, "CaptureConsoleHistoryDetails": CaptureConsoleHistoryDetails, "ConsoleHistory": ConsoleHistory, @@ -103,6 +115,7 @@ "CreateIPSecConnectionDetails": CreateIPSecConnectionDetails, "CreateImageDetails": CreateImageDetails, "CreateInternetGatewayDetails": CreateInternetGatewayDetails, + "CreatePrivateIpDetails": CreatePrivateIpDetails, "CreateRouteTableDetails": CreateRouteTableDetails, "CreateSecurityListDetails": CreateSecurityListDetails, "CreateSubnetDetails": CreateSubnetDetails, @@ -124,6 +137,9 @@ "Drg": Drg, "DrgAttachment": DrgAttachment, "EgressSecurityRule": EgressSecurityRule, + "ExportImageDetails": ExportImageDetails, + "ExportImageViaObjectStorageTupleDetails": ExportImageViaObjectStorageTupleDetails, + "ExportImageViaObjectStorageUriDetails": ExportImageViaObjectStorageUriDetails, "FastConnectProviderService": FastConnectProviderService, "IPSecConnection": IPSecConnection, "IPSecConnectionDeviceConfig": IPSecConnectionDeviceConfig, @@ -131,6 +147,9 @@ "IScsiVolumeAttachment": IScsiVolumeAttachment, "IcmpOptions": IcmpOptions, "Image": Image, + "ImageSourceDetails": ImageSourceDetails, + "ImageSourceViaObjectStorageTupleDetails": ImageSourceViaObjectStorageTupleDetails, + "ImageSourceViaObjectStorageUriDetails": ImageSourceViaObjectStorageUriDetails, "IngressSecurityRule": IngressSecurityRule, "Instance": Instance, "InstanceCredentials": InstanceCredentials, @@ -138,6 +157,7 @@ "LaunchInstanceDetails": LaunchInstanceDetails, "LetterOfAuthority": LetterOfAuthority, "PortRange": PortRange, + "PrivateIp": PrivateIp, "RouteRule": RouteRule, "RouteTable": RouteTable, "SecurityList": SecurityList, @@ -157,11 +177,13 @@ "UpdateImageDetails": UpdateImageDetails, "UpdateInstanceDetails": UpdateInstanceDetails, "UpdateInternetGatewayDetails": UpdateInternetGatewayDetails, + "UpdatePrivateIpDetails": UpdatePrivateIpDetails, "UpdateRouteTableDetails": UpdateRouteTableDetails, "UpdateSecurityListDetails": UpdateSecurityListDetails, "UpdateSubnetDetails": UpdateSubnetDetails, "UpdateVcnDetails": UpdateVcnDetails, "UpdateVirtualCircuitDetails": UpdateVirtualCircuitDetails, + "UpdateVnicDetails": UpdateVnicDetails, "UpdateVolumeBackupDetails": UpdateVolumeBackupDetails, "UpdateVolumeDetails": UpdateVolumeDetails, "Vcn": Vcn, diff --git a/src/oraclebmc/core/models/attach_vnic_details.py b/src/oraclebmc/core/models/attach_vnic_details.py new file mode 100644 index 0000000000..a130c2182e --- /dev/null +++ b/src/oraclebmc/core/models/attach_vnic_details.py @@ -0,0 +1,110 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class AttachVnicDetails(object): + + def __init__(self): + + self.swagger_types = { + 'create_vnic_details': 'CreateVnicDetails', + 'display_name': 'str', + 'instance_id': 'str' + } + + self.attribute_map = { + 'create_vnic_details': 'createVnicDetails', + 'display_name': 'displayName', + 'instance_id': 'instanceId' + } + + self._create_vnic_details = None + self._display_name = None + self._instance_id = None + + @property + def create_vnic_details(self): + """ + Gets the create_vnic_details of this AttachVnicDetails. + Details for creating a new VNIC. + + + :return: The create_vnic_details of this AttachVnicDetails. + :rtype: CreateVnicDetails + """ + return self._create_vnic_details + + @create_vnic_details.setter + def create_vnic_details(self, create_vnic_details): + """ + Sets the create_vnic_details of this AttachVnicDetails. + Details for creating a new VNIC. + + + :param create_vnic_details: The create_vnic_details of this AttachVnicDetails. + :type: CreateVnicDetails + """ + self._create_vnic_details = create_vnic_details + + @property + def display_name(self): + """ + Gets the display_name of this AttachVnicDetails. + A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed. + + + :return: The display_name of this AttachVnicDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AttachVnicDetails. + A user-friendly name for the attachment. Does not have to be unique, and it cannot be changed. + + + :param display_name: The display_name of this AttachVnicDetails. + :type: str + """ + self._display_name = display_name + + @property + def instance_id(self): + """ + Gets the instance_id of this AttachVnicDetails. + The OCID of the instance. + + + :return: The instance_id of this AttachVnicDetails. + :rtype: str + """ + return self._instance_id + + @instance_id.setter + def instance_id(self, instance_id): + """ + Sets the instance_id of this AttachVnicDetails. + The OCID of the instance. + + + :param instance_id: The instance_id of this AttachVnicDetails. + :type: str + """ + self._instance_id = instance_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/oraclebmc/core/models/attach_volume_details.py b/src/oraclebmc/core/models/attach_volume_details.py index 662abfe681..7c8b5d16e7 100644 --- a/src/oraclebmc/core/models/attach_volume_details.py +++ b/src/oraclebmc/core/models/attach_volume_details.py @@ -45,7 +45,7 @@ def get_subtype(object_dictionary): def display_name(self): """ Gets the display_name of this AttachVolumeDetails. - A user-friendly name. Does not have to be unique, and it cannot be changed. + A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. :return: The display_name of this AttachVolumeDetails. @@ -57,7 +57,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this AttachVolumeDetails. - A user-friendly name. Does not have to be unique, and it cannot be changed. + A user-friendly name. Does not have to be unique, and it cannot be changed. Avoid entering confidential information. :param display_name: The display_name of this AttachVolumeDetails. diff --git a/src/oraclebmc/core/models/console_history.py b/src/oraclebmc/core/models/console_history.py index 8c41fa5e18..e45cf14638 100644 --- a/src/oraclebmc/core/models/console_history.py +++ b/src/oraclebmc/core/models/console_history.py @@ -94,6 +94,7 @@ def display_name(self): """ Gets the display_name of this ConsoleHistory. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My console history metadata` @@ -108,6 +109,7 @@ def display_name(self, display_name): """ Sets the display_name of this ConsoleHistory. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My console history metadata` diff --git a/src/oraclebmc/core/models/cpe.py b/src/oraclebmc/core/models/cpe.py index 2767722f2d..45501e45bc 100644 --- a/src/oraclebmc/core/models/cpe.py +++ b/src/oraclebmc/core/models/cpe.py @@ -60,6 +60,7 @@ def display_name(self): """ Gets the display_name of this Cpe. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this Cpe. @@ -72,6 +73,7 @@ def display_name(self, display_name): """ Sets the display_name of this Cpe. 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 Cpe. diff --git a/src/oraclebmc/core/models/create_cpe_details.py b/src/oraclebmc/core/models/create_cpe_details.py index c5e3084021..fdac087a34 100644 --- a/src/oraclebmc/core/models/create_cpe_details.py +++ b/src/oraclebmc/core/models/create_cpe_details.py @@ -53,7 +53,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateCpeDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateCpeDetails. @@ -65,7 +65,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateCpeDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateCpeDetails. diff --git a/src/oraclebmc/core/models/create_cross_connect_details.py b/src/oraclebmc/core/models/create_cross_connect_details.py index 3304a26866..18305ee6cd 100644 --- a/src/oraclebmc/core/models/create_cross_connect_details.py +++ b/src/oraclebmc/core/models/create_cross_connect_details.py @@ -90,6 +90,7 @@ def display_name(self): """ Gets the display_name of this CreateCrossConnectDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this CreateCrossConnectDetails. @@ -102,6 +103,7 @@ def display_name(self, display_name): """ Sets the display_name of this CreateCrossConnectDetails. 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 CreateCrossConnectDetails. diff --git a/src/oraclebmc/core/models/create_cross_connect_group_details.py b/src/oraclebmc/core/models/create_cross_connect_group_details.py index 82aed1d35b..6f6e4f18d4 100644 --- a/src/oraclebmc/core/models/create_cross_connect_group_details.py +++ b/src/oraclebmc/core/models/create_cross_connect_group_details.py @@ -51,6 +51,7 @@ def display_name(self): """ Gets the display_name of this CreateCrossConnectGroupDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this CreateCrossConnectGroupDetails. @@ -63,6 +64,7 @@ def display_name(self, display_name): """ Sets the display_name of this CreateCrossConnectGroupDetails. 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 CreateCrossConnectGroupDetails. diff --git a/src/oraclebmc/core/models/create_dhcp_details.py b/src/oraclebmc/core/models/create_dhcp_details.py index fb21b54983..ba9349cce7 100644 --- a/src/oraclebmc/core/models/create_dhcp_details.py +++ b/src/oraclebmc/core/models/create_dhcp_details.py @@ -56,7 +56,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateDhcpDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateDhcpDetails. @@ -68,7 +68,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateDhcpDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateDhcpDetails. diff --git a/src/oraclebmc/core/models/create_drg_attachment_details.py b/src/oraclebmc/core/models/create_drg_attachment_details.py index 4fb62b5262..cb36813a60 100644 --- a/src/oraclebmc/core/models/create_drg_attachment_details.py +++ b/src/oraclebmc/core/models/create_drg_attachment_details.py @@ -29,7 +29,7 @@ def __init__(self): def display_name(self): """ Gets the display_name of this CreateDrgAttachmentDetails. - A user-friendly name. Does not have to be unique. + A user-friendly name. Does not have to be unique. Avoid entering confidential information. :return: The display_name of this CreateDrgAttachmentDetails. @@ -41,7 +41,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateDrgAttachmentDetails. - A user-friendly name. Does not have to be unique. + A user-friendly name. Does not have to be unique. Avoid entering confidential information. :param display_name: The display_name of this CreateDrgAttachmentDetails. diff --git a/src/oraclebmc/core/models/create_drg_details.py b/src/oraclebmc/core/models/create_drg_details.py index 13d8630b96..7016261fa8 100644 --- a/src/oraclebmc/core/models/create_drg_details.py +++ b/src/oraclebmc/core/models/create_drg_details.py @@ -50,7 +50,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateDrgDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateDrgDetails. @@ -62,7 +62,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateDrgDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateDrgDetails. diff --git a/src/oraclebmc/core/models/create_image_details.py b/src/oraclebmc/core/models/create_image_details.py index 1821cf8356..47c4634393 100644 --- a/src/oraclebmc/core/models/create_image_details.py +++ b/src/oraclebmc/core/models/create_image_details.py @@ -12,17 +12,20 @@ def __init__(self): self.swagger_types = { 'compartment_id': 'str', 'display_name': 'str', + 'image_source_details': 'ImageSourceDetails', 'instance_id': 'str' } self.attribute_map = { 'compartment_id': 'compartmentId', 'display_name': 'displayName', + 'image_source_details': 'imageSourceDetails', 'instance_id': 'instanceId' } self._compartment_id = None self._display_name = None + self._image_source_details = None self._instance_id = None @property @@ -53,8 +56,10 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateImageDetails. - A user-friendly name for the image. It does not have to be unique, and it's changeable. You cannot use an - Oracle-provided image name as a custom image name. + A user-friendly name for the image. It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + You cannot use an Oracle-provided image name as a custom image name. Example: `My Oracle Linux image` @@ -68,8 +73,10 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateImageDetails. - A user-friendly name for the image. It does not have to be unique, and it's changeable. You cannot use an - Oracle-provided image name as a custom image name. + A user-friendly name for the image. It does not have to be unique, and it's changeable. + Avoid entering confidential information. + + You cannot use an Oracle-provided image name as a custom image name. Example: `My Oracle Linux image` @@ -79,6 +86,30 @@ def display_name(self, display_name): """ self._display_name = display_name + @property + def image_source_details(self): + """ + Gets the image_source_details of this CreateImageDetails. + Details for creating an image through import + + + :return: The image_source_details of this CreateImageDetails. + :rtype: ImageSourceDetails + """ + return self._image_source_details + + @image_source_details.setter + def image_source_details(self, image_source_details): + """ + Sets the image_source_details of this CreateImageDetails. + Details for creating an image through import + + + :param image_source_details: The image_source_details of this CreateImageDetails. + :type: ImageSourceDetails + """ + self._image_source_details = image_source_details + @property def instance_id(self): """ diff --git a/src/oraclebmc/core/models/create_internet_gateway_details.py b/src/oraclebmc/core/models/create_internet_gateway_details.py index fe8b94ed94..8bb5dbc447 100644 --- a/src/oraclebmc/core/models/create_internet_gateway_details.py +++ b/src/oraclebmc/core/models/create_internet_gateway_details.py @@ -56,7 +56,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateInternetGatewayDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateInternetGatewayDetails. @@ -68,7 +68,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateInternetGatewayDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateInternetGatewayDetails. diff --git a/src/oraclebmc/core/models/create_ip_sec_connection_details.py b/src/oraclebmc/core/models/create_ip_sec_connection_details.py index c1a8dc5a9e..bc8cf06470 100644 --- a/src/oraclebmc/core/models/create_ip_sec_connection_details.py +++ b/src/oraclebmc/core/models/create_ip_sec_connection_details.py @@ -83,7 +83,7 @@ def cpe_id(self, cpe_id): def display_name(self): """ Gets the display_name of this CreateIPSecConnectionDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateIPSecConnectionDetails. @@ -95,7 +95,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateIPSecConnectionDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateIPSecConnectionDetails. diff --git a/src/oraclebmc/core/models/create_private_ip_details.py b/src/oraclebmc/core/models/create_private_ip_details.py new file mode 100644 index 0000000000..30db321019 --- /dev/null +++ b/src/oraclebmc/core/models/create_private_ip_details.py @@ -0,0 +1,177 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class CreatePrivateIpDetails(object): + + def __init__(self): + + self.swagger_types = { + 'display_name': 'str', + 'hostname_label': 'str', + 'ip_address': 'str', + 'vnic_id': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'hostname_label': 'hostnameLabel', + 'ip_address': 'ipAddress', + 'vnic_id': 'vnicId' + } + + self._display_name = None + self._hostname_label = None + self._ip_address = None + self._vnic_id = None + + @property + def display_name(self): + """ + Gets the display_name of this CreatePrivateIpDetails. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this CreatePrivateIpDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreatePrivateIpDetails. + 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 CreatePrivateIpDetails. + :type: str + """ + self._display_name = display_name + + @property + def hostname_label(self): + """ + Gets the hostname_label of this CreatePrivateIpDetails. + The hostname for the private IP. Used for DNS. The value + is the hostname portion of the private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + Example: `bminstance-1` + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :return: The hostname_label of this CreatePrivateIpDetails. + :rtype: str + """ + return self._hostname_label + + @hostname_label.setter + def hostname_label(self, hostname_label): + """ + Sets the hostname_label of this CreatePrivateIpDetails. + The hostname for the private IP. Used for DNS. The value + is the hostname portion of the private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + Example: `bminstance-1` + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :param hostname_label: The hostname_label of this CreatePrivateIpDetails. + :type: str + """ + self._hostname_label = hostname_label + + @property + def ip_address(self): + """ + Gets the ip_address of this CreatePrivateIpDetails. + A private IP address of your choice. Must be an available IP address within + the subnet's CIDR. If you don't specify a value, Oracle automatically + assigns a private IP address from the subnet. + + Example: `10.0.3.3` + + + :return: The ip_address of this CreatePrivateIpDetails. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this CreatePrivateIpDetails. + A private IP address of your choice. Must be an available IP address within + the subnet's CIDR. If you don't specify a value, Oracle automatically + assigns a private IP address from the subnet. + + Example: `10.0.3.3` + + + :param ip_address: The ip_address of this CreatePrivateIpDetails. + :type: str + """ + self._ip_address = ip_address + + @property + def vnic_id(self): + """ + Gets the vnic_id of this CreatePrivateIpDetails. + The OCID of the VNIC to assign the private IP to. The VNIC and private IP + must be in the same subnet. + + + :return: The vnic_id of this CreatePrivateIpDetails. + :rtype: str + """ + return self._vnic_id + + @vnic_id.setter + def vnic_id(self, vnic_id): + """ + Sets the vnic_id of this CreatePrivateIpDetails. + The OCID of the VNIC to assign the private IP to. The VNIC and private IP + must be in the same subnet. + + + :param vnic_id: The vnic_id of this CreatePrivateIpDetails. + :type: str + """ + self._vnic_id = vnic_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/oraclebmc/core/models/create_route_table_details.py b/src/oraclebmc/core/models/create_route_table_details.py index bc1d164f30..bc5e5ca278 100644 --- a/src/oraclebmc/core/models/create_route_table_details.py +++ b/src/oraclebmc/core/models/create_route_table_details.py @@ -56,7 +56,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateRouteTableDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateRouteTableDetails. @@ -68,7 +68,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateRouteTableDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateRouteTableDetails. diff --git a/src/oraclebmc/core/models/create_security_list_details.py b/src/oraclebmc/core/models/create_security_list_details.py index 6a988aa790..593126d15d 100644 --- a/src/oraclebmc/core/models/create_security_list_details.py +++ b/src/oraclebmc/core/models/create_security_list_details.py @@ -59,7 +59,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateSecurityListDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateSecurityListDetails. @@ -71,7 +71,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateSecurityListDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateSecurityListDetails. diff --git a/src/oraclebmc/core/models/create_subnet_details.py b/src/oraclebmc/core/models/create_subnet_details.py index 7f934bdf71..95efaed4cc 100644 --- a/src/oraclebmc/core/models/create_subnet_details.py +++ b/src/oraclebmc/core/models/create_subnet_details.py @@ -156,7 +156,7 @@ def dhcp_options_id(self, dhcp_options_id): def display_name(self): """ Gets the display_name of this CreateSubnetDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateSubnetDetails. @@ -168,7 +168,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateSubnetDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateSubnetDetails. @@ -237,8 +237,8 @@ def prohibit_public_ip_on_vnic(self): Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified - otherwise during instance launch (with the `assignPublicIp` flag in - :class:`CreateVnicDetails`). + otherwise during instance launch or VNIC creation (with the + `assignPublicIp` flag in :class:`CreateVnicDetails`). If `prohibitPublicIpOnVnic` is set to true, VNICs created in this subnet cannot have public IP addresses (i.e., it's a private subnet). @@ -258,8 +258,8 @@ def prohibit_public_ip_on_vnic(self, prohibit_public_ip_on_vnic): Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified - otherwise during instance launch (with the `assignPublicIp` flag in - :class:`CreateVnicDetails`). + otherwise during instance launch or VNIC creation (with the + `assignPublicIp` flag in :class:`CreateVnicDetails`). If `prohibitPublicIpOnVnic` is set to true, VNICs created in this subnet cannot have public IP addresses (i.e., it's a private subnet). diff --git a/src/oraclebmc/core/models/create_vcn_details.py b/src/oraclebmc/core/models/create_vcn_details.py index 614256ff8c..f1d7cb07e1 100644 --- a/src/oraclebmc/core/models/create_vcn_details.py +++ b/src/oraclebmc/core/models/create_vcn_details.py @@ -84,7 +84,7 @@ def compartment_id(self, compartment_id): def display_name(self): """ Gets the display_name of this CreateVcnDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateVcnDetails. @@ -96,7 +96,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateVcnDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateVcnDetails. @@ -112,8 +112,7 @@ def dns_label(self): subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels - for VCNs in your tenancy. - Must be an alphanumeric string that begins with a letter. + for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. You must set this value if you want instances to be able to use hostnames to @@ -141,8 +140,7 @@ def dns_label(self, dns_label): subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`). Not required to be unique, but it's a best practice to set unique DNS labels - for VCNs in your tenancy. - Must be an alphanumeric string that begins with a letter. + for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot be changed. You must set this value if you want instances to be able to use hostnames to diff --git a/src/oraclebmc/core/models/create_virtual_circuit_details.py b/src/oraclebmc/core/models/create_virtual_circuit_details.py index 8ba58fb321..27fe80eb31 100644 --- a/src/oraclebmc/core/models/create_virtual_circuit_details.py +++ b/src/oraclebmc/core/models/create_virtual_circuit_details.py @@ -160,7 +160,7 @@ def customer_bgp_asn(self, customer_bgp_asn): def display_name(self): """ Gets the display_name of this CreateVirtualCircuitDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. :return: The display_name of this CreateVirtualCircuitDetails. @@ -172,7 +172,7 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this CreateVirtualCircuitDetails. - A user-friendly name. Does not have to be unique, and it's changeable. + 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 CreateVirtualCircuitDetails. diff --git a/src/oraclebmc/core/models/create_vnic_details.py b/src/oraclebmc/core/models/create_vnic_details.py index 13d0330c41..f8ab039896 100644 --- a/src/oraclebmc/core/models/create_vnic_details.py +++ b/src/oraclebmc/core/models/create_vnic_details.py @@ -37,14 +37,21 @@ def assign_public_ip(self): Gets the assign_public_ip of this CreateVnicDetails. Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created - in a private subnet (i.e., where `prohibitPublicIpOnVnic`=true in the + in a private subnet (i.e., where `prohibitPublicIpOnVnic` = true in the :class:`Subnet`), then no public IP address is assigned. - If not set and the subnet is public (`prohibitPublicIpOnVnic`=false), then + If not set and the subnet is public (`prohibitPublicIpOnVnic` = false), then a public IP address is assigned. If set to true and - `prohibitPublicIpOnVnic`=true, an error is returned. + `prohibitPublicIpOnVnic` = true, an error is returned. + + **Note:** This public IP address is associated with the primary private IP + on the VNIC. Secondary private IPs cannot have public IP + addresses associated with them. For more information, see + `Managing IP Addresses`__. Example: `false` + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm + :return: The assign_public_ip of this CreateVnicDetails. :rtype: bool @@ -57,14 +64,21 @@ def assign_public_ip(self, assign_public_ip): Sets the assign_public_ip of this CreateVnicDetails. Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created - in a private subnet (i.e., where `prohibitPublicIpOnVnic`=true in the + in a private subnet (i.e., where `prohibitPublicIpOnVnic` = true in the :class:`Subnet`), then no public IP address is assigned. - If not set and the subnet is public (`prohibitPublicIpOnVnic`=false), then + If not set and the subnet is public (`prohibitPublicIpOnVnic` = false), then a public IP address is assigned. If set to true and - `prohibitPublicIpOnVnic`=true, an error is returned. + `prohibitPublicIpOnVnic` = true, an error is returned. + + **Note:** This public IP address is associated with the primary private IP + on the VNIC. Secondary private IPs cannot have public IP + addresses associated with them. For more information, see + `Managing IP Addresses`__. Example: `false` + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm + :param assign_public_ip: The assign_public_ip of this CreateVnicDetails. :type: bool @@ -76,6 +90,7 @@ def display_name(self): """ Gets the display_name of this CreateVnicDetails. A user-friendly name for the VNIC. Does not have to be unique. + Avoid entering confidential information. :return: The display_name of this CreateVnicDetails. @@ -88,6 +103,7 @@ def display_name(self, display_name): """ Sets the display_name of this CreateVnicDetails. A user-friendly name for the VNIC. Does not have to be unique. + Avoid entering confidential information. :param display_name: The display_name of this CreateVnicDetails. @@ -99,20 +115,21 @@ def display_name(self, display_name): def hostname_label(self): """ Gets the hostname_label of this CreateVnicDetails. - The hostname for the VNIC that is created during instance launch. - Used for DNS. The value is the hostname portion of the instance's - fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN - `bminstance-1.subnet123.vcn1.oraclevcn.com`). + The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + portion of the primary private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). Must be unique across all VNICs in the subnet and comply with `RFC 952`__ and `RFC 1123`__. - The value cannot be changed, and it can be retrieved from the - :class:`Vnic`. + The value appears in the :class:`Vnic` object and also the + :class:`PrivateIp` object returned by + :func:`list_private_ips` and + :func:`get_private_ip`. For more information, see `DNS in Your Virtual Cloud Network`__. - Use this `hostnameLabel` instead + When launching an instance, use this `hostnameLabel` instead of the deprecated `hostnameLabel` in :func:`launch_instance_details`. If you provide both, the values must match. @@ -133,20 +150,21 @@ def hostname_label(self): def hostname_label(self, hostname_label): """ Sets the hostname_label of this CreateVnicDetails. - The hostname for the VNIC that is created during instance launch. - Used for DNS. The value is the hostname portion of the instance's - fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN - `bminstance-1.subnet123.vcn1.oraclevcn.com`). + The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + portion of the primary private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). Must be unique across all VNICs in the subnet and comply with `RFC 952`__ and `RFC 1123`__. - The value cannot be changed, and it can be retrieved from the - :class:`Vnic`. + The value appears in the :class:`Vnic` object and also the + :class:`PrivateIp` object returned by + :func:`list_private_ips` and + :func:`get_private_ip`. For more information, see `DNS in Your Virtual Cloud Network`__. - Use this `hostnameLabel` instead + When launching an instance, use this `hostnameLabel` instead of the deprecated `hostnameLabel` in :func:`launch_instance_details`. If you provide both, the values must match. @@ -168,10 +186,15 @@ def private_ip(self): """ Gets the private_ip of this CreateVnicDetails. A private IP address of your choice to assign to the VNIC. Must be an - available IP address within the subnet's CIDR. If no value is specified, - a private IP address from the subnet will be automatically assigned. + available IP address within the subnet's CIDR. If you don't specify a + value, Oracle automatically assigns a private IP address from the subnet. + This is the VNIC's *primary* private IP address. The value appears in + the :class:`Vnic` object and also the + :class:`PrivateIp` object returned by + :func:`list_private_ips` and + :func:`get_private_ip`. - Example: `10.0.3.1` + Example: `10.0.3.3` :return: The private_ip of this CreateVnicDetails. @@ -184,10 +207,15 @@ def private_ip(self, private_ip): """ Sets the private_ip of this CreateVnicDetails. A private IP address of your choice to assign to the VNIC. Must be an - available IP address within the subnet's CIDR. If no value is specified, - a private IP address from the subnet will be automatically assigned. + available IP address within the subnet's CIDR. If you don't specify a + value, Oracle automatically assigns a private IP address from the subnet. + This is the VNIC's *primary* private IP address. The value appears in + the :class:`Vnic` object and also the + :class:`PrivateIp` object returned by + :func:`list_private_ips` and + :func:`get_private_ip`. - Example: `10.0.3.1` + Example: `10.0.3.3` :param private_ip: The private_ip of this CreateVnicDetails. @@ -199,8 +227,8 @@ def private_ip(self, private_ip): def subnet_id(self): """ Gets the subnet_id of this CreateVnicDetails. - The OCID of the subnet to create the VNIC in. Use this `subnetId` instead - of the deprecated `subnetId` in + The OCID of the subnet to create the VNIC in. When launching an instance, + use this `subnetId` instead of the deprecated `subnetId` in :func:`launch_instance_details`. At least one of them is required; if you provide both, the values must match. @@ -214,8 +242,8 @@ def subnet_id(self): def subnet_id(self, subnet_id): """ Sets the subnet_id of this CreateVnicDetails. - The OCID of the subnet to create the VNIC in. Use this `subnetId` instead - of the deprecated `subnetId` in + The OCID of the subnet to create the VNIC in. When launching an instance, + use this `subnetId` instead of the deprecated `subnetId` in :func:`launch_instance_details`. At least one of them is required; if you provide both, the values must match. diff --git a/src/oraclebmc/core/models/create_volume_backup_details.py b/src/oraclebmc/core/models/create_volume_backup_details.py index 5e18f85de8..79c01b663c 100644 --- a/src/oraclebmc/core/models/create_volume_backup_details.py +++ b/src/oraclebmc/core/models/create_volume_backup_details.py @@ -27,6 +27,7 @@ def display_name(self): """ Gets the display_name of this CreateVolumeBackupDetails. A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + Avoid entering confidential information. :return: The display_name of this CreateVolumeBackupDetails. @@ -39,6 +40,7 @@ def display_name(self, display_name): """ Sets the display_name of this CreateVolumeBackupDetails. A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + Avoid entering confidential information. :param display_name: The display_name of this CreateVolumeBackupDetails. diff --git a/src/oraclebmc/core/models/create_volume_details.py b/src/oraclebmc/core/models/create_volume_details.py index 4513bea069..fb6bc58411 100644 --- a/src/oraclebmc/core/models/create_volume_details.py +++ b/src/oraclebmc/core/models/create_volume_details.py @@ -88,6 +88,7 @@ def display_name(self): """ Gets the display_name of this CreateVolumeDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this CreateVolumeDetails. @@ -100,6 +101,7 @@ def display_name(self, display_name): """ Sets the display_name of this CreateVolumeDetails. 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 CreateVolumeDetails. diff --git a/src/oraclebmc/core/models/cross_connect.py b/src/oraclebmc/core/models/cross_connect.py index 5dc810e8b3..6e533120cc 100644 --- a/src/oraclebmc/core/models/cross_connect.py +++ b/src/oraclebmc/core/models/cross_connect.py @@ -96,6 +96,7 @@ def display_name(self): """ Gets the display_name of this CrossConnect. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this CrossConnect. @@ -108,6 +109,7 @@ def display_name(self, display_name): """ Sets the display_name of this CrossConnect. 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 CrossConnect. diff --git a/src/oraclebmc/core/models/cross_connect_group.py b/src/oraclebmc/core/models/cross_connect_group.py index a2df097fb5..ac0fa2970d 100644 --- a/src/oraclebmc/core/models/cross_connect_group.py +++ b/src/oraclebmc/core/models/cross_connect_group.py @@ -60,6 +60,7 @@ def display_name(self): """ Gets the display_name of this CrossConnectGroup. The display name of A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this CrossConnectGroup. @@ -72,6 +73,7 @@ def display_name(self, display_name): """ Sets the display_name of this CrossConnectGroup. The display name of 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 CrossConnectGroup. diff --git a/src/oraclebmc/core/models/dhcp_options.py b/src/oraclebmc/core/models/dhcp_options.py index 7d8dec01db..56b7c2597f 100644 --- a/src/oraclebmc/core/models/dhcp_options.py +++ b/src/oraclebmc/core/models/dhcp_options.py @@ -66,6 +66,7 @@ def display_name(self): """ Gets the display_name of this DhcpOptions. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this DhcpOptions. @@ -78,6 +79,7 @@ def display_name(self, display_name): """ Sets the display_name of this DhcpOptions. 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 DhcpOptions. diff --git a/src/oraclebmc/core/models/drg.py b/src/oraclebmc/core/models/drg.py index 2858cca388..a3f185d0fc 100644 --- a/src/oraclebmc/core/models/drg.py +++ b/src/oraclebmc/core/models/drg.py @@ -60,6 +60,7 @@ def display_name(self): """ Gets the display_name of this Drg. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this Drg. @@ -72,6 +73,7 @@ def display_name(self, display_name): """ Sets the display_name of this Drg. 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 Drg. diff --git a/src/oraclebmc/core/models/drg_attachment.py b/src/oraclebmc/core/models/drg_attachment.py index 714df1e4ac..e97ed33307 100644 --- a/src/oraclebmc/core/models/drg_attachment.py +++ b/src/oraclebmc/core/models/drg_attachment.py @@ -66,6 +66,7 @@ def display_name(self): """ Gets the display_name of this DrgAttachment. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this DrgAttachment. @@ -78,6 +79,7 @@ def display_name(self, display_name): """ Sets the display_name of this DrgAttachment. 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 DrgAttachment. diff --git a/src/oraclebmc/core/models/export_image_details.py b/src/oraclebmc/core/models/export_image_details.py new file mode 100644 index 0000000000..6184e4ec69 --- /dev/null +++ b/src/oraclebmc/core/models/export_image_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class ExportImageDetails(object): + + def __init__(self): + + self.swagger_types = { + 'destination_type': 'str' + } + + self.attribute_map = { + 'destination_type': 'destinationType' + } + + self._destination_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['destinationType'] + + if type == 'objectStorageUri': + return 'ExportImageViaObjectStorageUriDetails' + + if type == 'objectStorageTuple': + return 'ExportImageViaObjectStorageTupleDetails' + else: + return 'ExportImageDetails' + + @property + def destination_type(self): + """ + Gets the destination_type of this ExportImageDetails. + The destination type. Use `objectStorageTuple` when specifying the namespace, bucket name, and object name. + Use `objectStorageUri` when specifying the Object Storage Service URL. + + + :return: The destination_type of this ExportImageDetails. + :rtype: str + """ + return self._destination_type + + @destination_type.setter + def destination_type(self, destination_type): + """ + Sets the destination_type of this ExportImageDetails. + The destination type. Use `objectStorageTuple` when specifying the namespace, bucket name, and object name. + Use `objectStorageUri` when specifying the Object Storage Service URL. + + + :param destination_type: The destination_type of this ExportImageDetails. + :type: str + """ + self._destination_type = destination_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oraclebmc/core/models/export_image_via_object_storage_tuple_details.py b/src/oraclebmc/core/models/export_image_via_object_storage_tuple_details.py new file mode 100644 index 0000000000..88c87d29ab --- /dev/null +++ b/src/oraclebmc/core/models/export_image_via_object_storage_tuple_details.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + +from .export_image_details import ExportImageDetails +from ...util import formatted_flat_dict + + +class ExportImageViaObjectStorageTupleDetails(ExportImageDetails): + + def __init__(self): + + self.swagger_types = { + 'destination_type': 'str', + 'bucket_name': 'str', + 'namespace_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'destination_type': 'destinationType', + 'bucket_name': 'bucketName', + 'namespace_name': 'namespaceName', + 'object_name': 'objectName' + } + + self._destination_type = None + self._bucket_name = None + self._namespace_name = None + self._object_name = None + self._destination_type = 'objectStorageTuple' + + @property + def bucket_name(self): + """ + Gets the bucket_name of this ExportImageViaObjectStorageTupleDetails. + The Object Storage Service bucket to export the image to. + + + :return: The bucket_name of this ExportImageViaObjectStorageTupleDetails. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ExportImageViaObjectStorageTupleDetails. + The Object Storage Service bucket to export the image to. + + + :param bucket_name: The bucket_name of this ExportImageViaObjectStorageTupleDetails. + :type: str + """ + self._bucket_name = bucket_name + + @property + def namespace_name(self): + """ + Gets the namespace_name of this ExportImageViaObjectStorageTupleDetails. + The Object Storage Service namespace to export the image to. + + + :return: The namespace_name of this ExportImageViaObjectStorageTupleDetails. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ExportImageViaObjectStorageTupleDetails. + The Object Storage Service namespace to export the image to. + + + :param namespace_name: The namespace_name of this ExportImageViaObjectStorageTupleDetails. + :type: str + """ + self._namespace_name = namespace_name + + @property + def object_name(self): + """ + Gets the object_name of this ExportImageViaObjectStorageTupleDetails. + The Object Storage Service object name for the exported image. + + + :return: The object_name of this ExportImageViaObjectStorageTupleDetails. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ExportImageViaObjectStorageTupleDetails. + The Object Storage Service object name for the exported image. + + + :param object_name: The object_name of this ExportImageViaObjectStorageTupleDetails. + :type: str + """ + self._object_name = object_name + + 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/oraclebmc/core/models/export_image_via_object_storage_uri_details.py b/src/oraclebmc/core/models/export_image_via_object_storage_uri_details.py new file mode 100644 index 0000000000..5a9d0992e2 --- /dev/null +++ b/src/oraclebmc/core/models/export_image_via_object_storage_uri_details.py @@ -0,0 +1,68 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + +from .export_image_details import ExportImageDetails +from ...util import formatted_flat_dict + + +class ExportImageViaObjectStorageUriDetails(ExportImageDetails): + + def __init__(self): + + self.swagger_types = { + 'destination_type': 'str', + 'destination_uri': 'str' + } + + self.attribute_map = { + 'destination_type': 'destinationType', + 'destination_uri': 'destinationUri' + } + + self._destination_type = None + self._destination_uri = None + self._destination_type = 'objectStorageUri' + + @property + def destination_uri(self): + """ + Gets the destination_uri of this ExportImageViaObjectStorageUriDetails. + The Object Storage Service URL to export the image to. See `Object Storage URLs`__ + and `pre-authenticated requests`__ for constructing URLs for image import/export. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth + + + :return: The destination_uri of this ExportImageViaObjectStorageUriDetails. + :rtype: str + """ + return self._destination_uri + + @destination_uri.setter + def destination_uri(self, destination_uri): + """ + Sets the destination_uri of this ExportImageViaObjectStorageUriDetails. + The Object Storage Service URL to export the image to. See `Object Storage URLs`__ + and `pre-authenticated requests`__ for constructing URLs for image import/export. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth + + + :param destination_uri: The destination_uri of this ExportImageViaObjectStorageUriDetails. + :type: str + """ + self._destination_uri = destination_uri + + 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/oraclebmc/core/models/image.py b/src/oraclebmc/core/models/image.py index e8e8dbef21..7cb1edf50f 100644 --- a/src/oraclebmc/core/models/image.py +++ b/src/oraclebmc/core/models/image.py @@ -126,6 +126,7 @@ def display_name(self): """ Gets the display_name of this Image. A user-friendly name for the image. It does not have to be unique, and it's changeable. + Avoid entering confidential information. You cannot use an Oracle-provided image name as a custom image name. Example: `My custom Oracle Linux image` @@ -141,6 +142,7 @@ def display_name(self, display_name): """ Sets the display_name of this Image. A user-friendly name for the image. It does not have to be unique, and it's changeable. + Avoid entering confidential information. You cannot use an Oracle-provided image name as a custom image name. Example: `My custom Oracle Linux image` @@ -179,7 +181,7 @@ def id(self, id): def lifecycle_state(self): """ Gets the lifecycle_state of this Image. - Allowed values for this property are: "PROVISIONING", "AVAILABLE", "DISABLED", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "PROVISIONING", "IMPORTING", "AVAILABLE", "EXPORTING", "DISABLED", "DELETED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -196,7 +198,7 @@ def lifecycle_state(self, lifecycle_state): :param lifecycle_state: The lifecycle_state of this Image. :type: str """ - allowed_values = ["PROVISIONING", "AVAILABLE", "DISABLED", "DELETED"] + allowed_values = ["PROVISIONING", "IMPORTING", "AVAILABLE", "EXPORTING", "DISABLED", "DELETED"] if lifecycle_state not in allowed_values: lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state diff --git a/src/oraclebmc/core/models/image_source_details.py b/src/oraclebmc/core/models/image_source_details.py new file mode 100644 index 0000000000..a124b0f634 --- /dev/null +++ b/src/oraclebmc/core/models/image_source_details.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class ImageSourceDetails(object): + + def __init__(self): + + self.swagger_types = { + 'source_type': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType' + } + + self._source_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['sourceType'] + + if type == 'objectStorageTuple': + return 'ImageSourceViaObjectStorageTupleDetails' + + if type == 'objectStorageUri': + return 'ImageSourceViaObjectStorageUriDetails' + else: + return 'ImageSourceDetails' + + @property + def source_type(self): + """ + Gets the source_type of this ImageSourceDetails. + The source type for the image. Use `objectStorageTuple` when specifying the namespace, + bucket name, and object name. Use `objectStorageUri` when specifying the Object Storage Service URL. + + + :return: The source_type of this ImageSourceDetails. + :rtype: str + """ + return self._source_type + + @source_type.setter + def source_type(self, source_type): + """ + Sets the source_type of this ImageSourceDetails. + The source type for the image. Use `objectStorageTuple` when specifying the namespace, + bucket name, and object name. Use `objectStorageUri` when specifying the Object Storage Service URL. + + + :param source_type: The source_type of this ImageSourceDetails. + :type: str + """ + self._source_type = source_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oraclebmc/core/models/image_source_via_object_storage_tuple_details.py b/src/oraclebmc/core/models/image_source_via_object_storage_tuple_details.py new file mode 100644 index 0000000000..06d63a83c3 --- /dev/null +++ b/src/oraclebmc/core/models/image_source_via_object_storage_tuple_details.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + +from .image_source_details import ImageSourceDetails +from ...util import formatted_flat_dict + + +class ImageSourceViaObjectStorageTupleDetails(ImageSourceDetails): + + def __init__(self): + + self.swagger_types = { + 'source_type': 'str', + 'bucket_name': 'str', + 'namespace_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'bucket_name': 'bucketName', + 'namespace_name': 'namespaceName', + 'object_name': 'objectName' + } + + self._source_type = None + self._bucket_name = None + self._namespace_name = None + self._object_name = None + self._source_type = 'objectStorageTuple' + + @property + def bucket_name(self): + """ + Gets the bucket_name of this ImageSourceViaObjectStorageTupleDetails. + The Object Storage Service bucket for the image. + + + :return: The bucket_name of this ImageSourceViaObjectStorageTupleDetails. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ImageSourceViaObjectStorageTupleDetails. + The Object Storage Service bucket for the image. + + + :param bucket_name: The bucket_name of this ImageSourceViaObjectStorageTupleDetails. + :type: str + """ + self._bucket_name = bucket_name + + @property + def namespace_name(self): + """ + Gets the namespace_name of this ImageSourceViaObjectStorageTupleDetails. + The Object Storage Service namespace for the image. + + + :return: The namespace_name of this ImageSourceViaObjectStorageTupleDetails. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ImageSourceViaObjectStorageTupleDetails. + The Object Storage Service namespace for the image. + + + :param namespace_name: The namespace_name of this ImageSourceViaObjectStorageTupleDetails. + :type: str + """ + self._namespace_name = namespace_name + + @property + def object_name(self): + """ + Gets the object_name of this ImageSourceViaObjectStorageTupleDetails. + The Object Storage Service name for the image. + + + :return: The object_name of this ImageSourceViaObjectStorageTupleDetails. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ImageSourceViaObjectStorageTupleDetails. + The Object Storage Service name for the image. + + + :param object_name: The object_name of this ImageSourceViaObjectStorageTupleDetails. + :type: str + """ + self._object_name = object_name + + 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/oraclebmc/core/models/image_source_via_object_storage_uri_details.py b/src/oraclebmc/core/models/image_source_via_object_storage_uri_details.py new file mode 100644 index 0000000000..f89ba58199 --- /dev/null +++ b/src/oraclebmc/core/models/image_source_via_object_storage_uri_details.py @@ -0,0 +1,60 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + +from .image_source_details import ImageSourceDetails +from ...util import formatted_flat_dict + + +class ImageSourceViaObjectStorageUriDetails(ImageSourceDetails): + + def __init__(self): + + self.swagger_types = { + 'source_type': 'str', + 'source_uri': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'source_uri': 'sourceUri' + } + + self._source_type = None + self._source_uri = None + self._source_type = 'objectStorageUri' + + @property + def source_uri(self): + """ + Gets the source_uri of this ImageSourceViaObjectStorageUriDetails. + The Object Storage Service URL for the image. + + + :return: The source_uri of this ImageSourceViaObjectStorageUriDetails. + :rtype: str + """ + return self._source_uri + + @source_uri.setter + def source_uri(self, source_uri): + """ + Sets the source_uri of this ImageSourceViaObjectStorageUriDetails. + The Object Storage Service URL for the image. + + + :param source_uri: The source_uri of this ImageSourceViaObjectStorageUriDetails. + :type: str + """ + self._source_uri = source_uri + + 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/oraclebmc/core/models/instance.py b/src/oraclebmc/core/models/instance.py index 4cfe684285..0d17f4ac70 100644 --- a/src/oraclebmc/core/models/instance.py +++ b/src/oraclebmc/core/models/instance.py @@ -109,6 +109,7 @@ def display_name(self): """ Gets the display_name of this Instance. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My bare metal instance` @@ -123,6 +124,7 @@ def display_name(self, display_name): """ Sets the display_name of this Instance. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My bare metal instance` diff --git a/src/oraclebmc/core/models/internet_gateway.py b/src/oraclebmc/core/models/internet_gateway.py index 801a4cd451..51f2a56f76 100644 --- a/src/oraclebmc/core/models/internet_gateway.py +++ b/src/oraclebmc/core/models/internet_gateway.py @@ -66,6 +66,7 @@ def display_name(self): """ Gets the display_name of this InternetGateway. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this InternetGateway. @@ -78,6 +79,7 @@ def display_name(self, display_name): """ Sets the display_name of this InternetGateway. 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 InternetGateway. diff --git a/src/oraclebmc/core/models/ip_sec_connection.py b/src/oraclebmc/core/models/ip_sec_connection.py index 23661894c5..2deef55465 100644 --- a/src/oraclebmc/core/models/ip_sec_connection.py +++ b/src/oraclebmc/core/models/ip_sec_connection.py @@ -93,6 +93,7 @@ def display_name(self): """ Gets the display_name of this IPSecConnection. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this IPSecConnection. @@ -105,6 +106,7 @@ def display_name(self, display_name): """ Sets the display_name of this IPSecConnection. 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 IPSecConnection. diff --git a/src/oraclebmc/core/models/launch_instance_details.py b/src/oraclebmc/core/models/launch_instance_details.py index 3507507ee4..8163f3f15d 100644 --- a/src/oraclebmc/core/models/launch_instance_details.py +++ b/src/oraclebmc/core/models/launch_instance_details.py @@ -105,7 +105,8 @@ def compartment_id(self, compartment_id): def create_vnic_details(self): """ Gets the create_vnic_details of this LaunchInstanceDetails. - Details for the VNIC that is automatically created when an instance is launched. + Details for the primary VNIC, which is automatically created and attached when + the instance is launched. :return: The create_vnic_details of this LaunchInstanceDetails. @@ -117,7 +118,8 @@ def create_vnic_details(self): def create_vnic_details(self, create_vnic_details): """ Sets the create_vnic_details of this LaunchInstanceDetails. - Details for the VNIC that is automatically created when an instance is launched. + Details for the primary VNIC, which is automatically created and attached when + the instance is launched. :param create_vnic_details: The create_vnic_details of this LaunchInstanceDetails. @@ -130,6 +132,7 @@ def display_name(self): """ Gets the display_name of this LaunchInstanceDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My bare metal instance` @@ -144,6 +147,7 @@ def display_name(self, display_name): """ Sets the display_name of this LaunchInstanceDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My bare metal instance` diff --git a/src/oraclebmc/core/models/private_ip.py b/src/oraclebmc/core/models/private_ip.py new file mode 100644 index 0000000000..a543a3075f --- /dev/null +++ b/src/oraclebmc/core/models/private_ip.py @@ -0,0 +1,351 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class PrivateIp(object): + + def __init__(self): + + self.swagger_types = { + 'availability_domain': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'hostname_label': 'str', + 'id': 'str', + 'ip_address': 'str', + 'is_primary': 'bool', + 'subnet_id': 'str', + 'time_created': 'datetime', + 'vnic_id': 'str' + } + + self.attribute_map = { + 'availability_domain': 'availabilityDomain', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'hostname_label': 'hostnameLabel', + 'id': 'id', + 'ip_address': 'ipAddress', + 'is_primary': 'isPrimary', + 'subnet_id': 'subnetId', + 'time_created': 'timeCreated', + 'vnic_id': 'vnicId' + } + + self._availability_domain = None + self._compartment_id = None + self._display_name = None + self._hostname_label = None + self._id = None + self._ip_address = None + self._is_primary = None + self._subnet_id = None + self._time_created = None + self._vnic_id = None + + @property + def availability_domain(self): + """ + Gets the availability_domain of this PrivateIp. + The private IP's Availability Domain. + + Example: `Uocm:PHX-AD-1` + + + :return: The availability_domain of this PrivateIp. + :rtype: str + """ + return self._availability_domain + + @availability_domain.setter + def availability_domain(self, availability_domain): + """ + Sets the availability_domain of this PrivateIp. + The private IP's Availability Domain. + + Example: `Uocm:PHX-AD-1` + + + :param availability_domain: The availability_domain of this PrivateIp. + :type: str + """ + self._availability_domain = availability_domain + + @property + def compartment_id(self): + """ + Gets the compartment_id of this PrivateIp. + The OCID of the compartment containing the private IP. + + + :return: The compartment_id of this PrivateIp. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this PrivateIp. + The OCID of the compartment containing the private IP. + + + :param compartment_id: The compartment_id of this PrivateIp. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this PrivateIp. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this PrivateIp. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this PrivateIp. + 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 PrivateIp. + :type: str + """ + self._display_name = display_name + + @property + def hostname_label(self): + """ + Gets the hostname_label of this PrivateIp. + The hostname for the private IP. Used for DNS. The value is the hostname + portion of the private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + Example: `bminstance-1` + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :return: The hostname_label of this PrivateIp. + :rtype: str + """ + return self._hostname_label + + @hostname_label.setter + def hostname_label(self, hostname_label): + """ + Sets the hostname_label of this PrivateIp. + The hostname for the private IP. Used for DNS. The value is the hostname + portion of the private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + Example: `bminstance-1` + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :param hostname_label: The hostname_label of this PrivateIp. + :type: str + """ + self._hostname_label = hostname_label + + @property + def id(self): + """ + Gets the id of this PrivateIp. + The private IP's Oracle ID (OCID). + + + :return: The id of this PrivateIp. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this PrivateIp. + The private IP's Oracle ID (OCID). + + + :param id: The id of this PrivateIp. + :type: str + """ + self._id = id + + @property + def ip_address(self): + """ + Gets the ip_address of this PrivateIp. + The private IP address of the `privateIp` object. The address is within the CIDR + of the VNIC's subnet. + + Example: `10.0.3.3` + + + :return: The ip_address of this PrivateIp. + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """ + Sets the ip_address of this PrivateIp. + The private IP address of the `privateIp` object. The address is within the CIDR + of the VNIC's subnet. + + Example: `10.0.3.3` + + + :param ip_address: The ip_address of this PrivateIp. + :type: str + """ + self._ip_address = ip_address + + @property + def is_primary(self): + """ + Gets the is_primary of this PrivateIp. + Whether this private IP is the primary one on the VNIC. Primary private IPs + are unassigned and deleted automatically when the VNIC is terminated. + + Example: `true` + + + :return: The is_primary of this PrivateIp. + :rtype: bool + """ + return self._is_primary + + @is_primary.setter + def is_primary(self, is_primary): + """ + Sets the is_primary of this PrivateIp. + Whether this private IP is the primary one on the VNIC. Primary private IPs + are unassigned and deleted automatically when the VNIC is terminated. + + Example: `true` + + + :param is_primary: The is_primary of this PrivateIp. + :type: bool + """ + self._is_primary = is_primary + + @property + def subnet_id(self): + """ + Gets the subnet_id of this PrivateIp. + The OCID of the subnet the VNIC is in. + + + :return: The subnet_id of this PrivateIp. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """ + Sets the subnet_id of this PrivateIp. + The OCID of the subnet the VNIC is in. + + + :param subnet_id: The subnet_id of this PrivateIp. + :type: str + """ + self._subnet_id = subnet_id + + @property + def time_created(self): + """ + Gets the time_created of this PrivateIp. + The date and time the private IP was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :return: The time_created of this PrivateIp. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this PrivateIp. + The date and time the private IP was created, in the format defined by RFC3339. + + Example: `2016-08-25T21:10:29.600Z` + + + :param time_created: The time_created of this PrivateIp. + :type: datetime + """ + self._time_created = time_created + + @property + def vnic_id(self): + """ + Gets the vnic_id of this PrivateIp. + The OCID of the VNIC the private IP is assigned to. The VNIC and private IP + must be in the same subnet. + + + :return: The vnic_id of this PrivateIp. + :rtype: str + """ + return self._vnic_id + + @vnic_id.setter + def vnic_id(self, vnic_id): + """ + Sets the vnic_id of this PrivateIp. + The OCID of the VNIC the private IP is assigned to. The VNIC and private IP + must be in the same subnet. + + + :param vnic_id: The vnic_id of this PrivateIp. + :type: str + """ + self._vnic_id = vnic_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/oraclebmc/core/models/route_table.py b/src/oraclebmc/core/models/route_table.py index 79cf27c57d..87f72d30a9 100644 --- a/src/oraclebmc/core/models/route_table.py +++ b/src/oraclebmc/core/models/route_table.py @@ -66,6 +66,7 @@ def display_name(self): """ Gets the display_name of this RouteTable. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this RouteTable. @@ -78,6 +79,7 @@ def display_name(self, display_name): """ Sets the display_name of this RouteTable. 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 RouteTable. diff --git a/src/oraclebmc/core/models/security_list.py b/src/oraclebmc/core/models/security_list.py index 2fa1300ed6..3d965d1568 100644 --- a/src/oraclebmc/core/models/security_list.py +++ b/src/oraclebmc/core/models/security_list.py @@ -69,6 +69,7 @@ def display_name(self): """ Gets the display_name of this SecurityList. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this SecurityList. @@ -81,6 +82,7 @@ def display_name(self, display_name): """ Sets the display_name of this SecurityList. 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 SecurityList. diff --git a/src/oraclebmc/core/models/subnet.py b/src/oraclebmc/core/models/subnet.py index 5c3bcaf60d..d621fcec37 100644 --- a/src/oraclebmc/core/models/subnet.py +++ b/src/oraclebmc/core/models/subnet.py @@ -173,6 +173,7 @@ def display_name(self): """ Gets the display_name of this Subnet. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this Subnet. @@ -185,6 +186,7 @@ def display_name(self, display_name): """ Sets the display_name of this Subnet. 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 Subnet. @@ -305,7 +307,8 @@ def prohibit_public_ip_on_vnic(self): Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified - otherwise during instance launch (with the `assignPublicIp` flag in + otherwise during instance launch or VNIC creation (with the + `assignPublicIp` flag in :class:`CreateVnicDetails`). If `prohibitPublicIpOnVnic` is set to true, VNICs created in this subnet cannot have public IP addresses (i.e., it's a private @@ -326,7 +329,8 @@ def prohibit_public_ip_on_vnic(self, prohibit_public_ip_on_vnic): Whether VNICs within this subnet can have public IP addresses. Defaults to false, which means VNICs created in this subnet will automatically be assigned public IP addresses unless specified - otherwise during instance launch (with the `assignPublicIp` flag in + otherwise during instance launch or VNIC creation (with the + `assignPublicIp` flag in :class:`CreateVnicDetails`). If `prohibitPublicIpOnVnic` is set to true, VNICs created in this subnet cannot have public IP addresses (i.e., it's a private diff --git a/src/oraclebmc/core/models/update_cpe_details.py b/src/oraclebmc/core/models/update_cpe_details.py index cd4514114c..093fac6114 100644 --- a/src/oraclebmc/core/models/update_cpe_details.py +++ b/src/oraclebmc/core/models/update_cpe_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateCpeDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateCpeDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateCpeDetails. 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 UpdateCpeDetails. diff --git a/src/oraclebmc/core/models/update_cross_connect_details.py b/src/oraclebmc/core/models/update_cross_connect_details.py index fde6b37c7c..dbd616f923 100644 --- a/src/oraclebmc/core/models/update_cross_connect_details.py +++ b/src/oraclebmc/core/models/update_cross_connect_details.py @@ -27,6 +27,7 @@ def display_name(self): """ Gets the display_name of this UpdateCrossConnectDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateCrossConnectDetails. @@ -39,6 +40,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateCrossConnectDetails. 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 UpdateCrossConnectDetails. diff --git a/src/oraclebmc/core/models/update_cross_connect_group_details.py b/src/oraclebmc/core/models/update_cross_connect_group_details.py index 0d3d90ec23..0a44a18186 100644 --- a/src/oraclebmc/core/models/update_cross_connect_group_details.py +++ b/src/oraclebmc/core/models/update_cross_connect_group_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateCrossConnectGroupDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateCrossConnectGroupDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateCrossConnectGroupDetails. 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 UpdateCrossConnectGroupDetails. diff --git a/src/oraclebmc/core/models/update_dhcp_details.py b/src/oraclebmc/core/models/update_dhcp_details.py index 3c2ce3b010..071a298940 100644 --- a/src/oraclebmc/core/models/update_dhcp_details.py +++ b/src/oraclebmc/core/models/update_dhcp_details.py @@ -27,6 +27,7 @@ def display_name(self): """ Gets the display_name of this UpdateDhcpDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateDhcpDetails. @@ -39,6 +40,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateDhcpDetails. 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 UpdateDhcpDetails. diff --git a/src/oraclebmc/core/models/update_drg_attachment_details.py b/src/oraclebmc/core/models/update_drg_attachment_details.py index 1142643c0a..3a47aa2a19 100644 --- a/src/oraclebmc/core/models/update_drg_attachment_details.py +++ b/src/oraclebmc/core/models/update_drg_attachment_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateDrgAttachmentDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateDrgAttachmentDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateDrgAttachmentDetails. 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 UpdateDrgAttachmentDetails. diff --git a/src/oraclebmc/core/models/update_drg_details.py b/src/oraclebmc/core/models/update_drg_details.py index 27369ea796..d719bb83bb 100644 --- a/src/oraclebmc/core/models/update_drg_details.py +++ b/src/oraclebmc/core/models/update_drg_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateDrgDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateDrgDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateDrgDetails. 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 UpdateDrgDetails. diff --git a/src/oraclebmc/core/models/update_image_details.py b/src/oraclebmc/core/models/update_image_details.py index 77cdf251ba..308c005ecb 100644 --- a/src/oraclebmc/core/models/update_image_details.py +++ b/src/oraclebmc/core/models/update_image_details.py @@ -23,7 +23,8 @@ def __init__(self): def display_name(self): """ Gets the display_name of this UpdateImageDetails. - The non-unique, changeable name of the image. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My custom Oracle Linux image` @@ -37,7 +38,8 @@ def display_name(self): def display_name(self, display_name): """ Sets the display_name of this UpdateImageDetails. - The non-unique, changeable name of the image. + A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My custom Oracle Linux image` diff --git a/src/oraclebmc/core/models/update_instance_details.py b/src/oraclebmc/core/models/update_instance_details.py index 3dff195be5..064088448d 100644 --- a/src/oraclebmc/core/models/update_instance_details.py +++ b/src/oraclebmc/core/models/update_instance_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateInstanceDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My bare metal instance` @@ -38,6 +39,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateInstanceDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. Example: `My bare metal instance` diff --git a/src/oraclebmc/core/models/update_internet_gateway_details.py b/src/oraclebmc/core/models/update_internet_gateway_details.py index 038ad29afa..fb0a016117 100644 --- a/src/oraclebmc/core/models/update_internet_gateway_details.py +++ b/src/oraclebmc/core/models/update_internet_gateway_details.py @@ -27,6 +27,7 @@ def display_name(self): """ Gets the display_name of this UpdateInternetGatewayDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateInternetGatewayDetails. @@ -39,6 +40,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateInternetGatewayDetails. 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 UpdateInternetGatewayDetails. diff --git a/src/oraclebmc/core/models/update_ip_sec_connection_details.py b/src/oraclebmc/core/models/update_ip_sec_connection_details.py index 38b14b3815..7839be360c 100644 --- a/src/oraclebmc/core/models/update_ip_sec_connection_details.py +++ b/src/oraclebmc/core/models/update_ip_sec_connection_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateIPSecConnectionDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateIPSecConnectionDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateIPSecConnectionDetails. 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 UpdateIPSecConnectionDetails. diff --git a/src/oraclebmc/core/models/update_private_ip_details.py b/src/oraclebmc/core/models/update_private_ip_details.py new file mode 100644 index 0000000000..06b57461d1 --- /dev/null +++ b/src/oraclebmc/core/models/update_private_ip_details.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class UpdatePrivateIpDetails(object): + + def __init__(self): + + self.swagger_types = { + 'display_name': 'str', + 'hostname_label': 'str', + 'vnic_id': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'hostname_label': 'hostnameLabel', + 'vnic_id': 'vnicId' + } + + self._display_name = None + self._hostname_label = None + self._vnic_id = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdatePrivateIpDetails. + A user-friendly name. Does not have to be unique, and it's changeable. Avoid + entering confidential information. + + + :return: The display_name of this UpdatePrivateIpDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdatePrivateIpDetails. + 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 UpdatePrivateIpDetails. + :type: str + """ + self._display_name = display_name + + @property + def hostname_label(self): + """ + Gets the hostname_label of this UpdatePrivateIpDetails. + The hostname for the private IP. Used for DNS. The value + is the hostname portion of the private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + Example: `bminstance-1` + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :return: The hostname_label of this UpdatePrivateIpDetails. + :rtype: str + """ + return self._hostname_label + + @hostname_label.setter + def hostname_label(self, hostname_label): + """ + Sets the hostname_label of this UpdatePrivateIpDetails. + The hostname for the private IP. Used for DNS. The value + is the hostname portion of the private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + Example: `bminstance-1` + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :param hostname_label: The hostname_label of this UpdatePrivateIpDetails. + :type: str + """ + self._hostname_label = hostname_label + + @property + def vnic_id(self): + """ + Gets the vnic_id of this UpdatePrivateIpDetails. + The OCID of the VNIC to reassign the private IP to. The VNIC must + be in the same subnet as the current VNIC. + + + :return: The vnic_id of this UpdatePrivateIpDetails. + :rtype: str + """ + return self._vnic_id + + @vnic_id.setter + def vnic_id(self, vnic_id): + """ + Sets the vnic_id of this UpdatePrivateIpDetails. + The OCID of the VNIC to reassign the private IP to. The VNIC must + be in the same subnet as the current VNIC. + + + :param vnic_id: The vnic_id of this UpdatePrivateIpDetails. + :type: str + """ + self._vnic_id = vnic_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/oraclebmc/core/models/update_route_table_details.py b/src/oraclebmc/core/models/update_route_table_details.py index 4429a6d7ec..f3170a73e7 100644 --- a/src/oraclebmc/core/models/update_route_table_details.py +++ b/src/oraclebmc/core/models/update_route_table_details.py @@ -27,6 +27,7 @@ def display_name(self): """ Gets the display_name of this UpdateRouteTableDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateRouteTableDetails. @@ -39,6 +40,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateRouteTableDetails. 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 UpdateRouteTableDetails. diff --git a/src/oraclebmc/core/models/update_security_list_details.py b/src/oraclebmc/core/models/update_security_list_details.py index d25f86f84b..8572d340a9 100644 --- a/src/oraclebmc/core/models/update_security_list_details.py +++ b/src/oraclebmc/core/models/update_security_list_details.py @@ -30,6 +30,7 @@ def display_name(self): """ Gets the display_name of this UpdateSecurityListDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateSecurityListDetails. @@ -42,6 +43,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateSecurityListDetails. 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 UpdateSecurityListDetails. diff --git a/src/oraclebmc/core/models/update_subnet_details.py b/src/oraclebmc/core/models/update_subnet_details.py index 48c02b1028..891d9ad1d0 100644 --- a/src/oraclebmc/core/models/update_subnet_details.py +++ b/src/oraclebmc/core/models/update_subnet_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateSubnetDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateSubnetDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateSubnetDetails. 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 UpdateSubnetDetails. diff --git a/src/oraclebmc/core/models/update_vcn_details.py b/src/oraclebmc/core/models/update_vcn_details.py index e0a8156e06..370c661e1d 100644 --- a/src/oraclebmc/core/models/update_vcn_details.py +++ b/src/oraclebmc/core/models/update_vcn_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateVcnDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateVcnDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateVcnDetails. 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 UpdateVcnDetails. diff --git a/src/oraclebmc/core/models/update_virtual_circuit_details.py b/src/oraclebmc/core/models/update_virtual_circuit_details.py index ba76b2cf16..35ef8b8a98 100644 --- a/src/oraclebmc/core/models/update_virtual_circuit_details.py +++ b/src/oraclebmc/core/models/update_virtual_circuit_details.py @@ -150,6 +150,7 @@ def display_name(self): """ Gets the display_name of this UpdateVirtualCircuitDetails. A user-friendly name. Does not have to be unique. + Avoid entering confidential information. To be updated only by the customer who owns the virtual circuit. @@ -164,6 +165,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateVirtualCircuitDetails. A user-friendly name. Does not have to be unique. + Avoid entering confidential information. To be updated only by the customer who owns the virtual circuit. diff --git a/src/oraclebmc/core/models/update_vnic_details.py b/src/oraclebmc/core/models/update_vnic_details.py new file mode 100644 index 0000000000..9194d5e35b --- /dev/null +++ b/src/oraclebmc/core/models/update_vnic_details.py @@ -0,0 +1,115 @@ +# coding: utf-8 +# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + + +from ...util import formatted_flat_dict + + +class UpdateVnicDetails(object): + + def __init__(self): + + self.swagger_types = { + 'display_name': 'str', + 'hostname_label': 'str' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'hostname_label': 'hostnameLabel' + } + + self._display_name = None + self._hostname_label = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateVnicDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateVnicDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateVnicDetails. + A user-friendly name. Does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateVnicDetails. + :type: str + """ + self._display_name = display_name + + @property + def hostname_label(self): + """ + Gets the hostname_label of this UpdateVnicDetails. + The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + portion of the primary private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + The value appears in the :class:`Vnic` object and also the + :class:`PrivateIp` object returned by + :func:`list_private_ips` and + :func:`get_private_ip`. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :return: The hostname_label of this UpdateVnicDetails. + :rtype: str + """ + return self._hostname_label + + @hostname_label.setter + def hostname_label(self, hostname_label): + """ + Sets the hostname_label of this UpdateVnicDetails. + The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + portion of the primary private IP's fully qualified domain name (FQDN) + (for example, `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). + Must be unique across all VNICs in the subnet and comply with + `RFC 952`__ and + `RFC 1123`__. + The value appears in the :class:`Vnic` object and also the + :class:`PrivateIp` object returned by + :func:`list_private_ips` and + :func:`get_private_ip`. + + For more information, see + `DNS in Your Virtual Cloud Network`__. + + __ https://tools.ietf.org/html/rfc952 + __ https://tools.ietf.org/html/rfc1123 + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm + + + :param hostname_label: The hostname_label of this UpdateVnicDetails. + :type: str + """ + self._hostname_label = hostname_label + + 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/oraclebmc/core/models/update_volume_backup_details.py b/src/oraclebmc/core/models/update_volume_backup_details.py index 7b2bd12937..6faf0ba0bc 100644 --- a/src/oraclebmc/core/models/update_volume_backup_details.py +++ b/src/oraclebmc/core/models/update_volume_backup_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateVolumeBackupDetails. A friendly user-specified name for the volume backup. + Avoid entering confidential information. :return: The display_name of this UpdateVolumeBackupDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateVolumeBackupDetails. A friendly user-specified name for the volume backup. + Avoid entering confidential information. :param display_name: The display_name of this UpdateVolumeBackupDetails. diff --git a/src/oraclebmc/core/models/update_volume_details.py b/src/oraclebmc/core/models/update_volume_details.py index 7316b289dd..a185075306 100644 --- a/src/oraclebmc/core/models/update_volume_details.py +++ b/src/oraclebmc/core/models/update_volume_details.py @@ -24,6 +24,7 @@ def display_name(self): """ Gets the display_name of this UpdateVolumeDetails. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this UpdateVolumeDetails. @@ -36,6 +37,7 @@ def display_name(self, display_name): """ Sets the display_name of this UpdateVolumeDetails. 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 UpdateVolumeDetails. diff --git a/src/oraclebmc/core/models/vcn.py b/src/oraclebmc/core/models/vcn.py index 5d7b63309b..378e318b27 100644 --- a/src/oraclebmc/core/models/vcn.py +++ b/src/oraclebmc/core/models/vcn.py @@ -178,6 +178,7 @@ def display_name(self): """ Gets the display_name of this Vcn. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this Vcn. @@ -190,6 +191,7 @@ def display_name(self, display_name): """ Sets the display_name of this Vcn. 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 Vcn. diff --git a/src/oraclebmc/core/models/virtual_circuit.py b/src/oraclebmc/core/models/virtual_circuit.py index 4a6aa57d4c..192dde0dd5 100644 --- a/src/oraclebmc/core/models/virtual_circuit.py +++ b/src/oraclebmc/core/models/virtual_circuit.py @@ -210,6 +210,7 @@ def display_name(self): """ Gets the display_name of this VirtualCircuit. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this VirtualCircuit. @@ -222,6 +223,7 @@ def display_name(self, display_name): """ Sets the display_name of this VirtualCircuit. 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 VirtualCircuit. diff --git a/src/oraclebmc/core/models/vnic.py b/src/oraclebmc/core/models/vnic.py index d3fc01abbd..4c1b4925b9 100644 --- a/src/oraclebmc/core/models/vnic.py +++ b/src/oraclebmc/core/models/vnic.py @@ -15,7 +15,9 @@ def __init__(self): 'display_name': 'str', 'hostname_label': 'str', 'id': 'str', + 'is_primary': 'bool', 'lifecycle_state': 'str', + 'mac_address': 'str', 'private_ip': 'str', 'public_ip': 'str', 'subnet_id': 'str', @@ -28,7 +30,9 @@ def __init__(self): 'display_name': 'displayName', 'hostname_label': 'hostnameLabel', 'id': 'id', + 'is_primary': 'isPrimary', 'lifecycle_state': 'lifecycleState', + 'mac_address': 'macAddress', 'private_ip': 'privateIp', 'public_ip': 'publicIp', 'subnet_id': 'subnetId', @@ -40,7 +44,9 @@ def __init__(self): self._display_name = None self._hostname_label = None self._id = None + self._is_primary = None self._lifecycle_state = None + self._mac_address = None self._private_ip = None self._public_ip = None self._subnet_id = None @@ -103,6 +109,7 @@ def display_name(self): """ Gets the display_name of this Vnic. A user-friendly name. Does not have to be unique. + Avoid entering confidential information. :return: The display_name of this Vnic. @@ -115,6 +122,7 @@ def display_name(self, display_name): """ Sets the display_name of this Vnic. A user-friendly name. Does not have to be unique. + Avoid entering confidential information. :param display_name: The display_name of this Vnic. @@ -126,14 +134,12 @@ def display_name(self, display_name): def hostname_label(self): """ Gets the hostname_label of this Vnic. - The hostname for the VNIC that is created during instance launch. - Used for DNS. The value is the hostname portion of the instance's - fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN - `bminstance-1.subnet123.vcn1.oraclevcn.com`). + The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + portion of the primary private IP's fully qualified domain name (FQDN) + (e.g., `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). Must be unique across all VNICs in the subnet and comply with `RFC 952`__ and `RFC 1123`__. - The value cannot be changed. For more information, see `DNS in Your Virtual Cloud Network`__. @@ -154,14 +160,12 @@ def hostname_label(self): def hostname_label(self, hostname_label): """ Sets the hostname_label of this Vnic. - The hostname for the VNIC that is created during instance launch. - Used for DNS. The value is the hostname portion of the instance's - fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN - `bminstance-1.subnet123.vcn1.oraclevcn.com`). + The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname + portion of the primary private IP's fully qualified domain name (FQDN) + (e.g., `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`). Must be unique across all VNICs in the subnet and comply with `RFC 952`__ and `RFC 1123`__. - The value cannot be changed. For more information, see `DNS in Your Virtual Cloud Network`__. @@ -202,6 +206,32 @@ def id(self, id): """ self._id = id + @property + def is_primary(self): + """ + Gets the is_primary of this Vnic. + Whether the VNIC is the primary VNIC (the VNIC that is automatically created + and attached during instance launch). + + + :return: The is_primary of this Vnic. + :rtype: bool + """ + return self._is_primary + + @is_primary.setter + def is_primary(self, is_primary): + """ + Sets the is_primary of this Vnic. + Whether the VNIC is the primary VNIC (the VNIC that is automatically created + and attached during instance launch). + + + :param is_primary: The is_primary of this Vnic. + :type: bool + """ + self._is_primary = is_primary + @property def lifecycle_state(self): """ @@ -232,12 +262,42 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def mac_address(self): + """ + Gets the mac_address of this Vnic. + The MAC address of the VNIC. + + Example: `00:00:17:B6:4D:DD` + + + :return: The mac_address of this Vnic. + :rtype: str + """ + return self._mac_address + + @mac_address.setter + def mac_address(self, mac_address): + """ + Sets the mac_address of this Vnic. + The MAC address of the VNIC. + + Example: `00:00:17:B6:4D:DD` + + + :param mac_address: The mac_address of this Vnic. + :type: str + """ + self._mac_address = mac_address + @property def private_ip(self): """ Gets the private_ip of this Vnic. - The private IP address of the VNIC. The address is within the subnet's CIDR - and is accessible within the VCN. + The private IP address of the primary `privateIp` object on the VNIC. + The address is within the CIDR of the VNIC's subnet. + + Example: `10.0.3.3` :return: The private_ip of this Vnic. @@ -249,8 +309,10 @@ def private_ip(self): def private_ip(self, private_ip): """ Sets the private_ip of this Vnic. - The private IP address of the VNIC. The address is within the subnet's CIDR - and is accessible within the VCN. + The private IP address of the primary `privateIp` object on the VNIC. + The address is within the CIDR of the VNIC's subnet. + + Example: `10.0.3.3` :param private_ip: The private_ip of this Vnic. diff --git a/src/oraclebmc/core/models/vnic_attachment.py b/src/oraclebmc/core/models/vnic_attachment.py index 50045dc6f4..d7c5e61b0e 100644 --- a/src/oraclebmc/core/models/vnic_attachment.py +++ b/src/oraclebmc/core/models/vnic_attachment.py @@ -18,6 +18,7 @@ def __init__(self): 'lifecycle_state': 'str', 'subnet_id': 'str', 'time_created': 'datetime', + 'vlan_tag': 'int', 'vnic_id': 'str' } @@ -30,6 +31,7 @@ def __init__(self): 'lifecycle_state': 'lifecycleState', 'subnet_id': 'subnetId', 'time_created': 'timeCreated', + 'vlan_tag': 'vlanTag', 'vnic_id': 'vnicId' } @@ -41,13 +43,14 @@ def __init__(self): self._lifecycle_state = None self._subnet_id = None self._time_created = None + self._vlan_tag = None self._vnic_id = None @property def availability_domain(self): """ Gets the availability_domain of this VnicAttachment. - The Availability Domain of an instance. + The Availability Domain of the instance. Example: `Uocm:PHX-AD-1` @@ -61,7 +64,7 @@ def availability_domain(self): def availability_domain(self, availability_domain): """ Sets the availability_domain of this VnicAttachment. - The Availability Domain of an instance. + The Availability Domain of the instance. Example: `Uocm:PHX-AD-1` @@ -75,7 +78,8 @@ def availability_domain(self, availability_domain): def compartment_id(self): """ Gets the compartment_id of this VnicAttachment. - The OCID of the compartment. + The OCID of the compartment the VNIC attachment is in, which is the same + compartment the instance is in. :return: The compartment_id of this VnicAttachment. @@ -87,7 +91,8 @@ def compartment_id(self): def compartment_id(self, compartment_id): """ Sets the compartment_id of this VnicAttachment. - The OCID of the compartment. + The OCID of the compartment the VNIC attachment is in, which is the same + compartment the instance is in. :param compartment_id: The compartment_id of this VnicAttachment. @@ -100,6 +105,7 @@ def display_name(self): """ Gets the display_name of this VnicAttachment. A user-friendly name. Does not have to be unique. + Avoid entering confidential information. :return: The display_name of this VnicAttachment. @@ -112,6 +118,7 @@ def display_name(self, display_name): """ Sets the display_name of this VnicAttachment. A user-friendly name. Does not have to be unique. + Avoid entering confidential information. :param display_name: The display_name of this VnicAttachment. @@ -201,7 +208,7 @@ def lifecycle_state(self, lifecycle_state): def subnet_id(self): """ Gets the subnet_id of this VnicAttachment. - The OCID of the subnet of the VNIC. + The OCID of the VNIC's subnet. :return: The subnet_id of this VnicAttachment. @@ -213,7 +220,7 @@ def subnet_id(self): def subnet_id(self, subnet_id): """ Sets the subnet_id of this VnicAttachment. - The OCID of the subnet of the VNIC. + The OCID of the VNIC's subnet. :param subnet_id: The subnet_id of this VnicAttachment. @@ -249,11 +256,41 @@ def time_created(self, time_created): """ self._time_created = time_created + @property + def vlan_tag(self): + """ + Gets the vlan_tag of this VnicAttachment. + The Oracle-assigned VLAN tag of the attached VNIC. Available after the + attachment process is complete. + + Example: `0` + + + :return: The vlan_tag of this VnicAttachment. + :rtype: int + """ + return self._vlan_tag + + @vlan_tag.setter + def vlan_tag(self, vlan_tag): + """ + Sets the vlan_tag of this VnicAttachment. + The Oracle-assigned VLAN tag of the attached VNIC. Available after the + attachment process is complete. + + Example: `0` + + + :param vlan_tag: The vlan_tag of this VnicAttachment. + :type: int + """ + self._vlan_tag = vlan_tag + @property def vnic_id(self): """ Gets the vnic_id of this VnicAttachment. - The OCID of the VNIC. + The OCID of the VNIC. Available after the attachment process is complete. :return: The vnic_id of this VnicAttachment. @@ -265,7 +302,7 @@ def vnic_id(self): def vnic_id(self, vnic_id): """ Sets the vnic_id of this VnicAttachment. - The OCID of the VNIC. + The OCID of the VNIC. Available after the attachment process is complete. :param vnic_id: The vnic_id of this VnicAttachment. diff --git a/src/oraclebmc/core/models/volume.py b/src/oraclebmc/core/models/volume.py index 2e908fa990..71101b7739 100644 --- a/src/oraclebmc/core/models/volume.py +++ b/src/oraclebmc/core/models/volume.py @@ -94,6 +94,7 @@ def display_name(self): """ Gets the display_name of this Volume. A user-friendly name. Does not have to be unique, and it's changeable. + Avoid entering confidential information. :return: The display_name of this Volume. @@ -106,6 +107,7 @@ def display_name(self, display_name): """ Sets the display_name of this Volume. 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 Volume. diff --git a/src/oraclebmc/core/models/volume_attachment.py b/src/oraclebmc/core/models/volume_attachment.py index bc554261a1..200cb2ddbc 100644 --- a/src/oraclebmc/core/models/volume_attachment.py +++ b/src/oraclebmc/core/models/volume_attachment.py @@ -137,6 +137,7 @@ def display_name(self): """ Gets the display_name of this VolumeAttachment. A user-friendly name. Does not have to be unique, and it cannot be changed. + Avoid entering confidential information. Example: `My volume attachment` @@ -151,6 +152,7 @@ def display_name(self, display_name): """ Sets the display_name of this VolumeAttachment. A user-friendly name. Does not have to be unique, and it cannot be changed. + Avoid entering confidential information. Example: `My volume attachment` diff --git a/src/oraclebmc/core/models/volume_backup.py b/src/oraclebmc/core/models/volume_backup.py index fd0337d301..64f22e4e2d 100644 --- a/src/oraclebmc/core/models/volume_backup.py +++ b/src/oraclebmc/core/models/volume_backup.py @@ -72,6 +72,7 @@ def display_name(self): """ Gets the display_name of this VolumeBackup. A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + Avoid entering confidential information. :return: The display_name of this VolumeBackup. @@ -84,6 +85,7 @@ def display_name(self, display_name): """ Sets the display_name of this VolumeBackup. A user-friendly name for the volume backup. Does not have to be unique and it's changeable. + Avoid entering confidential information. :param display_name: The display_name of this VolumeBackup. diff --git a/src/oraclebmc/core/virtual_network_client.py b/src/oraclebmc/core/virtual_network_client.py index e87172d324..4117425cb3 100644 --- a/src/oraclebmc/core/virtual_network_client.py +++ b/src/oraclebmc/core/virtual_network_client.py @@ -43,7 +43,7 @@ def create_cpe(self, create_cpe_details, **kwargs): `Configuring Your On-Premise Router`__. You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to - be unique, and you can change it. + be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm @@ -111,7 +111,7 @@ def create_cross_connect(self, create_cross_connect_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the cross-connect. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm @@ -174,7 +174,7 @@ def create_cross_connect_group(self, create_cross_connect_group_details, **kwarg `Resource Identifiers`__. You may optionally specify a *display name* for the cross-connect group. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm @@ -234,7 +234,7 @@ def create_dhcp_options(self, create_dhcp_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the set of DHCP options, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm @@ -293,7 +293,7 @@ def create_drg(self, create_drg_details, **kwargs): For information about OCIDs, see `Resource Identifiers`__. You may optionally specify a *display name* for the DRG, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm @@ -348,7 +348,7 @@ def create_drg_attachment(self, create_drg_attachment_details, **kwargs): `Managing Dynamic Routing Gateways (DRGs)`__. You may optionally specify a *display name* for the attachment, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. For the purposes of access control, the DRG attachment is automatically placed into the same compartment as the VCN. For more information about compartments and access control, see @@ -411,7 +411,7 @@ def create_internet_gateway(self, create_internet_gateway_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the Internet Gateway, otherwise a default is provided. It - does not have to be unique, and you can change it. + does not have to be unique, and you can change it. Avoid entering confidential information. For traffic to flow between a subnet and an Internet Gateway, you must create a route rule accordingly in the subnet's route table (e.g., 0.0.0.0/0 > Internet Gateway). See @@ -484,7 +484,7 @@ def create_ip_sec_connection(self, create_ip_sec_connection_details, **kwargs): For information about OCIDs, see `Resource Identifiers`__. You may optionally specify a *display name* for the IPSec connection, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. After creating the IPSec connection, you need to configure your on-premise router with tunnel-specific information returned by @@ -541,6 +541,55 @@ def create_ip_sec_connection(self, create_ip_sec_connection_details, **kwargs): body=create_ip_sec_connection_details, response_type="IPSecConnection") + def create_private_ip(self, create_private_ip_details, **kwargs): + """ + CreatePrivateIp + Creates a secondary private IP for the specified VNIC. + For more information about secondary private IPs, see + `Managing IP Addresses`__. + + __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPaddresses.htm + + + :param CreatePrivateIpDetails create_private_ip_details: (required) + Create private IP details. + + :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 (e.g., if a resource + has been deleted and purged from the system, then a retry of the original creation request + may be rejected). + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.PrivateIp` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/privateIps" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "opc_retry_token" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_private_ip 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) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_private_ip_details, + response_type="PrivateIp") + def create_route_table(self, create_route_table_details, **kwargs): """ CreateRouteTable @@ -557,7 +606,7 @@ def create_route_table(self, create_route_table_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the route table, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingroutetables.htm @@ -620,7 +669,7 @@ def create_security_list(self, create_security_list_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the security list, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. __ https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/securitylists.htm __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/servicelimits.htm @@ -696,7 +745,7 @@ def create_subnet(self, create_subnet_details, **kwargs): `Managing DHCP Options`__. You may optionally specify a *display name* for the subnet, otherwise a default is provided. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. You can also add a DNS label for the subnet, which is required if you want the Internet and VCN Resolver to resolve hostnames for instances in the subnet. For more information, see @@ -757,10 +806,10 @@ def create_vcn(self, create_vcn_details, **kwargs): Creates a new Virtual Cloud Network (VCN). For more information, see `Managing Virtual Cloud Networks (VCNs)`__. - For the VCN you must specify a single, contiguous IPv4 CIDR block in the private IP address ranges specified in - `RFC 1918`__ (10.0.0.0/8, 172.16/12, and 192.168/16). Example: 172.16.0.0/16. - The CIDR block can range from /16 to /30, and it must not overlap with your on-premise network. You can't - change the size of the VCN after creation. + For the VCN you must specify a single, contiguous IPv4 CIDR block. Oracle recommends using one of the + private IP address ranges specified in `RFC 1918`__ (10.0.0.0/8, + 172.16/12, and 192.168/16). Example: 172.16.0.0/16. The CIDR block can range from /16 to /30, and it + must not overlap with your on-premise network. You can't change the size of the VCN after creation. For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to reside. Consult an Oracle Bare Metal Cloud Services administrator in your organization if you're not sure which @@ -770,7 +819,7 @@ def create_vcn(self, create_vcn_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to - be unique, and you can change it. + be unique, and you can change it. Avoid entering confidential information. You can also add a DNS label for the VCN, which is required if you want the instances to use the Interent and VCN Resolver option for DNS in the VCN. For more information, see @@ -848,7 +897,7 @@ def create_virtual_circuit(self, create_virtual_circuit_details, **kwargs): `Resource Identifiers`__. You may optionally specify a *display name* for the virtual circuit. - It does not have to be unique, and you can change it. + It does not have to be unique, and you can change it. Avoid entering confidential information. **Important:** When creating a virtual circuit, you specify a DRG for the traffic to flow through. Make sure you attach the DRG to your @@ -1302,6 +1351,58 @@ def delete_ip_sec_connection(self, ipsc_id, **kwargs): path_params=path_params, header_params=header_params) + def delete_private_ip(self, private_ip_id, **kwargs): + """ + DeletePrivateIp + Unassigns and deletes the specified private IP. You must + specify the object's OCID. The private IP address is returned to + the subnet's pool of available addresses. + + This operation cannot be used with primary private IPs, which are + automatically unassigned and deleted when the VNIC is terminated. + + + :param str private_ip_id: (required) + The private IP's OCID. + + :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. + + :return: A :class:`~oraclebmc.response.Response` object with data of type None + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/privateIps/{privateIpId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_private_ip got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "privateIpId": private_ip_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + def delete_route_table(self, rt_id, **kwargs): """ DeleteRouteTable @@ -1988,6 +2089,45 @@ def get_ip_sec_connection_device_status(self, ipsc_id, **kwargs): header_params=header_params, response_type="IPSecConnectionDeviceStatus") + def get_private_ip(self, private_ip_id, **kwargs): + """ + GetPrivateIp + Gets the specified private IP. You must specify the object's OCID. + Alternatively, you can get the object by using + :func:`list_private_ips` + with the private IP address (for example, 10.0.3.3) and subnet OCID. + + + :param str private_ip_id: (required) + The private IP's OCID. + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.PrivateIp` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/privateIps/{privateIpId}" + method = "GET" + + if kwargs: + raise ValueError( + "get_private_ip got unknown kwargs: {!r}".format(kwargs)) + + path_params = { + "privateIpId": private_ip_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="PrivateIp") + def get_route_table(self, rt_id, **kwargs): """ GetRouteTable @@ -2171,9 +2311,10 @@ def get_virtual_circuit(self, virtual_circuit_id, **kwargs): def get_vnic(self, vnic_id, **kwargs): """ GetVnic - Gets the information for the specified Virtual Network Interface Card (VNIC), including - the IP addresses. You can get the instance's VNIC OCID from the - :func:`list_vnic_attachments` operation. + Gets the information for the specified virtual network interface card (VNIC). + You can get the VNIC OCID from the + :func:`list_vnic_attachments` + operation. :param str vnic_id: (required) @@ -2827,6 +2968,83 @@ def list_ip_sec_connections(self, compartment_id, **kwargs): header_params=header_params, response_type="list[IPSecConnection]") + def list_private_ips(self, **kwargs): + """ + ListPrivateIps + Lists the :class:`PrivateIp` objects based + on one of these filters: + + - Subnet OCID. + - VNIC OCID. + - Both private IP address and subnet OCID: This lets + you get a `privateIP` object based on its private IP + address (for example, 10.0.3.3) and not its OCID. For comparison, + :func:`get_private_ip` + requires the OCID. + + If you're listing all the private IPs associated with a given subnet + or VNIC, the response includes both primary and secondary private IPs. + + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + Example: `500` + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous \"List\" call. + + :param str ip_address: (optional) + The private IP address of the `privateIp` object. + + Example: `10.0.3.3` + + :param str subnet_id: (optional) + The OCID of the subnet. + + :param str vnic_id: (optional) + The OCID of the VNIC. + + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.core.models.PrivateIp` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/privateIps" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "limit", + "page", + "ip_address", + "subnet_id", + "vnic_id" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_private_ips got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "ipAddress": kwargs.get("ip_address", missing), + "subnetId": kwargs.get("subnet_id", missing), + "vnicId": kwargs.get("vnic_id", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json" + } + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[PrivateIp]") + def list_route_tables(self, compartment_id, vcn_id, **kwargs): """ ListRouteTables @@ -3166,6 +3384,7 @@ def update_cpe(self, cpe_id, update_cpe_details, **kwargs): """ UpdateCpe Updates the specified CPE's display name. + Avoid entering confidential information. :param str cpe_id: (required) @@ -3270,6 +3489,7 @@ def update_cross_connect_group(self, cross_connect_group_id, update_cross_connec """ UpdateCrossConnectGroup Updates the specified cross-connect group's display name. + Avoid entering confidential information. :param str cross_connect_group_id: (required) @@ -3322,7 +3542,9 @@ def update_dhcp_options(self, dhcp_id, update_dhcp_details, **kwargs): """ UpdateDhcpOptions Updates the specified set of DHCP options. You can update the display name or the options - themselves. Note that the `options` object you provide replaces the entire existing set of options. + themselves. Avoid entering confidential information. + + Note that the `options` object you provide replaces the entire existing set of options. :param str dhcp_id: (required) @@ -3374,7 +3596,7 @@ def update_dhcp_options(self, dhcp_id, update_dhcp_details, **kwargs): def update_drg(self, drg_id, update_drg_details, **kwargs): """ UpdateDrg - Updates the specified DRG's display name. + Updates the specified DRG's display name. Avoid entering confidential information. :param str drg_id: (required) @@ -3427,6 +3649,7 @@ def update_drg_attachment(self, drg_attachment_id, update_drg_attachment_details """ UpdateDrgAttachment Updates the display name for the specified `DrgAttachment`. + Avoid entering confidential information. :param str drg_attachment_id: (required) @@ -3479,6 +3702,7 @@ def update_internet_gateway(self, ig_id, update_internet_gateway_details, **kwar """ UpdateInternetGateway Updates the specified Internet Gateway. You can disable/enable it, or change its display name. + Avoid entering confidential information. If the gateway is disabled, that means no traffic will flow to/from the internet even if there's a route rule that enables that traffic. @@ -3534,6 +3758,7 @@ def update_ip_sec_connection(self, ipsc_id, update_ip_sec_connection_details, ** """ UpdateIPSecConnection Updates the display name for the specified IPSec connection. + Avoid entering confidential information. :param str ipsc_id: (required) @@ -3582,11 +3807,74 @@ def update_ip_sec_connection(self, ipsc_id, update_ip_sec_connection_details, ** body=update_ip_sec_connection_details, response_type="IPSecConnection") + def update_private_ip(self, private_ip_id, update_private_ip_details, **kwargs): + """ + UpdatePrivateIp + Updates the specified private IP. You must specify the object's OCID. + Use this operation if you want to: + + - Move a secondary private IP to a different VNIC in the same subnet. + - Change the display name for a secondary private IP. + - Change the hostname for a secondary private IP. + + This operation cannot be used with primary private IPs. + To update the hostname for the primary IP on a VNIC, use + :func:`update_vnic`. + + + :param str private_ip_id: (required) + The private IP's OCID. + + :param UpdatePrivateIpDetails update_private_ip_details: (required) + Private IP details. + + :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. + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.PrivateIp` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/privateIps/{privateIpId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_private_ip got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "privateIpId": private_ip_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_private_ip_details, + response_type="PrivateIp") + def update_route_table(self, rt_id, update_route_table_details, **kwargs): """ UpdateRouteTable - Updates the specified route table's display name or route rules. Note that the - `routeRules` object you provide replaces the entire existing set of rules. + Updates the specified route table's display name or route rules. + Avoid entering confidential information. + + Note that the `routeRules` object you provide replaces the entire existing set of rules. :param str rt_id: (required) @@ -3638,8 +3926,10 @@ def update_route_table(self, rt_id, update_route_table_details, **kwargs): def update_security_list(self, security_list_id, update_security_list_details, **kwargs): """ UpdateSecurityList - Updates the specified security list's display name or rules. Note that the - `egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire + Updates the specified security list's display name or rules. + Avoid entering confidential information. + + Note that the `egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire existing objects. @@ -3692,7 +3982,7 @@ def update_security_list(self, security_list_id, update_security_list_details, * def update_subnet(self, subnet_id, update_subnet_details, **kwargs): """ UpdateSubnet - Updates the specified subnet's display name. + Updates the specified subnet's display name. Avoid entering confidential information. :param str subnet_id: (required) @@ -3745,6 +4035,7 @@ def update_vcn(self, vcn_id, update_vcn_details, **kwargs): """ UpdateVcn Updates the specified VCN's display name. + Avoid entering confidential information. :param str vcn_id: (required) @@ -3861,3 +4152,55 @@ def update_virtual_circuit(self, virtual_circuit_id, update_virtual_circuit_deta header_params=header_params, body=update_virtual_circuit_details, response_type="VirtualCircuit") + + def update_vnic(self, vnic_id, update_vnic_details, **kwargs): + """ + UpdateVnic + Updates the specified VNIC. + + + :param str vnic_id: (required) + The OCID of the VNIC. + + :param UpdateVnicDetails update_vnic_details: (required) + Details object for updating a VNIC. + + :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. + + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Vnic` + :rtype: :class:`~oraclebmc.response.Response` + """ + resource_path = "/vnics/{vnicId}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "if_match" + ] + extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_vnic got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "vnicId": vnic_id + } + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing} + + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_vnic_details, + response_type="Vnic") diff --git a/src/oraclebmc/load_balancer/load_balancer_client.py b/src/oraclebmc/load_balancer/load_balancer_client.py index 46a99c3794..d23c7f5e31 100644 --- a/src/oraclebmc/load_balancer/load_balancer_client.py +++ b/src/oraclebmc/load_balancer/load_balancer_client.py @@ -654,7 +654,7 @@ def get_backend(self, load_balancer_id, backend_set_name, backend_name, **kwargs The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.loadbalancer.models.Backend` + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.load_balancer.models.Backend` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}" @@ -710,7 +710,7 @@ def get_backend_set(self, load_balancer_id, backend_set_name, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.loadbalancer.models.BackendSet` + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.load_balancer.models.BackendSet` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}" @@ -765,7 +765,7 @@ def get_health_checker(self, load_balancer_id, backend_set_name, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.loadbalancer.models.HealthChecker` + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.load_balancer.models.HealthChecker` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker" @@ -815,7 +815,7 @@ def get_load_balancer(self, load_balancer_id, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.loadbalancer.models.LoadBalancer` + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.load_balancer.models.LoadBalancer` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}" @@ -864,7 +864,7 @@ def get_work_request(self, work_request_id, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.loadbalancer.models.WorkRequest` + :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.load_balancer.models.WorkRequest` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancerWorkRequests/{workRequestId}" @@ -913,7 +913,7 @@ def list_backend_sets(self, load_balancer_id, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.BackendSet` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.BackendSet` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/backendSets" @@ -967,7 +967,7 @@ def list_backends(self, load_balancer_id, backend_set_name, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.Backend` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.Backend` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends" @@ -1017,7 +1017,7 @@ def list_certificates(self, load_balancer_id, **kwargs): The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.Certificate` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.Certificate` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/certificates" @@ -1081,7 +1081,7 @@ def list_load_balancers(self, compartment_id, **kwargs): Example: `full` - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.LoadBalancer` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.LoadBalancer` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers" @@ -1146,7 +1146,7 @@ def list_policies(self, compartment_id, **kwargs): Example: `3` - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.LoadBalancerPolicy` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.LoadBalancerPolicy` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancerPolicies" @@ -1209,7 +1209,7 @@ def list_protocols(self, compartment_id, **kwargs): Example: `3` - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.LoadBalancerProtocol` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.LoadBalancerProtocol` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancerProtocols" @@ -1272,7 +1272,7 @@ def list_shapes(self, compartment_id, **kwargs): Example: `3` - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.LoadBalancerShape` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.LoadBalancerShape` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancerShapes" @@ -1335,7 +1335,7 @@ def list_work_requests(self, load_balancer_id, **kwargs): Example: `3` - :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.loadbalancer.models.WorkRequest` + :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.load_balancer.models.WorkRequest` :rtype: :class:`~oraclebmc.response.Response` """ resource_path = "/loadBalancers/{loadBalancerId}/workRequests" diff --git a/src/oraclebmc/version.py b/src/oraclebmc/version.py index 9dd9cd63b1..74414e7419 100644 --- a/src/oraclebmc/version.py +++ b/src/oraclebmc/version.py @@ -1,4 +1,4 @@ # coding: utf-8 # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. -__version__ = "1.3.4" +__version__ = "1.3.5"