diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/README.rst b/sdk/compute/azure-mgmt-vmwarecloudsimple/README.rst index e0615df54c39..201bddef967f 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/README.rst +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure MyService Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_configuration.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_configuration.py index ddc50f9ea81a..714af4bb26e9 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_configuration.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_configuration.py @@ -21,26 +21,22 @@ class VMwareCloudSimpleClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param referer: referer url - :type referer: str - :param region_id: The region Id (westus, eastus) - :type region_id: str :param subscription_id: The subscription ID. :type subscription_id: str + :param referer: referer url + :type referer: str :param str base_url: Service URL """ def __init__( - self, credentials, referer, region_id, subscription_id, base_url=None): + self, credentials, subscription_id, referer, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") - if referer is None: - raise ValueError("Parameter 'referer' must not be None.") - if region_id is None: - raise ValueError("Parameter 'region_id' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") + if referer is None: + raise ValueError("Parameter 'referer' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -53,6 +49,5 @@ def __init__( self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials - self.referer = referer - self.region_id = region_id self.subscription_id = subscription_id + self.referer = referer diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_vmware_cloud_simple_client.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_vmware_cloud_simple_client.py index 0ae30709c1db..a3e375652686 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_vmware_cloud_simple_client.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/_vmware_cloud_simple_client.py @@ -13,72 +13,60 @@ from msrest import Serializer, Deserializer from ._configuration import VMwareCloudSimpleClientConfiguration -from .operations import VMwareCloudSimpleClientOperationsMixin -from .operations import AvailableOperations -from .operations import DedicatedCloudNodeOperations -from .operations import DedicatedCloudServiceOperations -from .operations import SkusAvailabilityWithinRegionOperations -from .operations import PrivateCloudByRegionOperations -from .operations import ResourcePoolsByPCOperations -from .operations import ResourcePoolByPCOperations -from .operations import VirtualMachineTemplatesByPCOperations -from .operations import VirtualMachineTemplateByPCOperations -from .operations import VirtualNetworksByPCOperations -from .operations import VirtualNetworkByPCOperations -from .operations import UsagesWithinRegionOperations -from .operations import VirtualMachineOperations +from .operations import Operations +from .operations import DedicatedCloudNodesOperations +from .operations import DedicatedCloudServicesOperations +from .operations import SkusAvailabilityOperations +from .operations import PrivateCloudsOperations +from .operations import ResourcePoolsOperations +from .operations import VirtualMachineTemplatesOperations +from .operations import VirtualNetworksOperations +from .operations import UsagesOperations +from .operations import VirtualMachinesOperations from . import models -class VMwareCloudSimpleClient(VMwareCloudSimpleClientOperationsMixin, SDKClient): +class VMwareCloudSimpleClient(SDKClient): """Description of the new service :ivar config: Configuration for client. :vartype config: VMwareCloudSimpleClientConfiguration - :ivar available_operations: AvailableOperations operations - :vartype available_operations: azure.mgmt.vmwarecloudsimple.operations.AvailableOperations - :ivar dedicated_cloud_node: DedicatedCloudNode operations - :vartype dedicated_cloud_node: azure.mgmt.vmwarecloudsimple.operations.DedicatedCloudNodeOperations - :ivar dedicated_cloud_service: DedicatedCloudService operations - :vartype dedicated_cloud_service: azure.mgmt.vmwarecloudsimple.operations.DedicatedCloudServiceOperations - :ivar skus_availability_within_region: SkusAvailabilityWithinRegion operations - :vartype skus_availability_within_region: azure.mgmt.vmwarecloudsimple.operations.SkusAvailabilityWithinRegionOperations - :ivar private_cloud_by_region: PrivateCloudByRegion operations - :vartype private_cloud_by_region: azure.mgmt.vmwarecloudsimple.operations.PrivateCloudByRegionOperations - :ivar resource_pools_by_pc: ResourcePoolsByPC operations - :vartype resource_pools_by_pc: azure.mgmt.vmwarecloudsimple.operations.ResourcePoolsByPCOperations - :ivar resource_pool_by_pc: ResourcePoolByPC operations - :vartype resource_pool_by_pc: azure.mgmt.vmwarecloudsimple.operations.ResourcePoolByPCOperations - :ivar virtual_machine_templates_by_pc: VirtualMachineTemplatesByPC operations - :vartype virtual_machine_templates_by_pc: azure.mgmt.vmwarecloudsimple.operations.VirtualMachineTemplatesByPCOperations - :ivar virtual_machine_template_by_pc: VirtualMachineTemplateByPC operations - :vartype virtual_machine_template_by_pc: azure.mgmt.vmwarecloudsimple.operations.VirtualMachineTemplateByPCOperations - :ivar virtual_networks_by_pc: VirtualNetworksByPC operations - :vartype virtual_networks_by_pc: azure.mgmt.vmwarecloudsimple.operations.VirtualNetworksByPCOperations - :ivar virtual_network_by_pc: VirtualNetworkByPC operations - :vartype virtual_network_by_pc: azure.mgmt.vmwarecloudsimple.operations.VirtualNetworkByPCOperations - :ivar usages_within_region: UsagesWithinRegion operations - :vartype usages_within_region: azure.mgmt.vmwarecloudsimple.operations.UsagesWithinRegionOperations - :ivar virtual_machine: VirtualMachine operations - :vartype virtual_machine: azure.mgmt.vmwarecloudsimple.operations.VirtualMachineOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.vmwarecloudsimple.operations.Operations + :ivar dedicated_cloud_nodes: DedicatedCloudNodes operations + :vartype dedicated_cloud_nodes: azure.mgmt.vmwarecloudsimple.operations.DedicatedCloudNodesOperations + :ivar dedicated_cloud_services: DedicatedCloudServices operations + :vartype dedicated_cloud_services: azure.mgmt.vmwarecloudsimple.operations.DedicatedCloudServicesOperations + :ivar skus_availability: SkusAvailability operations + :vartype skus_availability: azure.mgmt.vmwarecloudsimple.operations.SkusAvailabilityOperations + :ivar private_clouds: PrivateClouds operations + :vartype private_clouds: azure.mgmt.vmwarecloudsimple.operations.PrivateCloudsOperations + :ivar resource_pools: ResourcePools operations + :vartype resource_pools: azure.mgmt.vmwarecloudsimple.operations.ResourcePoolsOperations + :ivar virtual_machine_templates: VirtualMachineTemplates operations + :vartype virtual_machine_templates: azure.mgmt.vmwarecloudsimple.operations.VirtualMachineTemplatesOperations + :ivar virtual_networks: VirtualNetworks operations + :vartype virtual_networks: azure.mgmt.vmwarecloudsimple.operations.VirtualNetworksOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.vmwarecloudsimple.operations.UsagesOperations + :ivar virtual_machines: VirtualMachines operations + :vartype virtual_machines: azure.mgmt.vmwarecloudsimple.operations.VirtualMachinesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param referer: referer url - :type referer: str - :param region_id: The region Id (westus, eastus) - :type region_id: str :param subscription_id: The subscription ID. :type subscription_id: str + :param referer: referer url + :type referer: str :param str base_url: Service URL """ def __init__( - self, credentials, referer, region_id, subscription_id, base_url=None): + self, credentials, subscription_id, referer, base_url=None): - self.config = VMwareCloudSimpleClientConfiguration(credentials, referer, region_id, subscription_id, base_url) + self.config = VMwareCloudSimpleClientConfiguration(credentials, subscription_id, referer, base_url) super(VMwareCloudSimpleClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -86,29 +74,23 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.available_operations = AvailableOperations( - self._client, self.config, self._serialize, self._deserialize) - self.dedicated_cloud_node = DedicatedCloudNodeOperations( - self._client, self.config, self._serialize, self._deserialize) - self.dedicated_cloud_service = DedicatedCloudServiceOperations( - self._client, self.config, self._serialize, self._deserialize) - self.skus_availability_within_region = SkusAvailabilityWithinRegionOperations( + self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.private_cloud_by_region = PrivateCloudByRegionOperations( + self.dedicated_cloud_nodes = DedicatedCloudNodesOperations( self._client, self.config, self._serialize, self._deserialize) - self.resource_pools_by_pc = ResourcePoolsByPCOperations( + self.dedicated_cloud_services = DedicatedCloudServicesOperations( self._client, self.config, self._serialize, self._deserialize) - self.resource_pool_by_pc = ResourcePoolByPCOperations( + self.skus_availability = SkusAvailabilityOperations( self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_templates_by_pc = VirtualMachineTemplatesByPCOperations( + self.private_clouds = PrivateCloudsOperations( self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine_template_by_pc = VirtualMachineTemplateByPCOperations( + self.resource_pools = ResourcePoolsOperations( self._client, self.config, self._serialize, self._deserialize) - self.virtual_networks_by_pc = VirtualNetworksByPCOperations( + self.virtual_machine_templates = VirtualMachineTemplatesOperations( self._client, self.config, self._serialize, self._deserialize) - self.virtual_network_by_pc = VirtualNetworkByPCOperations( + self.virtual_networks = VirtualNetworksOperations( self._client, self.config, self._serialize, self._deserialize) - self.usages_within_region = UsagesWithinRegionOperations( + self.usages = UsagesOperations( self._client, self.config, self._serialize, self._deserialize) - self.virtual_machine = VirtualMachineOperations( + self.virtual_machines = VirtualMachinesOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models.py index 0eb5770a5a2a..a76f1d648bef 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models.py @@ -629,8 +629,8 @@ class ResourcePool(Model): :param id: Required. resource pool id (privateCloudId:vsphereId) :type id: str - :param location: Azure region - :type location: str + :ivar location: Azure region + :vartype location: str :ivar name: {ResourcePoolName} :vartype name: str :ivar private_cloud_id: The Private Cloud Id @@ -643,6 +643,7 @@ class ResourcePool(Model): _validation = { 'id': {'required': True}, + 'location': {'readonly': True}, 'name': {'readonly': True}, 'private_cloud_id': {'readonly': True}, 'full_name': {'readonly': True}, @@ -661,7 +662,7 @@ class ResourcePool(Model): def __init__(self, **kwargs): super(ResourcePool, self).__init__(**kwargs) self.id = kwargs.get('id', None) - self.location = kwargs.get('location', None) + self.location = None self.name = None self.private_cloud_id = None self.full_name = None @@ -935,11 +936,11 @@ class VirtualMachine(Model): :type expose_to_guest_vm: bool :ivar folder: The path to virtual machine folder in VCenter :vartype folder: str - :param guest_os: Required. The name of Guest OS - :type guest_os: str - :param guest_os_type: Required. The Guest OS type. Possible values - include: 'linux', 'windows', 'other' - :type guest_os_type: str or + :ivar guest_os: The name of Guest OS + :vartype guest_os: str + :ivar guest_os_type: The Guest OS type. Possible values include: 'linux', + 'windows', 'other' + :vartype guest_os_type: str or ~azure.mgmt.vmwarecloudsimple.models.GuestOSType :param nics: The list of Virtual NICs :type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic] @@ -984,8 +985,8 @@ class VirtualMachine(Model): 'controllers': {'readonly': True}, 'dnsname': {'readonly': True}, 'folder': {'readonly': True}, - 'guest_os': {'required': True}, - 'guest_os_type': {'required': True}, + 'guest_os': {'readonly': True}, + 'guest_os_type': {'readonly': True}, 'number_of_cores': {'required': True}, 'private_cloud_id': {'required': True}, 'provisioning_state': {'readonly': True}, @@ -1036,8 +1037,8 @@ def __init__(self, **kwargs): self.dnsname = None self.expose_to_guest_vm = kwargs.get('expose_to_guest_vm', None) self.folder = None - self.guest_os = kwargs.get('guest_os', None) - self.guest_os_type = kwargs.get('guest_os_type', None) + self.guest_os = None + self.guest_os_type = None self.nics = kwargs.get('nics', None) self.number_of_cores = kwargs.get('number_of_cores', None) self.password = kwargs.get('password', None) @@ -1098,10 +1099,10 @@ class VirtualMachineTemplate(Model): :type disks: list[~azure.mgmt.vmwarecloudsimple.models.VirtualDisk] :param expose_to_guest_vm: Expose Guest OS or not :type expose_to_guest_vm: bool - :param guest_os: Required. The Guest OS - :type guest_os: str - :param guest_os_type: Required. The Guest OS types - :type guest_os_type: str + :ivar guest_os: The Guest OS + :vartype guest_os: str + :ivar guest_os_type: The Guest OS types + :vartype guest_os_type: str :param nics: The list of Virtual NICs :type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic] :param number_of_cores: The number of CPU cores @@ -1123,8 +1124,8 @@ class VirtualMachineTemplate(Model): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'guest_os': {'required': True}, - 'guest_os_type': {'required': True}, + 'guest_os': {'readonly': True}, + 'guest_os_type': {'readonly': True}, 'private_cloud_id': {'required': True}, 'vmwaretools': {'readonly': True}, 'type': {'readonly': True}, @@ -1161,8 +1162,8 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) self.disks = kwargs.get('disks', None) self.expose_to_guest_vm = kwargs.get('expose_to_guest_vm', None) - self.guest_os = kwargs.get('guest_os', None) - self.guest_os_type = kwargs.get('guest_os_type', None) + self.guest_os = None + self.guest_os_type = None self.nics = kwargs.get('nics', None) self.number_of_cores = kwargs.get('number_of_cores', None) self.path = kwargs.get('path', None) @@ -1185,8 +1186,8 @@ class VirtualNetwork(Model): :vartype assignable: bool :param id: Required. virtual network id (privateCloudId:vsphereId) :type id: str - :param location: Azure region - :type location: str + :ivar location: Azure region + :vartype location: str :ivar name: {VirtualNetworkName} :vartype name: str :ivar private_cloud_id: The Private Cloud id @@ -1198,6 +1199,7 @@ class VirtualNetwork(Model): _validation = { 'assignable': {'readonly': True}, 'id': {'required': True}, + 'location': {'readonly': True}, 'name': {'readonly': True}, 'private_cloud_id': {'readonly': True}, 'type': {'readonly': True}, @@ -1216,7 +1218,7 @@ def __init__(self, **kwargs): super(VirtualNetwork, self).__init__(**kwargs) self.assignable = None self.id = kwargs.get('id', None) - self.location = kwargs.get('location', None) + self.location = None self.name = None self.private_cloud_id = None self.type = None @@ -1234,7 +1236,7 @@ class VirtualNic(Model): :type ip_addresses: list[str] :param mac_address: NIC MAC address :type mac_address: str - :param network: The list of Virtual Networks + :param network: Required. Virtual Network :type network: ~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork :param nic_type: Required. NIC type. Possible values include: 'E1000', 'E1000E', 'PCNET32', 'VMXNET', 'VMXNET2', 'VMXNET3' @@ -1248,6 +1250,7 @@ class VirtualNic(Model): """ _validation = { + 'network': {'required': True}, 'nic_type': {'required': True}, 'virtual_nic_name': {'readonly': True}, } diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models_py3.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models_py3.py index 7b8ded5e1cea..38389072b99d 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/models/_models_py3.py @@ -629,8 +629,8 @@ class ResourcePool(Model): :param id: Required. resource pool id (privateCloudId:vsphereId) :type id: str - :param location: Azure region - :type location: str + :ivar location: Azure region + :vartype location: str :ivar name: {ResourcePoolName} :vartype name: str :ivar private_cloud_id: The Private Cloud Id @@ -643,6 +643,7 @@ class ResourcePool(Model): _validation = { 'id': {'required': True}, + 'location': {'readonly': True}, 'name': {'readonly': True}, 'private_cloud_id': {'readonly': True}, 'full_name': {'readonly': True}, @@ -658,10 +659,10 @@ class ResourcePool(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str, location: str=None, **kwargs) -> None: + def __init__(self, *, id: str, **kwargs) -> None: super(ResourcePool, self).__init__(**kwargs) self.id = id - self.location = location + self.location = None self.name = None self.private_cloud_id = None self.full_name = None @@ -935,11 +936,11 @@ class VirtualMachine(Model): :type expose_to_guest_vm: bool :ivar folder: The path to virtual machine folder in VCenter :vartype folder: str - :param guest_os: Required. The name of Guest OS - :type guest_os: str - :param guest_os_type: Required. The Guest OS type. Possible values - include: 'linux', 'windows', 'other' - :type guest_os_type: str or + :ivar guest_os: The name of Guest OS + :vartype guest_os: str + :ivar guest_os_type: The Guest OS type. Possible values include: 'linux', + 'windows', 'other' + :vartype guest_os_type: str or ~azure.mgmt.vmwarecloudsimple.models.GuestOSType :param nics: The list of Virtual NICs :type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic] @@ -984,8 +985,8 @@ class VirtualMachine(Model): 'controllers': {'readonly': True}, 'dnsname': {'readonly': True}, 'folder': {'readonly': True}, - 'guest_os': {'required': True}, - 'guest_os_type': {'required': True}, + 'guest_os': {'readonly': True}, + 'guest_os_type': {'readonly': True}, 'number_of_cores': {'required': True}, 'private_cloud_id': {'required': True}, 'provisioning_state': {'readonly': True}, @@ -1025,7 +1026,7 @@ class VirtualMachine(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, location: str, amount_of_ram: int, guest_os: str, guest_os_type, number_of_cores: int, private_cloud_id: str, disks=None, expose_to_guest_vm: bool=None, nics=None, password: str=None, resource_pool=None, template_id: str=None, username: str=None, v_sphere_networks=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str, amount_of_ram: int, number_of_cores: int, private_cloud_id: str, disks=None, expose_to_guest_vm: bool=None, nics=None, password: str=None, resource_pool=None, template_id: str=None, username: str=None, v_sphere_networks=None, tags=None, **kwargs) -> None: super(VirtualMachine, self).__init__(**kwargs) self.id = None self.location = location @@ -1036,8 +1037,8 @@ def __init__(self, *, location: str, amount_of_ram: int, guest_os: str, guest_os self.dnsname = None self.expose_to_guest_vm = expose_to_guest_vm self.folder = None - self.guest_os = guest_os - self.guest_os_type = guest_os_type + self.guest_os = None + self.guest_os_type = None self.nics = nics self.number_of_cores = number_of_cores self.password = password @@ -1098,10 +1099,10 @@ class VirtualMachineTemplate(Model): :type disks: list[~azure.mgmt.vmwarecloudsimple.models.VirtualDisk] :param expose_to_guest_vm: Expose Guest OS or not :type expose_to_guest_vm: bool - :param guest_os: Required. The Guest OS - :type guest_os: str - :param guest_os_type: Required. The Guest OS types - :type guest_os_type: str + :ivar guest_os: The Guest OS + :vartype guest_os: str + :ivar guest_os_type: The Guest OS types + :vartype guest_os_type: str :param nics: The list of Virtual NICs :type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic] :param number_of_cores: The number of CPU cores @@ -1123,8 +1124,8 @@ class VirtualMachineTemplate(Model): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'guest_os': {'required': True}, - 'guest_os_type': {'required': True}, + 'guest_os': {'readonly': True}, + 'guest_os_type': {'readonly': True}, 'private_cloud_id': {'required': True}, 'vmwaretools': {'readonly': True}, 'type': {'readonly': True}, @@ -1151,7 +1152,7 @@ class VirtualMachineTemplate(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, guest_os: str, guest_os_type: str, private_cloud_id: str, location: str=None, amount_of_ram: int=None, controllers=None, description: str=None, disks=None, expose_to_guest_vm: bool=None, nics=None, number_of_cores: int=None, path: str=None, v_sphere_networks=None, v_sphere_tags=None, **kwargs) -> None: + def __init__(self, *, private_cloud_id: str, location: str=None, amount_of_ram: int=None, controllers=None, description: str=None, disks=None, expose_to_guest_vm: bool=None, nics=None, number_of_cores: int=None, path: str=None, v_sphere_networks=None, v_sphere_tags=None, **kwargs) -> None: super(VirtualMachineTemplate, self).__init__(**kwargs) self.id = None self.location = location @@ -1161,8 +1162,8 @@ def __init__(self, *, guest_os: str, guest_os_type: str, private_cloud_id: str, self.description = description self.disks = disks self.expose_to_guest_vm = expose_to_guest_vm - self.guest_os = guest_os - self.guest_os_type = guest_os_type + self.guest_os = None + self.guest_os_type = None self.nics = nics self.number_of_cores = number_of_cores self.path = path @@ -1185,8 +1186,8 @@ class VirtualNetwork(Model): :vartype assignable: bool :param id: Required. virtual network id (privateCloudId:vsphereId) :type id: str - :param location: Azure region - :type location: str + :ivar location: Azure region + :vartype location: str :ivar name: {VirtualNetworkName} :vartype name: str :ivar private_cloud_id: The Private Cloud id @@ -1198,6 +1199,7 @@ class VirtualNetwork(Model): _validation = { 'assignable': {'readonly': True}, 'id': {'required': True}, + 'location': {'readonly': True}, 'name': {'readonly': True}, 'private_cloud_id': {'readonly': True}, 'type': {'readonly': True}, @@ -1212,11 +1214,11 @@ class VirtualNetwork(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str, location: str=None, **kwargs) -> None: + def __init__(self, *, id: str, **kwargs) -> None: super(VirtualNetwork, self).__init__(**kwargs) self.assignable = None self.id = id - self.location = location + self.location = None self.name = None self.private_cloud_id = None self.type = None @@ -1234,7 +1236,7 @@ class VirtualNic(Model): :type ip_addresses: list[str] :param mac_address: NIC MAC address :type mac_address: str - :param network: The list of Virtual Networks + :param network: Required. Virtual Network :type network: ~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork :param nic_type: Required. NIC type. Possible values include: 'E1000', 'E1000E', 'PCNET32', 'VMXNET', 'VMXNET2', 'VMXNET3' @@ -1248,6 +1250,7 @@ class VirtualNic(Model): """ _validation = { + 'network': {'required': True}, 'nic_type': {'required': True}, 'virtual_nic_name': {'readonly': True}, } @@ -1262,7 +1265,7 @@ class VirtualNic(Model): 'virtual_nic_name': {'key': 'virtualNicName', 'type': 'str'}, } - def __init__(self, *, nic_type, ip_addresses=None, mac_address: str=None, network=None, power_on_boot: bool=None, virtual_nic_id: str=None, **kwargs) -> None: + def __init__(self, *, network, nic_type, ip_addresses=None, mac_address: str=None, power_on_boot: bool=None, virtual_nic_id: str=None, **kwargs) -> None: super(VirtualNic, self).__init__(**kwargs) self.ip_addresses = ip_addresses self.mac_address = mac_address diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/__init__.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/__init__.py index be02dbcd5eeb..04cf6300813b 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/__init__.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/__init__.py @@ -9,34 +9,26 @@ # regenerated. # -------------------------------------------------------------------------- -from ._available_operations import AvailableOperations -from ._dedicated_cloud_node_operations import DedicatedCloudNodeOperations -from ._dedicated_cloud_service_operations import DedicatedCloudServiceOperations -from ._skus_availability_within_region_operations import SkusAvailabilityWithinRegionOperations -from ._private_cloud_by_region_operations import PrivateCloudByRegionOperations -from ._resource_pools_by_pc_operations import ResourcePoolsByPCOperations -from ._resource_pool_by_pc_operations import ResourcePoolByPCOperations -from ._virtual_machine_templates_by_pc_operations import VirtualMachineTemplatesByPCOperations -from ._virtual_machine_template_by_pc_operations import VirtualMachineTemplateByPCOperations -from ._virtual_networks_by_pc_operations import VirtualNetworksByPCOperations -from ._virtual_network_by_pc_operations import VirtualNetworkByPCOperations -from ._usages_within_region_operations import UsagesWithinRegionOperations -from ._virtual_machine_operations import VirtualMachineOperations -from ._vmware_cloud_simple_client_operations import VMwareCloudSimpleClientOperationsMixin +from ._operations import Operations +from ._dedicated_cloud_nodes_operations import DedicatedCloudNodesOperations +from ._dedicated_cloud_services_operations import DedicatedCloudServicesOperations +from ._skus_availability_operations import SkusAvailabilityOperations +from ._private_clouds_operations import PrivateCloudsOperations +from ._resource_pools_operations import ResourcePoolsOperations +from ._virtual_machine_templates_operations import VirtualMachineTemplatesOperations +from ._virtual_networks_operations import VirtualNetworksOperations +from ._usages_operations import UsagesOperations +from ._virtual_machines_operations import VirtualMachinesOperations __all__ = [ - 'AvailableOperations', - 'DedicatedCloudNodeOperations', - 'DedicatedCloudServiceOperations', - 'SkusAvailabilityWithinRegionOperations', - 'PrivateCloudByRegionOperations', - 'ResourcePoolsByPCOperations', - 'ResourcePoolByPCOperations', - 'VirtualMachineTemplatesByPCOperations', - 'VirtualMachineTemplateByPCOperations', - 'VirtualNetworksByPCOperations', - 'VirtualNetworkByPCOperations', - 'UsagesWithinRegionOperations', - 'VirtualMachineOperations', - 'VMwareCloudSimpleClientOperationsMixin', + 'Operations', + 'DedicatedCloudNodesOperations', + 'DedicatedCloudServicesOperations', + 'SkusAvailabilityOperations', + 'PrivateCloudsOperations', + 'ResourcePoolsOperations', + 'VirtualMachineTemplatesOperations', + 'VirtualNetworksOperations', + 'UsagesOperations', + 'VirtualMachinesOperations', ] diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_node_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_nodes_operations.py similarity index 99% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_node_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_nodes_operations.py index 2ea081412757..e6d940404bb9 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_node_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_nodes_operations.py @@ -17,8 +17,8 @@ from .. import models -class DedicatedCloudNodeOperations(object): - """DedicatedCloudNodeOperations operations. +class DedicatedCloudNodesOperations(object): + """DedicatedCloudNodesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -233,6 +233,7 @@ def get( # Construct parameters query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_service_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_services_operations.py similarity index 99% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_service_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_services_operations.py index 2b0c6f43b23f..de6a56d3617c 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_service_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_dedicated_cloud_services_operations.py @@ -17,8 +17,8 @@ from .. import models -class DedicatedCloudServiceOperations(object): - """DedicatedCloudServiceOperations operations. +class DedicatedCloudServicesOperations(object): + """DedicatedCloudServicesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -124,7 +124,7 @@ def list_by_resource_group( self, resource_group_name, filter=None, top=None, skip_token=None, custom_headers=None, raw=False, **operation_config): """Implements list of dedicatedCloudService objects within RG method. - Returns list of dedicated cloud service within resource group. + Returns list of dedicated cloud services within a resource group. :param resource_group_name: The name of the resource group :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_available_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_operations.py similarity index 54% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_available_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_operations.py index c297795487c7..9b9294fab4e6 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_available_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_operations.py @@ -15,8 +15,8 @@ from .. import models -class AvailableOperations(object): - """AvailableOperations operations. +class Operations(object): + """Operations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -100,3 +100,73 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/providers/Microsoft.VMwareCloudSimple/operations'} + + def get( + self, region_id, operation_id, custom_headers=None, raw=False, **operation_config): + """Implements get of async operation. + + Return an async operation. + + :param region_id: The region Id (westus, eastus) + :type region_id: str + :param operation_id: operation id + :type operation_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: OperationResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmwarecloudsimple.models.OperationResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CSRPErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Referer'] = self._serialize.header("self.config.referer", self.config.referer, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.CSRPErrorException(self._deserialize, response) + + header_dict = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResource', response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + 'Content-Type': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/operationResults/{operationId}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_private_cloud_by_region_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_private_clouds_operations.py similarity index 56% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_private_cloud_by_region_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_private_clouds_operations.py index 9fcd07f46592..f80634b07173 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_private_cloud_by_region_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_private_clouds_operations.py @@ -15,8 +15,8 @@ from .. import models -class PrivateCloudByRegionOperations(object): - """PrivateCloudByRegionOperations operations. +class PrivateCloudsOperations(object): + """PrivateCloudsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -39,11 +39,13 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, custom_headers=None, raw=False, **operation_config): + self, region_id, custom_headers=None, raw=False, **operation_config): """Implements private cloud list GET method. Returns list of private clouds in particular region. + :param region_id: The region Id (westus, eastus) + :type region_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -61,7 +63,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str') + 'regionId': self._serialize.url("region_id", region_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -105,3 +107,65 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds'} + + def get( + self, pc_name, region_id, custom_headers=None, raw=False, **operation_config): + """Implements private cloud GET method. + + Returns private cloud by its name. + + :param pc_name: The private cloud name + :type pc_name: str + :param region_id: The region Id (westus, eastus) + :type region_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateCloud or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmwarecloudsimple.models.PrivateCloud or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CSRPErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'pcName': self._serialize.url("pc_name", pc_name, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CSRPErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateCloud', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pool_by_pc_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pool_by_pc_operations.py deleted file mode 100644 index 84a9997109da..000000000000 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pool_by_pc_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourcePoolByPCOperations(object): - """ResourcePoolByPCOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def get( - self, pc_name, resource_pool_name, custom_headers=None, raw=False, **operation_config): - """Implements get of resource pool. - - Returns resource pool templates by its name. - - :param pc_name: The private cloud name - :type pc_name: str - :param resource_pool_name: resource pool id (vsphereId) - :type resource_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ResourcePool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmwarecloudsimple.models.ResourcePool or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CSRPErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str'), - 'pcName': self._serialize.url("pc_name", pc_name, 'str'), - 'resourcePoolName': self._serialize.url("resource_pool_name", resource_pool_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CSRPErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ResourcePool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/resourcePools/{resourcePoolName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pools_by_pc_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pools_operations.py similarity index 55% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pools_by_pc_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pools_operations.py index 4789bb7a929d..ceca6e198b60 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pools_by_pc_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_resource_pools_operations.py @@ -15,8 +15,8 @@ from .. import models -class ResourcePoolsByPCOperations(object): - """ResourcePoolsByPCOperations operations. +class ResourcePoolsOperations(object): + """ResourcePoolsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -39,11 +39,13 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, pc_name, custom_headers=None, raw=False, **operation_config): + self, region_id, pc_name, custom_headers=None, raw=False, **operation_config): """Implements get of resource pools list. Returns list of resource pools in region for private cloud. + :param region_id: The region Id (westus, eastus) + :type region_id: str :param pc_name: The private cloud name :type pc_name: str :param dict custom_headers: headers that will be added to the request @@ -63,7 +65,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str'), 'pcName': self._serialize.url("pc_name", pc_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -108,3 +110,68 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/resourcePools'} + + def get( + self, region_id, pc_name, resource_pool_name, custom_headers=None, raw=False, **operation_config): + """Implements get of resource pool. + + Returns resource pool templates by its name. + + :param region_id: The region Id (westus, eastus) + :type region_id: str + :param pc_name: The private cloud name + :type pc_name: str + :param resource_pool_name: resource pool id (vsphereId) + :type resource_pool_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourcePool or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmwarecloudsimple.models.ResourcePool or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CSRPErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str'), + 'pcName': self._serialize.url("pc_name", pc_name, 'str'), + 'resourcePoolName': self._serialize.url("resource_pool_name", resource_pool_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CSRPErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ResourcePool', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/resourcePools/{resourcePoolName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_skus_availability_within_region_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_skus_availability_operations.py similarity index 92% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_skus_availability_within_region_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_skus_availability_operations.py index 80c12f3a36d8..b9a93daa08e8 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_skus_availability_within_region_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_skus_availability_operations.py @@ -15,8 +15,8 @@ from .. import models -class SkusAvailabilityWithinRegionOperations(object): - """SkusAvailabilityWithinRegionOperations operations. +class SkusAvailabilityOperations(object): + """SkusAvailabilityOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -39,11 +39,13 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, sku_id=None, custom_headers=None, raw=False, **operation_config): + self, region_id, sku_id=None, custom_headers=None, raw=False, **operation_config): """Implements SkuAvailability List method. Returns list of available resources in region. + :param region_id: The region Id (westus, eastus) + :type region_id: str :param sku_id: sku id, if no sku is passed availability for all skus will be returned :type sku_id: str @@ -64,7 +66,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str') + 'regionId': self._serialize.url("region_id", region_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_usages_within_region_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_usages_operations.py similarity index 92% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_usages_within_region_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_usages_operations.py index 2ced90cc1807..2f480f803d43 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_usages_within_region_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_usages_operations.py @@ -15,8 +15,8 @@ from .. import models -class UsagesWithinRegionOperations(object): - """UsagesWithinRegionOperations operations. +class UsagesOperations(object): + """UsagesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -39,11 +39,13 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): + self, region_id, filter=None, custom_headers=None, raw=False, **operation_config): """Implements Usages List method. Returns list of usage in region. + :param region_id: The region Id (westus, eastus) + :type region_id: str :param filter: The filter to apply on the list operation. only name.value is allowed here as a filter e.g. $filter=name.value eq 'xxxx' @@ -65,7 +67,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str') + 'regionId': self._serialize.url("region_id", region_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_template_by_pc_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_template_by_pc_operations.py deleted file mode 100644 index ccbb11b8f30d..000000000000 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_template_by_pc_operations.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class VirtualMachineTemplateByPCOperations(object): - """VirtualMachineTemplateByPCOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def get( - self, pc_name, virtual_machine_template_name, custom_headers=None, raw=False, **operation_config): - """Implements virtual machine template GET method. - - Returns virtual machine templates by its name. - - :param pc_name: The private cloud name - :type pc_name: str - :param virtual_machine_template_name: virtual machine template id - (vsphereId) - :type virtual_machine_template_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualMachineTemplate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmwarecloudsimple.models.VirtualMachineTemplate or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CSRPErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str'), - 'pcName': self._serialize.url("pc_name", pc_name, 'str'), - 'virtualMachineTemplateName': self._serialize.url("virtual_machine_template_name", virtual_machine_template_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CSRPErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineTemplate', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualMachineTemplates/{virtualMachineTemplateName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_templates_by_pc_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_templates_operations.py similarity index 56% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_templates_by_pc_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_templates_operations.py index a4ebe78dbd32..5a93b4e251af 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_templates_by_pc_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_templates_operations.py @@ -15,8 +15,8 @@ from .. import models -class VirtualMachineTemplatesByPCOperations(object): - """VirtualMachineTemplatesByPCOperations operations. +class VirtualMachineTemplatesOperations(object): + """VirtualMachineTemplatesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -39,13 +39,15 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, pc_name, resource_pool_name, custom_headers=None, raw=False, **operation_config): + self, pc_name, region_id, resource_pool_name, custom_headers=None, raw=False, **operation_config): """Implements list of available VM templates. Returns list of virtual machine templates in region for private cloud. :param pc_name: The private cloud name :type pc_name: str + :param region_id: The region Id (westus, eastus) + :type region_id: str :param resource_pool_name: Resource pool used to derive vSphere cluster which contains VM templates :type resource_pool_name: str @@ -67,7 +69,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'pcName': self._serialize.url("pc_name", pc_name, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str') + 'regionId': self._serialize.url("region_id", region_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -112,3 +114,69 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualMachineTemplates'} + + def get( + self, region_id, pc_name, virtual_machine_template_name, custom_headers=None, raw=False, **operation_config): + """Implements virtual machine template GET method. + + Returns virtual machine templates by its name. + + :param region_id: The region Id (westus, eastus) + :type region_id: str + :param pc_name: The private cloud name + :type pc_name: str + :param virtual_machine_template_name: virtual machine template id + (vsphereId) + :type virtual_machine_template_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineTemplate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmwarecloudsimple.models.VirtualMachineTemplate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CSRPErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str'), + 'pcName': self._serialize.url("pc_name", pc_name, 'str'), + 'virtualMachineTemplateName': self._serialize.url("virtual_machine_template_name", virtual_machine_template_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CSRPErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineTemplate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualMachineTemplates/{virtualMachineTemplateName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machines_operations.py similarity index 99% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machines_operations.py index 487c2553a5a2..d03d240726fd 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machine_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_machines_operations.py @@ -17,8 +17,8 @@ from .. import models -class VirtualMachineOperations(object): - """VirtualMachineOperations operations. +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_network_by_pc_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_network_by_pc_operations.py deleted file mode 100644 index 31f939ea90af..000000000000 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_network_by_pc_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class VirtualNetworkByPCOperations(object): - """VirtualNetworkByPCOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-04-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-04-01" - - self.config = config - - def get( - self, pc_name, virtual_network_name, custom_headers=None, raw=False, **operation_config): - """Implements virtual network GET method. - - Return virtual network by its name. - - :param pc_name: The private cloud name - :type pc_name: str - :param virtual_network_name: virtual network id (vsphereId) - :type virtual_network_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: VirtualNetwork or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CSRPErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str'), - 'pcName': self._serialize.url("pc_name", pc_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CSRPErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetwork', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks/{virtualNetworkName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_networks_by_pc_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_networks_operations.py similarity index 57% rename from sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_networks_by_pc_operations.py rename to sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_networks_operations.py index e8aeee9477b2..b3b593b23be4 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_networks_by_pc_operations.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_virtual_networks_operations.py @@ -15,8 +15,8 @@ from .. import models -class VirtualNetworksByPCOperations(object): - """VirtualNetworksByPCOperations operations. +class VirtualNetworksOperations(object): + """VirtualNetworksOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -39,12 +39,14 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, pc_name, resource_pool_name, custom_headers=None, raw=False, **operation_config): + self, region_id, pc_name, resource_pool_name, custom_headers=None, raw=False, **operation_config): """Implements list available virtual networks within a subscription method. Return list of virtual networks in location for private cloud. + :param region_id: The region Id (westus, eastus) + :type region_id: str :param pc_name: The private cloud name :type pc_name: str :param resource_pool_name: Resource pool used to derive vSphere @@ -67,7 +69,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str'), 'pcName': self._serialize.url("pc_name", pc_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -113,3 +115,68 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks'} + + def get( + self, region_id, pc_name, virtual_network_name, custom_headers=None, raw=False, **operation_config): + """Implements virtual network GET method. + + Return virtual network by its name. + + :param region_id: The region Id (westus, eastus) + :type region_id: str + :param pc_name: The private cloud name + :type pc_name: str + :param virtual_network_name: virtual network id (vsphereId) + :type virtual_network_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CSRPErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'regionId': self._serialize.url("region_id", region_id, 'str'), + 'pcName': self._serialize.url("pc_name", pc_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CSRPErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks/{virtualNetworkName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_vmware_cloud_simple_client_operations.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_vmware_cloud_simple_client_operations.py deleted file mode 100644 index ded0f17b1a1f..000000000000 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/azure/mgmt/vmwarecloudsimple/operations/_vmware_cloud_simple_client_operations.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling -from .. import models -import uuid - - -class VMwareCloudSimpleClientOperationsMixin(object): - - def get_operation_result_by_region( - self, operation_id, custom_headers=None, raw=False, **operation_config): - """Implements get of async operation. - - Return an async operation. - - :param operation_id: operation id - :type operation_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: OperationResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmwarecloudsimple.models.OperationResource or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CSRPErrorException` - """ - # Construct URL - url = self.get_operation_result_by_region.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['Referer'] = self._serialize.header("self.config.referer", self.config.referer, 'str') - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.CSRPErrorException(self._deserialize, response) - - header_dict = {} - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('OperationResource', response) - header_dict = { - 'Location': 'str', - 'Retry-After': 'int', - 'Content-Type': 'str', - } - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - client_raw_response.add_headers(header_dict) - return client_raw_response - - return deserialized - get_operation_result_by_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/operationResults/{operationId}'} - - def get_private_cloud( - self, pc_name, custom_headers=None, raw=False, **operation_config): - """Implements private cloud GET method. - - Returns private cloud by its name. - - :param pc_name: The private cloud name - :type pc_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PrivateCloud or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmwarecloudsimple.models.PrivateCloud or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CSRPErrorException` - """ - # Construct URL - url = self.get_private_cloud.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'pcName': self._serialize.url("pc_name", pc_name, 'str'), - 'regionId': self._serialize.url("self.config.region_id", self.config.region_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CSRPErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('PrivateCloud', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_private_cloud.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}'} diff --git a/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py b/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py index 28dbf5a6168b..8cd9291dd9e8 100644 --- a/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py +++ b/sdk/compute/azure-mgmt-vmwarecloudsimple/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',