Skip to content

Commit

Permalink
[connectedvmware] Using stable swagger in vendored_sdks (Azure#6854)
Browse files Browse the repository at this point in the history
* stable swagger sdk

* rerun tests with new API version
  • Loading branch information
nascarsayan authored and bgashirabake committed Oct 16, 2023
1 parent be28c0f commit 5e46bc6
Show file tree
Hide file tree
Showing 48 changed files with 2,167 additions and 12,485 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ class ConnectedvmwareScenarioTest(ScenarioTest):
def test_connectedvmware(self):
self.kwargs.update(
{
'rg': 'azcli-test-rg',
'rg': 'azcli-contoso-rg',
'loc': 'eastus',
'cus_loc': 'azcli-test-cl',
'vc_name': 'azcli-test-vc',
'cus_loc': 'azcli-contoso-cl',
'vc_name': 'azcli-contoso-vc',
'rp_inventory_item': 'resgroup-724471',
'rp_name': 'azcli-test-resource-pool',
'rp_name': 'azcli-contoso-resource-pool',
'cluster_inventory_item': 'domain-c649660',
'cluster_name': 'azcli-test-cluster',
'cluster_name': 'azcli-contoso-cluster',
'datastore_inventory_item': 'datastore-563660',
'datastore_name': 'azcli-test-datastore',
'datastore_name': 'azcli-contoso-datastore',
'host_inventory_item': 'host-1147546',
'host_name': 'azcli-test-host',
'host_name': 'azcli-contoso-host',
'vnet_inventory_item': 'network-563661',
'vnet_name': 'azcli-test-virtual-network',
'vnet_name': 'azcli-contoso-virtual-network',
'vmtpl_inventory_item': 'vmtpl-vm-1184288',
'vmtpl_name': 'azcli-test-vm-template',
'vm_name': 'azcli-test-vm-0',
'vmtpl_name': 'azcli-contoso-vm-template',
'vm_name': 'azcli-contoso-vm-0',
'guest_username': 'azcli-user',
'guest_password': 'azcli-password',
'nic_name': 'nic_1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from . import models
from ._configuration import AzureArcVMwareManagementServiceAPIConfiguration
from .operations import AzureArcVMwareManagementServiceAPIOperationsMixin, ClustersOperations, DatastoresOperations, GuestAgentsOperations, HostsOperations, HybridIdentityMetadataOperations, InventoryItemsOperations, MachineExtensionsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VMInstanceGuestAgentsOperations, VirtualMachineInstancesOperations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations, VmInstanceHybridIdentityMetadataOperations
from .operations import ClustersOperations, DatastoresOperations, HostsOperations, InventoryItemsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VMInstanceGuestAgentsOperations, VirtualMachineInstancesOperations, VirtualMachineTemplatesOperations, VirtualNetworksOperations, VmInstanceHybridIdentityMetadataOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -24,13 +24,11 @@
from azure.core.credentials import TokenCredential
from azure.core.rest import HttpRequest, HttpResponse

class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOperationsMixin): # pylint: disable=too-many-instance-attributes
class AzureArcVMwareManagementServiceAPI(object): # pylint: disable=too-many-instance-attributes
"""Self service experience for VMware.
:ivar operations: Operations operations
:vartype operations: azure.mgmt.connectedvmware.operations.Operations
:ivar virtual_machines: VirtualMachinesOperations operations
:vartype virtual_machines: azure.mgmt.connectedvmware.operations.VirtualMachinesOperations
:ivar resource_pools: ResourcePoolsOperations operations
:vartype resource_pools: azure.mgmt.connectedvmware.operations.ResourcePoolsOperations
:ivar clusters: ClustersOperations operations
Expand All @@ -48,13 +46,6 @@ class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOpera
:vartype virtual_networks: azure.mgmt.connectedvmware.operations.VirtualNetworksOperations
:ivar inventory_items: InventoryItemsOperations operations
:vartype inventory_items: azure.mgmt.connectedvmware.operations.InventoryItemsOperations
:ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations
:vartype hybrid_identity_metadata:
azure.mgmt.connectedvmware.operations.HybridIdentityMetadataOperations
:ivar machine_extensions: MachineExtensionsOperations operations
:vartype machine_extensions: azure.mgmt.connectedvmware.operations.MachineExtensionsOperations
:ivar guest_agents: GuestAgentsOperations operations
:vartype guest_agents: azure.mgmt.connectedvmware.operations.GuestAgentsOperations
:ivar virtual_machine_instances: VirtualMachineInstancesOperations operations
:vartype virtual_machine_instances:
azure.mgmt.connectedvmware.operations.VirtualMachineInstancesOperations
Expand All @@ -71,8 +62,8 @@ class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOpera
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:type base_url: str
:keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that
overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. The default value is "2023-10-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -94,7 +85,6 @@ def __init__(
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_machines = VirtualMachinesOperations(self._client, self._config, self._serialize, self._deserialize)
self.resource_pools = ResourcePoolsOperations(self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.hosts = HostsOperations(self._client, self._config, self._serialize, self._deserialize)
Expand All @@ -103,9 +93,6 @@ def __init__(
self.virtual_machine_templates = VirtualMachineTemplatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_networks = VirtualNetworksOperations(self._client, self._config, self._serialize, self._deserialize)
self.inventory_items = InventoryItemsOperations(self._client, self._config, self._serialize, self._deserialize)
self.hybrid_identity_metadata = HybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize)
self.machine_extensions = MachineExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.guest_agents = GuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_machine_instances = VirtualMachineInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.vm_instance_hybrid_identity_metadata = VmInstanceHybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize)
self.vm_instance_guest_agents = VMInstanceGuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class AzureArcVMwareManagementServiceAPIConfiguration(Configuration): # pylint:
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The Subscription ID.
:type subscription_id: str
:keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that
overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. The default value is "2023-10-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -44,7 +44,7 @@ def __init__(
):
# type: (...) -> None
super(AzureArcVMwareManagementServiceAPIConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str
api_version = kwargs.pop('api_version', "2023-10-01") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
pass
pass
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@

from .. import models
from ._configuration import AzureArcVMwareManagementServiceAPIConfiguration
from .operations import AzureArcVMwareManagementServiceAPIOperationsMixin, ClustersOperations, DatastoresOperations, GuestAgentsOperations, HostsOperations, HybridIdentityMetadataOperations, InventoryItemsOperations, MachineExtensionsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VMInstanceGuestAgentsOperations, VirtualMachineInstancesOperations, VirtualMachineTemplatesOperations, VirtualMachinesOperations, VirtualNetworksOperations, VmInstanceHybridIdentityMetadataOperations
from .operations import ClustersOperations, DatastoresOperations, HostsOperations, InventoryItemsOperations, Operations, ResourcePoolsOperations, VCentersOperations, VMInstanceGuestAgentsOperations, VirtualMachineInstancesOperations, VirtualMachineTemplatesOperations, VirtualNetworksOperations, VmInstanceHybridIdentityMetadataOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOperationsMixin): # pylint: disable=too-many-instance-attributes
class AzureArcVMwareManagementServiceAPI: # pylint: disable=too-many-instance-attributes
"""Self service experience for VMware.
:ivar operations: Operations operations
:vartype operations: azure.mgmt.connectedvmware.aio.operations.Operations
:ivar virtual_machines: VirtualMachinesOperations operations
:vartype virtual_machines: azure.mgmt.connectedvmware.aio.operations.VirtualMachinesOperations
:ivar resource_pools: ResourcePoolsOperations operations
:vartype resource_pools: azure.mgmt.connectedvmware.aio.operations.ResourcePoolsOperations
:ivar clusters: ClustersOperations operations
Expand All @@ -46,14 +44,6 @@ class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOpera
:vartype virtual_networks: azure.mgmt.connectedvmware.aio.operations.VirtualNetworksOperations
:ivar inventory_items: InventoryItemsOperations operations
:vartype inventory_items: azure.mgmt.connectedvmware.aio.operations.InventoryItemsOperations
:ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations
:vartype hybrid_identity_metadata:
azure.mgmt.connectedvmware.aio.operations.HybridIdentityMetadataOperations
:ivar machine_extensions: MachineExtensionsOperations operations
:vartype machine_extensions:
azure.mgmt.connectedvmware.aio.operations.MachineExtensionsOperations
:ivar guest_agents: GuestAgentsOperations operations
:vartype guest_agents: azure.mgmt.connectedvmware.aio.operations.GuestAgentsOperations
:ivar virtual_machine_instances: VirtualMachineInstancesOperations operations
:vartype virtual_machine_instances:
azure.mgmt.connectedvmware.aio.operations.VirtualMachineInstancesOperations
Expand All @@ -70,8 +60,8 @@ class AzureArcVMwareManagementServiceAPI(AzureArcVMwareManagementServiceAPIOpera
:type subscription_id: str
:param base_url: Service URL. Default value is 'https://management.azure.com'.
:type base_url: str
:keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that
overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. The default value is "2023-10-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -92,7 +82,6 @@ def __init__(
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_machines = VirtualMachinesOperations(self._client, self._config, self._serialize, self._deserialize)
self.resource_pools = ResourcePoolsOperations(self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.hosts = HostsOperations(self._client, self._config, self._serialize, self._deserialize)
Expand All @@ -101,9 +90,6 @@ def __init__(
self.virtual_machine_templates = VirtualMachineTemplatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_networks = VirtualNetworksOperations(self._client, self._config, self._serialize, self._deserialize)
self.inventory_items = InventoryItemsOperations(self._client, self._config, self._serialize, self._deserialize)
self.hybrid_identity_metadata = HybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize)
self.machine_extensions = MachineExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.guest_agents = GuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_machine_instances = VirtualMachineInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.vm_instance_hybrid_identity_metadata = VmInstanceHybridIdentityMetadataOperations(self._client, self._config, self._serialize, self._deserialize)
self.vm_instance_guest_agents = VMInstanceGuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class AzureArcVMwareManagementServiceAPIConfiguration(Configuration): # pylint:
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Subscription ID.
:type subscription_id: str
:keyword api_version: Api Version. The default value is "2023-03-01-preview". Note that
overriding this default value may result in unsupported behavior.
:keyword api_version: Api Version. The default value is "2023-10-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -41,7 +41,7 @@ def __init__(
**kwargs: Any
) -> None:
super(AzureArcVMwareManagementServiceAPIConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop('api_version', "2023-03-01-preview") # type: str
api_version = kwargs.pop('api_version', "2023-10-01") # type: str

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
pass
pass
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# --------------------------------------------------------------------------

from ._operations import Operations
from ._virtual_machines_operations import VirtualMachinesOperations
from ._resource_pools_operations import ResourcePoolsOperations
from ._clusters_operations import ClustersOperations
from ._hosts_operations import HostsOperations
Expand All @@ -16,17 +15,12 @@
from ._virtual_machine_templates_operations import VirtualMachineTemplatesOperations
from ._virtual_networks_operations import VirtualNetworksOperations
from ._inventory_items_operations import InventoryItemsOperations
from ._hybrid_identity_metadata_operations import HybridIdentityMetadataOperations
from ._machine_extensions_operations import MachineExtensionsOperations
from ._azure_arc_vmware_management_service_api_operations import AzureArcVMwareManagementServiceAPIOperationsMixin
from ._guest_agents_operations import GuestAgentsOperations
from ._virtual_machine_instances_operations import VirtualMachineInstancesOperations
from ._vm_instance_hybrid_identity_metadata_operations import VmInstanceHybridIdentityMetadataOperations
from ._vm_instance_guest_agents_operations import VMInstanceGuestAgentsOperations

__all__ = [
'Operations',
'VirtualMachinesOperations',
'ResourcePoolsOperations',
'ClustersOperations',
'HostsOperations',
Expand All @@ -35,10 +29,6 @@
'VirtualMachineTemplatesOperations',
'VirtualNetworksOperations',
'InventoryItemsOperations',
'HybridIdentityMetadataOperations',
'MachineExtensionsOperations',
'AzureArcVMwareManagementServiceAPIOperationsMixin',
'GuestAgentsOperations',
'VirtualMachineInstancesOperations',
'VmInstanceHybridIdentityMetadataOperations',
'VMInstanceGuestAgentsOperations',
Expand Down
Loading

0 comments on commit 5e46bc6

Please sign in to comment.