Merge pull request #4 from Azure/no_provider_apis

AVS CLI - first release
This commit is contained in:
shivam-msft 2019-10-18 11:24:54 +05:30 коммит произвёл GitHub
Родитель 04c4af74af f799d6c2a7
Коммит c7940989a7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
111 изменённых файлов: 20189 добавлений и 4349 удалений

8
HISTORY.rst Normal file
Просмотреть файл

@ -0,0 +1,8 @@
.. :changelog:
Release History
===============
0.1.0
++++++
* Initial release.

Просмотреть файл

@ -1,5 +1,83 @@
# Azure VMware Solutions by CloudSimple Extension for Azure CLI
# Contributing
This extension provides command to manage Azure VMware Solutions.
## Installing Azure CLI
Please refer to the [install guide](https://docs.microsoft.com/cli/azure/install-azure-cli) for detailed install instructions.
You can also use the extension from Azure Cloud Shell.
[![](https://shell.azure.com/images/launchcloudshell.png "Launch Azure Cloud Shell")](https://shell.azure.com)
## Installing vmware-cs extension
Download the [whl file](https://github.com/Azure/az-vmware-cli/blob/no_provider_apis/azext_vmware_cs/vmware_cs-0.1.0-py2.py3-none-any.whl) for the extension.
Install by the CLI command:
```
az extension add --source vmware_cs-0.1.0-py2.py3-none-any.whl
```
## Quick start
1. Run the `az login` command to log in to your Azure account.
If the CLI can open your default browser, it will do so and load a sign-in page. Otherwise, you need to open a
browser page and follow the instructions on the command line to enter an authorization code after navigating to
[https://aka.ms/devicelogin](https://aka.ms/devicelogin) in your browser. For more information, see the
[Azure CLI login page](https://docs.microsoft.com/cli/azure/authenticate-azure-cli?view=azure-cli-latest).
2. Use `az account set` with the subscription ID or name you want to switch to.
```
az account set --subscription "My Subscription"
```
3. You can configure defaults such as the resource group and location, or you can also provide these as parameters for each command.
```
az configure --defaults location=MyLocation group=MyResourceGroup
```
## Usage
```
az [group] [subgroup] [command] {parameters}
```
For usage and help content for any command, pass in the -h parameter, for example:
```
az vmware -h
Group
az vmware : Manage Azure VMware Solution.
This command group is in preview. It may be changed/removed in a future release.
Subgroups:
private-cloud : Manage VMware private clouds.
resource-pool : Manage VMware resource pools.
virtual-network : Manage virtual networks.
vm : Manage VMware virtual machines.
vm-template : Manage VMware virtual machine templates.
```
This extension provides CLI commands to:
1. Create, list, show, update, delete, start, stop - VMware Virtual Machines by CloudSimple. You can update disks, nics, and the tags of a VM. More update capabilities would be supported in future releases.
For creating a VMware VM by CloudSimple, a CloudSimple private cloud should be provisioned, which involves creating a CloudSimple service and provisioning a minimum of 3 nodes.
2. List and show - private clouds, resource pools, virtual machine templates, and virtual networks.
## Removing extension
Extension can be removed using the following CLI command:
```
az extension remove -n vmware-cs
```
## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us

92
README.rst Normal file
Просмотреть файл

@ -0,0 +1,92 @@
# Azure VMware Solutions by CloudSimple Extension for Azure CLI
This extension provides command to manage Azure VMware Solutions.
## Installing Azure CLI
Please refer to the [install guide](https://docs.microsoft.com/cli/azure/install-azure-cli) for detailed install instructions.
You can also use the extension from Azure Cloud Shell.
[![](https://shell.azure.com/images/launchcloudshell.png "Launch Azure Cloud Shell")](https://shell.azure.com)
## Installing vmware-cs extension
Download the [whl file](https://github.com/Azure/az-vmware-cli/blob/no_provider_apis/azext_vmware_cs/vmware_cs-0.1.0-py2.py3-none-any.whl) for the extension.
Install by the CLI command:
```
az extension add --source vmware_cs-0.1.0-py2.py3-none-any.whl
```
## Quick start
1. Run the `az login` command to log in to your Azure account.
If the CLI can open your default browser, it will do so and load a sign-in page. Otherwise, you need to open a
browser page and follow the instructions on the command line to enter an authorization code after navigating to
[https://aka.ms/devicelogin](https://aka.ms/devicelogin) in your browser. For more information, see the
[Azure CLI login page](https://docs.microsoft.com/cli/azure/authenticate-azure-cli?view=azure-cli-latest).
2. Use `az account set` with the subscription ID or name you want to switch to.
```
az account set --subscription "My Subscription"
```
3. You can configure defaults such as the resource group and location, or you can also provide these as parameters for each command.
```
az configure --defaults location=MyLocation group=MyResourceGroup
```
## Usage
```
az [group] [subgroup] [command] {parameters}
```
For usage and help content for any command, pass in the -h parameter, for example:
```
az vmware -h
Group
az vmware : Manage Azure VMware Solution.
This command group is in preview. It may be changed/removed in a future release.
Subgroups:
private-cloud : Manage VMware private clouds.
resource-pool : Manage VMware resource pools.
virtual-network : Manage virtual networks.
vm : Manage VMware virtual machines.
vm-template : Manage VMware virtual machine templates.
```
This extension provides CLI commands to:
1. Create, list, show, update, delete, start, stop - VMware Virtual Machines by CloudSimple. You can update disks, nics, and the tags of a VM. More update capabilities would be supported in future releases.
For creating a VMware VM by CloudSimple, a CloudSimple private cloud should be provisioned, which involves creating a CloudSimple service and provisioning a minimum of 3 nodes.
2. List and show - private clouds, resource pools, virtual machine templates, and virtual networks.
## Removing extension
Extension can be removed using the following CLI command:
```
az extension remove -n vmware-cs
```
## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Просмотреть файл

@ -3,21 +3,22 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from azure.cli.core import AzCommandsLoader
from azext_vmware_cs._help import helps # pylint: disable=unused-import
class Vmware_csCommandsLoader(AzCommandsLoader):
class VmwareCsCommandsLoader(AzCommandsLoader):
"""
Custom command loader (inherited from AzCommandsLoader class) which is used for loading the module.
"""
def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_vmware_cs._client_factory import cf_vmware_cs
vmware_cs_custom = CliCommandType(
operations_tmpl='azext_vmware_cs.custom#{}',
client_factory=cf_vmware_cs)
super(Vmware_csCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=vmware_cs_custom)
vmware_cs_custom = CliCommandType(operations_tmpl='azext_vmware_cs.custom#{}')
super(VmwareCsCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=vmware_cs_custom)
def load_command_table(self, args):
from azext_vmware_cs.commands import load_command_table
@ -29,4 +30,4 @@ class Vmware_csCommandsLoader(AzCommandsLoader):
load_arguments(self, command)
COMMAND_LOADER_CLS = Vmware_csCommandsLoader
COMMAND_LOADER_CLS = VmwareCsCommandsLoader

Просмотреть файл

@ -0,0 +1,34 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
This file contains actions for parsing complex arguments
"""
import argparse
from ._utils import create_dictionary_from_arg_string
class AddNicAction(argparse._AppendAction):
"""
Action for parsing the nic arguments
"""
def __call__(self, parser, namespace, values, option_string=None):
nic_params_dict = create_dictionary_from_arg_string(values, option_string)
if namespace.nics:
namespace.nics.append(nic_params_dict)
else:
namespace.nics = [nic_params_dict]
class AddDiskAction(argparse._AppendAction):
"""
Action for parsing the disk arguments
"""
def __call__(self, parser, namespace, values, option_string=None):
disk_params_dict = create_dictionary_from_arg_string(values, option_string)
if namespace.disks:
namespace.disks.append(disk_params_dict)
else:
namespace.disks = [disk_params_dict]

Просмотреть файл

@ -3,10 +3,73 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
def cf_vmware_cs(cli_ctx, *_):
"""
Contains client factory methods used for generating SDK clients.
"""
def cf_vmware_cs(cli_ctx, *_):
"""
Generic client factory
"""
from azure.cli.core.commands.client_factory import get_mgmt_service_client
# TODO: Replace CONTOSO with the appropriate label and uncomment
# from azure.mgmt.CONTOSO import CONTOSOManagementClient
# return get_mgmt_service_client(cli_ctx, CONTOSOManagementClient)
return None
# This vendored_sdk import is temporary. Import should be from published SDK
# TODO: Change when production SDK published.
from azext_vmware_cs.vendored_sdks import VMwareCloudSimpleClient
from ._config import REFERER
return get_mgmt_service_client(cli_ctx,
VMwareCloudSimpleClient,
referer=REFERER)
def cf_private_cloud(cli_ctx, *_):
"""
Client factory for private cloud operations
"""
return cf_vmware_cs(cli_ctx).private_clouds
def cf_resource_pool(cli_ctx, *_):
"""
Client factory for resource pool operations
"""
return cf_vmware_cs(cli_ctx).resource_pools
def cf_virtual_machine_template(cli_ctx, *_):
"""
Client factory for VM template operations
"""
return cf_vmware_cs(cli_ctx).virtual_machine_templates
def cf_virtual_network(cli_ctx, *_):
"""
Client factory for virtual network operations
"""
return cf_vmware_cs(cli_ctx).virtual_networks
def cf_virtual_machine(cli_ctx, *_):
"""
Client factory for VM operations
"""
return cf_vmware_cs(cli_ctx).virtual_machines
def _resource_client_factory(cli_ctx, **_):
"""
Client factory for resource client
"""
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.cli.core.profiles import ResourceType
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES)
def cf_resource_groups(cli_ctx, *_):
"""
Client factory for resource group operations
"""
return _resource_client_factory(cli_ctx).resource_groups

Просмотреть файл

@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
'''
General config information.
'''
PATH_CHAR = "/"
REFERER = "https://management.azure.com/"

Просмотреть файл

@ -0,0 +1,61 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
This file contains table transformer functions.
These are called if the output mode is set to table in any command.
"""
def transform_vm_table_output(result):
"""
This table output contains most of the fields which
are displayed in CloudSimple VM summary in UI
"""
from collections import OrderedDict
from ._config import PATH_CHAR
transformed_result = OrderedDict([('Resource group', result['resourceGroup']),
('Computer name', result['name']),
('Status', result['status']),
('Operating system', result['guestOs']),
('Location', result['location']),
('Size', str(result['numberOfCores']) + " cores, " +
str(result['amountOfRam']) + " MB memory"),
('Public IP' + PATH_CHAR + 'DNS name', str(result['publicIp']) +
PATH_CHAR + str(result['dnsname'])),
('Subscription ID', result['id'].split(PATH_CHAR)[2]),
('Resource Pool', result['resourcePool']['fullName']),
('vSphere folder', result['folder']),
('VMware Tools', result['vmwaretools'])])
ipAddresses = ""
notnull = False
for nic in result['nics']:
if nic['ipAddresses'] is not None:
notnull = True
for ipaddress in nic['ipAddresses']:
ipAddresses = ipAddresses + ipaddress + ", "
if notnull:
ipAddresses = ipAddresses[:-2]
transformed_result['IP Addresses'] = ipAddresses
vSphereNetworks = ""
notnull = False
for nic in result['nics']:
if nic['network']['name'] is not None:
notnull = True
vSphereNetworks = vSphereNetworks + nic['network']['name'] + ", "
if notnull:
vSphereNetworks = vSphereNetworks[:-2]
transformed_result['vSphere Networks'] = vSphereNetworks
return transformed_result
def transform_vm_table_list(vm_list):
"""
For list output
"""
return [transform_vm_table_output(v) for v in vm_list]

Просмотреть файл

@ -3,36 +3,332 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
This file contains the help strings (summaries and examples) for all commands and command groups.
"""
from knack.help_files import helps # pylint: disable=unused-import
helps['vmware_cs'] = """
helps['vmware'] = """
type: group
short-summary: Commands to manage Vmware_css.
short-summary: Manage Azure VMware Solution.
"""
helps['vmware_cs create'] = """
helps['vmware vm'] = """
type: group
short-summary: Manage VMware virtual machines.
"""
helps['vmware vm create'] = """
type: command
short-summary: Create a Vmware_cs.
short-summary: Create a VMware virtual machine.
parameters:
- name: --nic
short-summary: Add or modify NICs.
long-summary: |
By default, the nics will be added according to the vSphere VM template.
You can add more nics, or modify some properties of a nic specified in the VM template.
Multiple nics can be specified by using more than one `--nic` argument.
If a nic name already exists in the VM template, that nic would be modified according to the user input.
If a nic name does not exist in the VM template, a new nic would be created and a new name will be assigned to it.
Usage: --nic name=MyNicName virtual-network=MyNetwork adapter=MyAdapter power-on-boot=True/False
- name: --disk
short-summary: Add or modify disks.
long-summary: |
By default, the disks will be added according to the vSphere VM template.
You can add more disks, or modify some properties of a disk specified in the VM template.
Multiple disks can be specified by using more than one `--disk` argument.
If a disk name already exists in the VM template, that disk would be modified according to the user input.
If a disk name does not exist in the VM template, a new disk would be created and a new name will be assigned to it.
Usage: --disk name=MyDiskName controller=SCSIControllerID mode=IndependenceMode size=DiskSizeInKB
examples:
- name: Creating a VM with default parameters from the vm template.
text: >
az vmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate
- name: Creating a VM and adding an extra nic to the VM with virtual network MyVirtualNetwork, adapter VMXNET3, that power ups on boot.
The name entered in the nic is for identification purposes only, to see if such a nic name exists in the vm template, else a nic is created and a new name is assigned.
Lets say the vm template contains a nic with name "Network adapter 1".
text: >
az vmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --nic name=NicNameWouldBeAssigned virtual-network=MyVirtualNetwork adapter=VMXNET3 power-on-boot=True
- name: Customizing specific properties of a VM. Changing the number of cores to 2 and adapter of "Network adapter 1" nic to E1000E, from that specified in the template. All other properties would be defaulted from the template.
text: >
az vmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --cores 2 --nic name="Network adapter 1" adapter=E1000E
- name: Customizing specific properties of a VM. Changing the adapter of "Network adapter 1" nic to E1000E, from that specified in the template, and also adding another nic with virtual network MyVirtualNetwork, adapter VMXNET3, that power ups on boot.
text: >
az vmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --nic name="Network adapter 1" adapter=E1000E --nic name=NicNameWouldBeAssigned virtual-network=MyVirtualNetwork adapter=VMXNET3 power-on-boot=True
- name: Creating a VM and adding an extra disk to the VM with SCSI controller 0, persistent mode, and 41943040 KB size.
The name entered in the disk is for identification purposes only, to see if such a disk name exists in the vm template, else a disk is created and a new name is assigned.
Lets say the vm template contains a disk with name "Hard disk 1".
text: >
az vmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --disk name=DiskNameWouldBeAssigned controller=1000 mode=persistent size=41943040
- name: Customizing specific properties of a VM. Changing the size of "Hard disk 1" disk to 21943040 KB, from that specified in the template, and also adding another disk with SCSI controller 0, persistent mode, and 41943040 KB size.
text: >
az vmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --disk name="Hard disk 1" size=21943040 --disk name=DiskNameWouldBeAssigned controller=1000 mode=persistent size=41943040
"""
helps['vmware_cs list'] = """
helps['vmware vm list'] = """
type: command
short-summary: List Vmware_css.
short-summary: List details of VMware virtual machines in the current subscription. If resource group is specified, only the details of virtual machines in that resource group would be listed.
examples:
- name: List details of VMware VMs in the current subscription.
text: >
az vmware vm list
- name: List details of VMware VMs in a particular resource group.
text: >
az vmware vm list -g MyResourceGroup
"""
# helps['vmware_cs delete'] = """
# type: command
# short-summary: Delete a Vmware_cs.
# """
helps['vmware vm delete'] = """
type: command
short-summary: Delete a VMware virtual machine.
examples:
- name: Delete a VMware VM.
text: >
az vmware vm delete -n MyVm -g MyResourceGroup
"""
# helps['vmware_cs show'] = """
# type: command
# short-summary: Show details of a Vmware_cs.
# """
helps['vmware vm show'] = """
type: command
short-summary: Get the details of a VMware virtual machine.
examples:
- name: Get the details of a VMware VM.
text: >
az vmware vm show -n MyVm -g MyResourceGroup
"""
# helps['vmware_cs update'] = """
# type: command
# short-summary: Update a Vmware_cs.
# """
helps['vmware vm start'] = """
type: command
short-summary: Start a VMware virtual machine.
examples:
- name: Start a VMware VM.
text: >
az vmware vm start -n MyVm -g MyResourceGroup
"""
helps['vmware vm stop'] = """
type: command
short-summary: Stop/Reboot/Suspend a VMware virtual machine.
examples:
- name: Power off a VMware VM.
text: >
az vmware vm stop -n MyVm -g MyResourceGroup --mode poweroff
- name: Restart a VMware VM.
text: >
az vmware vm stop -n MyVm -g MyResourceGroup --mode reboot
"""
helps['vmware vm update'] = """
type: command
short-summary: Update the tags field of a VMware virtual machine.
examples:
- name: Add or update a tag.
text: >
az vmware vm update -n MyVm -g MyResourceGroup --set tags.tagName=tagValue
- name: Remove a tag.
text: >
az vmware vm update -n MyVm -g MyResourceGroup --remove tags.tagName
"""
helps['vmware vm nic'] = """
type: group
short-summary: Manage VMware virtual machine's Network Interface Cards.
"""
helps['vmware vm nic add'] = """
type: command
short-summary: Add NIC to a VMware virtual machine.
examples:
- name: Add a NIC with default parameters in a VM.
text: >
az vmware vm nic add --vm-name MyVm -g MyResourceGroup --virtual-network MyVirtualNetwork
- name: Add a NIC with E1000E adapter that powers on boot in a VM.
text: >
az vmware vm nic add --vm-name MyVm -g MyResourceGroup --virtual-network MyVirtualNetwork --adapter E1000E --power-on-boot true
"""
helps['vmware vm nic list'] = """
type: command
short-summary: List details of NICs available on a VMware virtual machine.
examples:
- name: List details of NICs in a VM.
text: >
az vmware vm nic list --vm-name MyVm -g MyResourceGroup
"""
helps['vmware vm nic show'] = """
type: command
short-summary: Get the details of a VMware virtual machine's NIC.
examples:
- name: Get the details of a NIC in a VM.
text: >
az vmware vm nic show --vm-name MyVm -g MyResourceGroup -n "My NIC Name"
"""
helps['vmware vm nic delete'] = """
type: command
short-summary: Delete NICs from a VM.
examples:
- name: Delete two NICs from a VM.
text: >
az vmware vm nic delete --vm-name MyVm -g MyResourceGroup --nics "My NIC Name 1" "My NIC Name 2"
"""
helps['vmware vm disk'] = """
type: group
short-summary: Manage VMware virtual machine's disks.
"""
helps['vmware vm disk add'] = """
type: command
short-summary: Add disk to a VMware virtual machine.
examples:
- name: Add a disk with default parameters in a VM.
text: >
az vmware vm disk add --vm-name MyVm -g MyResourceGroup
- name: Add a disk with SATA controller 0 and 64 GB memory in a VM.
text: >
az vmware vm disk add --vm-name MyVm -g MyResourceGroup --controller 15000 --size 67108864
"""
helps['vmware vm disk list'] = """
type: command
short-summary: List details of disks available on a VMware virtual machine.
examples:
- name: List details of disks in a VM.
text: >
az vmware vm disk list --vm-name MyVm -g MyResourceGroup
"""
helps['vmware vm disk show'] = """
type: command
short-summary: Get the details of a VMware virtual machine's disk.
examples:
- name: Get the details of a disk in a VM.
text: >
az vmware vm disk show --vm-name MyVm -g MyResourceGroup -n "My Disk Name"
"""
helps['vmware vm disk delete'] = """
type: command
short-summary: Delete disks from a VM.
examples:
- name: Delete two disks from a VM.
text: >
az vmware vm disk delete --vm-name MyVm -g MyResourceGroup --disks "My Disk Name 1" "My Disk Name 2"
"""
helps['vmware set-region'] = """
type: command
short-summary: Set the current region.
"""
helps['vmware get-region'] = """
type: command
short-summary: Get the current region.
"""
helps['vmware vm-template'] = """
type: group
short-summary: Manage VMware virtual machine templates.
"""
helps['vmware vm-template list'] = """
type: command
short-summary: List details of VMware virtual machines templates in a private cloud.
examples:
- name: List details of VM templates.
text: >
az vmware vm-template list -p MyPrivateCloud -r MyResourcePool --location eastus
"""
helps['vmware vm-template show'] = """
type: command
short-summary: Get the details of a VMware virtual machines template in a private cloud.
examples:
- name: Get the details of a VM template.
text: >
az vmware vm-template show -n MyVmTemplate -p MyPrivateCloud --location eastus
"""
helps['vmware virtual-network'] = """
type: group
short-summary: Manage virtual networks.
"""
helps['vmware virtual-network list'] = """
type: command
short-summary: List details of available virtual networks in a private cloud.
examples:
- name: List details of virtual networks.
text: >
az vmware virtual-network list -p MyPrivateCloud -r MyResourcePool --location eastus
"""
helps['vmware virtual-network show'] = """
type: command
short-summary: Get the details of a virtual network in a private cloud.
examples:
- name: Get the details of a virtual network.
text: >
az vmware virtual-network show -n MyVirtualNetwork -p MyPrivateCloud --location eastus
"""
helps['vmware private-cloud'] = """
type: group
short-summary: Manage VMware private clouds.
"""
helps['vmware private-cloud list'] = """
type: command
short-summary: List details of private clouds in a region.
examples:
- name: List details of private clouds in East US.
text: >
az vmware private-cloud list --location eastus
"""
helps['vmware private-cloud show'] = """
type: command
short-summary: Get the details of a private cloud in a region.
examples:
- name: Get the details of a private cloud which is in East US.
text: >
az vmware private-cloud show -n MyPrivateCloud --location eastus
"""
helps['vmware resource-pool'] = """
type: group
short-summary: Manage VMware resource pools.
"""
helps['vmware resource-pool list'] = """
type: command
short-summary: List details of resource pools in a private cloud.
examples:
- name: List details of resource pools.
text: >
az vmware resource-pool list -p MyPrivateCloud --location eastus
"""
helps['vmware resource-pool show'] = """
type: command
short-summary: Get the details of a resource pool in a private cloud.
examples:
- name: Get the details of a resource pool.
text: >
az vmware resource-pool show -n MyResourcePool -p MyPrivateCloud --location eastus
"""

Просмотреть файл

@ -3,21 +3,160 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
"""
This file manages the arguments for all the commands. Names, help strings, types, validation, etc of argument is done over here.
"""
from knack.arguments import CLIArgumentType
from azure.cli.core.commands.parameters import (resource_group_name_type,
get_location_type,
get_resource_name_completion_list,
tags_type,
get_enum_type,
get_three_state_flag)
from azext_vmware_cs.vendored_sdks.models import (StopMode,
NICType,
DiskIndependenceMode)
from ._validators import (private_cloud_name_or_id_validator,
template_name_or_id_validator,
resource_pool_name_or_id_validator,
ram_validator, cores_validator,
disk_size_validator,
private_cloud_only_name_validator,
resource_pool_only_name_validator,
template_only_name_validator,
vnet_only_name_validator,
vm_name_validator,
location_validator)
from ._actions import (AddNicAction, AddDiskAction)
def load_arguments(self, _):
"""
Load argument method of command loader.
"""
from azure.cli.core.commands.parameters import tags_type
from azure.cli.core.commands.validators import get_default_location_from_resource_group
with self.argument_context('vmware') as c:
c.argument('resource_group_name', arg_type=resource_group_name_type)
c.argument('tags', arg_type=tags_type)
c.argument('location', get_location_type(self.cli_ctx), validator=location_validator,
help="Region in which the private cloud is present. If default location is not configured, will default to the resource group\'s location.")
vmware_cs_name_type = CLIArgumentType(options_list='--vmware-cs-name-name', help='Name of the Vmware_cs.', id_part='name')
with self.argument_context('vmware vm') as c:
c.argument('vm_name', options_list=['--name', '-n'],
help="Name of the virtual machine.",
validator=vm_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/virtualMachines'))
c.argument('amount_of_ram', options_list=['--ram'],
validator=ram_validator,
help="The amount of memory in MB. The default is taken from the vSphere VM template specified.")
c.argument('stop_mode', options_list=['--mode'], arg_type=get_enum_type(StopMode),
help="Stop mode.")
c.argument('number_of_cores', options_list=['--cores'],
validator=cores_validator,
help="The number of CPU cores required. The default is taken from the vSphere VM template specified.")
c.argument('resource_pool', options_list=['--resource-pool', '-r'],
validator=resource_pool_name_or_id_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/resourcePools'),
help="ID of the VMware resource pool for this virtual machine in your CloudSimple Private Cloud. You can also pass the basename of the ID.")
c.argument('template', options_list=['--template'],
validator=template_name_or_id_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/virtualmachinetemplates'),
help="ID of the vSphere template from which this virtual machine will be created. You can also pass the basename of the ID.")
c.argument('private_cloud', options_list=['--private-cloud', '-p'],
validator=private_cloud_name_or_id_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/privateClouds'),
help="Name or ID of the CloudSimple private cloud.")
c.argument('expose_to_guest_vm', options_list=['--expose-to-guest-vm'],
arg_type=get_three_state_flag(),
help="Will expose full CPU virtualization to the guest operating system. The default is taken from the vSphere VM template specified.")
with self.argument_context('vmware_cs') as c:
c.argument('tags', tags_type)
c.argument('location', validator=get_default_location_from_resource_group)
c.argument('vmware_cs_name', vmware_cs_name_type, options_list=['--name', '-n'])
c.argument('nics', options_list=['--nic'], action=AddNicAction, arg_group='Network', nargs='+')
with self.argument_context('vmware_cs list') as c:
c.argument('vmware_cs_name', vmware_cs_name_type, id_part=None)
c.argument('disks', options_list=['--disk'], action=AddDiskAction, arg_group='Storage', nargs='+')
with self.argument_context('vmware vm nic') as c:
c.argument('vm_name', options_list=['--vm-name'],
help="Name of the virtual machine.",
validator=vm_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/virtualMachines'))
c.argument('virtual_network', options_list=['--virtual-network'], arg_group='Network',
help="ID of the virtual network. You can also pass the basename of the ID.")
c.argument('adapter', options_list=['--adapter'], arg_group='Network',
arg_type=get_enum_type(NICType),
help="The adapter for the NIC.")
c.argument('power_on_boot', options_list=['--power-on-boot'], arg_group='Network',
arg_type=get_three_state_flag(),
help="Will power on the NIC at boot time.")
c.argument('nic_name', options_list=['--name', '-n'], arg_group='Network',
help="Name of the NIC.")
c.argument('nic_names', options_list=['--nics'], nargs='+', arg_group='Network',
help="Names of NICs.")
with self.argument_context('vmware vm disk') as c:
c.argument('vm_name', options_list=['--vm-name'],
help="Name of the virtual machine.",
validator=vm_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/virtualMachines'))
c.argument('controller', options_list=['--controller'], arg_group='Storage',
help="Id of the controller. Input 1000 for SCSI controller 0, and 15000 for SATA controller 0.")
c.argument('independence_mode', options_list=['--mode'], arg_group='Storage',
arg_type=get_enum_type(DiskIndependenceMode),
help="The disk independence mode.")
c.argument('size', options_list=['--size'], arg_group='Storage',
validator=disk_size_validator,
help="The amount of disk size in KB.")
c.argument('disk_name', options_list=['--name', '-n'], arg_group='Storage',
help="Name of the disk.")
c.argument('disk_names', options_list=['--disks'], nargs='+', arg_group='Storage',
help="Names of disks.")
with self.argument_context('vmware vm-template') as c:
c.argument('private_cloud', options_list=['--private-cloud', '-p'],
validator=private_cloud_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/privateClouds'),
help="Name or ID of the CloudSimple private cloud.")
c.argument('resource_pool', options_list=['--resource-pool', '-r'],
validator=resource_pool_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/resourcePools'),
help="ID of the VMware resource pool in your CloudSimple Private Cloud. You can also pass the basename of the ID.")
c.argument('template', options_list=['--name', '-n'],
validator=template_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/virtualmachinetemplates'),
help="ID of the vSphere virtual machine template. You can also pass the basename of the ID.")
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")
with self.argument_context('vmware virtual-network') as c:
c.argument('private_cloud', options_list=['--private-cloud', '-p'],
validator=private_cloud_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/privateClouds'),
help="Name or ID of the CloudSimple private cloud.")
c.argument('resource_pool', options_list=['--resource-pool', '-r'],
validator=resource_pool_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/resourcePools'),
help="ID of the resource pool used to derive vSphere cluster which contains virtual networks. You can also pass the basename of the ID.")
c.argument('virtual_network', options_list=['--name', '-n'],
validator=vnet_only_name_validator,
help="ID of the virtual network (vsphereId). You can also pass the basename of the ID.")
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")
with self.argument_context('vmware resource-pool') as c:
c.argument('private_cloud', options_list=['--private-cloud', '-p'],
validator=private_cloud_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/privateClouds'),
help="Name or ID of the CloudSimple private cloud.")
c.argument('resource_pool', options_list=['--name', '-n'],
validator=resource_pool_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/resourcePools'),
help="ID of the VMware resource pool in your CloudSimple Private Cloud. You can also pass the basename of the ID.")
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")
with self.argument_context('vmware private-cloud') as c:
c.argument('private_cloud', options_list=['--name', '-n'],
validator=private_cloud_only_name_validator,
completer=get_resource_name_completion_list('Microsoft.VMwareCloudSimple/privateClouds'),
help="Name or ID of the CloudSimple private cloud.")
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")

91
azext_vmware_cs/_utils.py Normal file
Просмотреть файл

@ -0,0 +1,91 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
This file contains generic utility functions.
"""
from knack.util import CLIError
from ._config import PATH_CHAR
def vm_cs_create_resource_id(subscription, namespace, location,
resource_type, resource_name, child_type=None,
child_name=None):
"""
Constructs the resource id from the given information (the arguments).
"""
resource_id = PATH_CHAR + "subscriptions" + PATH_CHAR + subscription + PATH_CHAR + \
"providers" + PATH_CHAR + namespace + PATH_CHAR + "locations" + \
PATH_CHAR + location + PATH_CHAR + resource_type + PATH_CHAR + resource_name
if child_type is not None:
resource_id = resource_id + PATH_CHAR + child_type
if child_name is not None:
resource_id = resource_id + PATH_CHAR + child_name
return resource_id
def vmware_cs_name_or_id_validator(cmd, namespace, resource_type_display_name,
child_type=None, child_resource=None):
"""
Checks whether the resource is a valid resource id.
If not, then assuming that the passed value is a resource name, a resource id is constructed.
If the constructed resource id is also invalid, an error is raised.
"""
from azure.cli.core.commands.client_factory import get_subscription_id
from msrestazure.tools import is_valid_resource_id
if child_type is not None:
if not is_valid_resource_id(child_resource):
private_cloud = namespace.private_cloud
if is_valid_resource_id(private_cloud):
private_cloud = private_cloud.rsplit(PATH_CHAR, 1)[-1]
resource_id = vm_cs_create_resource_id(subscription=get_subscription_id(cmd.cli_ctx),
namespace='Microsoft.VMwareCloudSimple',
location=namespace.location,
resource_type='privateClouds',
resource_name=private_cloud,
child_type=child_type,
child_name=child_resource)
else:
resource_id = child_resource
else:
if not is_valid_resource_id(namespace.private_cloud):
resource_id = vm_cs_create_resource_id(subscription=get_subscription_id(cmd.cli_ctx),
namespace='Microsoft.VMwareCloudSimple',
location=namespace.location,
resource_type='privateClouds',
resource_name=namespace.private_cloud)
else:
resource_id = namespace.private_cloud
if not is_valid_resource_id(resource_id):
raise CLIError('Invalid ' + resource_type_display_name + '.')
return resource_id
def only_resource_name_validator(resource):
"""
Checks whether the passed value is just the resource name (and not the resource id).
If its the resource id, then the resource name is extracted.
"""
from msrestazure.tools import is_valid_resource_id
if is_valid_resource_id(resource):
return resource.rsplit(PATH_CHAR, 1)[-1]
return resource
def create_dictionary_from_arg_string(values, option_string=None):
"""
Creates and returns dictionary from a string containing params in KEY=VALUE format
"""
params_dict = {}
for item in values:
try:
key, value = item.split('=', 1)
params_dict[key] = value
except ValueError:
raise CLIError('usage error: {} KEY=VALUE [KEY=VALUE ...]'.format(option_string))
return params_dict

Просмотреть файл

@ -2,19 +2,203 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
This file contains the validation logic for arguments passed in CLI commands.
Which validator method to be used for which argument, is defined in _params.py file
"""
from knack.util import CLIError
from ._utils import (vm_cs_create_resource_id,
vmware_cs_name_or_id_validator,
only_resource_name_validator)
def example_name_or_id_validator(cmd, namespace):
# Example of a storage account name or ID validator.
# See: https://github.com/Azure/azure-cli/blob/dev/doc/authoring_command_modules/authoring_commands.md#supporting-name-or-id-parameters
def _check_postive_integer(parameter, value):
"""
Checks whether the input is a integer or not
"""
try:
val = int(value)
except ValueError:
raise CLIError(parameter + ' should be a postive integer value.')
if val <= 0:
raise CLIError(parameter + ' should be a postive integer value.')
def _check_regex(parameter, value):
"""
Checks whether the input matches ^[-a-zA-Z0-9]+$ pattern
"""
import re
pattern = r'^[-a-zA-Z0-9]+$'
if not re.match(pattern, value):
raise CLIError(parameter + ' should only contain letters, numbers, or hyphen.')
def vm_name_validator(namespace):
"""
Checks whether the vm name is following the required pattern
"""
if namespace.vm_name:
_check_regex('Virtual machine name', namespace.vm_name)
def ram_validator(namespace):
"""
Checks whether the ram input is a interger or not
"""
if namespace.amount_of_ram:
_check_postive_integer('RAM', namespace.amount_of_ram)
def cores_validator(namespace):
"""
Checks whether the number of cores input is a integer or not
"""
if namespace.number_of_cores:
_check_postive_integer('Cores', namespace.number_of_cores)
def disk_size_validator(namespace):
"""
Checks whether the size input is a integer or not
"""
if namespace.size:
_check_postive_integer('Size', namespace.size)
def location_validator(cmd, namespace):
"""
If the passed location is none, then it is defaulted to the resource group's location.
"""
from ._client_factory import cf_resource_groups
if not namespace.location:
client = cf_resource_groups(cmd.cli_ctx)
rg = client.get(namespace.resource_group_name)
namespace.location = rg.location
def private_cloud_only_name_validator(namespace):
"""
Checks whether the private cloud value is just the resource name (and not the resource id).
If its the resource id, then the resource name is extracted.
"""
if namespace.private_cloud:
namespace.private_cloud = only_resource_name_validator(namespace.private_cloud)
def resource_pool_only_name_validator(namespace):
"""
Checks whether the resource pool value is just the resource name (and not the resource id).
If its the resource id, then the resource name is extracted.
"""
if namespace.resource_pool:
namespace.resource_pool = only_resource_name_validator(namespace.resource_pool)
def template_only_name_validator(namespace):
"""
Checks whether the vm template value is just the resource name (and not the resource id).
If its the resource id, then the resource name is extracted.
"""
if namespace.template:
namespace.template = only_resource_name_validator(namespace.template)
def vnet_only_name_validator(namespace):
"""
Checks whether the virtual network value is just the resource name (and not the resource id).
If its the resource id, then the resource name is extracted.
"""
if namespace.virtual_network:
namespace.virtual_network = only_resource_name_validator(namespace.virtual_network)
def private_cloud_name_or_id_validator(cmd, namespace):
"""
Checks whether the private cloud value is a valid resource id.
If not, then assuming that the passed value is a resource name, a resource id is constructed.
If the constructed resource id is also invalid, an error is raised.
"""
if namespace.private_cloud:
namespace.private_cloud = vmware_cs_name_or_id_validator(cmd, namespace, 'private cloud')
def template_name_or_id_validator(cmd, namespace):
"""
Checks whether the passed value is a valid resource id.
If not, then assuming that the passed value is a resource name, a resource id is constructed.
If the constructed resource id is also invalid, an error is raised.
"""
if namespace.template:
namespace.template = vmware_cs_name_or_id_validator(cmd, namespace,
'template',
'virtualmachinetemplates',
namespace.template)
def resource_pool_name_or_id_validator(cmd, namespace):
"""
Checks whether the passed value is a valid resource id.
If not, then assuming that the passed value is a resource name, a resource id is constructed.
If the constructed resource id is also invalid, an error is raised.
"""
if namespace.resource_pool:
namespace.resource_pool = vmware_cs_name_or_id_validator(cmd, namespace,
'resource pool',
'resourcepools',
namespace.resource_pool)
def virtual_network_name_or_id_validator(cmd, client, virtual_network, resource_group_name,
vm_name, region=None, pc=None):
"""
Checks whether the passed value is a valid resource id.
If not, then assuming that the passed value is a resource name, a resource id is constructed.
If the constructed resource id is also invalid, an error is raised.
"""
from azure.cli.core.commands.client_factory import get_subscription_id
from msrestazure.tools import is_valid_resource_id, resource_id
if namespace.storage_account:
if not is_valid_resource_id(namespace.RESOURCE):
namespace.storage_account = resource_id(
subscription=get_subscription_id(cmd.cli_ctx),
resource_group=namespace.resource_group_name,
namespace='Microsoft.Storage',
type='storageAccounts',
name=namespace.storage_account
)
from msrestazure.tools import is_valid_resource_id
from ._config import PATH_CHAR
location = region
private_cloud = pc
if ((pc is None) and (region is None)):
virtual_machine = client.get(resource_group_name, vm_name)
location = virtual_machine.location
private_cloud = virtual_machine.private_cloud_id
if is_valid_resource_id(private_cloud):
private_cloud = private_cloud.rsplit(PATH_CHAR, 1)[-1]
if not is_valid_resource_id(virtual_network):
virtual_network = vm_cs_create_resource_id(subscription=get_subscription_id(cmd.cli_ctx),
namespace='Microsoft.VMwareCloudSimple',
location=location,
resource_type='privateClouds',
resource_name=private_cloud,
child_type='virtualnetworks',
child_name=virtual_network)
if not is_valid_resource_id(virtual_network):
raise CLIError('Invalid virtual network.')
return virtual_network
def vm_create_namespace_validator(cmd, namespace):
"""
Command validator for the create vm command.
This calls various argument validators.
We need this for sequencing argument validators essentially.
More specifically we want the location validator to run before other validators,
because some of the other argument validators requires location to be present in the namespace,
and location validator is responsible for extracting location from resource group,
if it is not present in namespace.
"""
vm_name_validator(namespace)
location_validator(cmd, namespace)
private_cloud_name_or_id_validator(cmd, namespace)
resource_pool_name_or_id_validator(cmd, namespace)
template_name_or_id_validator(cmd, namespace)
cores_validator(namespace)
ram_validator(namespace)

Просмотреть файл

@ -2,28 +2,70 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
"""
This file contains load_command_table method of command loader.
Here the commands are registered so that they can used in the CLI.
"""
from azure.cli.core.commands import CliCommandType
from azext_vmware_cs._client_factory import cf_vmware_cs
from azext_vmware_cs._client_factory import (cf_vmware_cs,
cf_virtual_machine,
cf_private_cloud,
cf_resource_pool,
cf_virtual_machine_template,
cf_virtual_network)
from ._format import (transform_vm_table_output, transform_vm_table_list)
from ._validators import (vm_create_namespace_validator)
def load_command_table(self, _):
"""
Load command table method of command loader.
"""
# TODO: Add command type here
# vmware_cs_sdk = CliCommandType(
# operations_tmpl='<PATH>.operations#None.{}',
# client_factory=cf_vmware_cs)
custom_tmpl = 'azext_vmware_cs.custom#{}'
custom_type = CliCommandType(operations_tmpl=custom_tmpl)
with self.command_group('vmware vm', client_factory=cf_vmware_cs) as g:
g.custom_command('create', 'create_vm', table_transformer=transform_vm_table_output, validator=vm_create_namespace_validator)
with self.command_group('vmware_cs') as g:
g.custom_command('create', 'create_vmware_cs')
# g.command('delete', 'delete')
g.custom_command('list', 'list_vmware_cs')
# g.show_command('show', 'get')
# g.generic_update_command('update', setter_name='update', custom_func_name='update_vmware_cs')
with self.command_group('vmware vm', client_factory=cf_virtual_machine) as g:
g.custom_command('list', 'list_vm', table_transformer=transform_vm_table_list)
g.custom_command('show', 'get_vm', table_transformer=transform_vm_table_output)
g.generic_update_command('update', getter_name='get_vm', setter_name='update_vm',
command_type=custom_type, supports_no_wait=True)
g.custom_command('delete', 'delete_vm')
g.custom_command('start', 'start_vm')
g.custom_command('stop', 'stop_vm')
with self.command_group('vmware vm disk', client_factory=cf_virtual_machine) as g:
g.custom_command('add', 'add_vdisk')
g.custom_command('show', 'show_vdisk')
g.custom_command('list', 'list_vdisks')
g.custom_command('delete', 'delete_vdisks')
with self.command_group('vmware_cs', is_preview=True):
with self.command_group('vmware vm nic', client_factory=cf_virtual_machine) as g:
g.custom_command('add', 'add_vnic')
g.custom_command('show', 'show_vnic')
g.custom_command('list', 'list_vnics')
g.custom_command('delete', 'delete_vnics')
with self.command_group('vmware vm-template', client_factory=cf_virtual_machine_template) as g:
g.custom_command('show', 'show_vm_template')
g.custom_command('list', 'list_vm_template')
with self.command_group('vmware virtual-network', client_factory=cf_virtual_network) as g:
g.custom_command('show', 'show_virtual_network')
g.custom_command('list', 'list_virtual_networks')
with self.command_group('vmware resource-pool', client_factory=cf_resource_pool) as g:
g.custom_command('show', 'show_resource_pool')
g.custom_command('list', 'list_resource_pool')
with self.command_group('vmware private-cloud', client_factory=cf_private_cloud) as g:
g.custom_command('list', 'list_private_cloud')
g.custom_command('show', 'show_private_cloud')
with self.command_group('vmware', is_preview=True):
pass

Просмотреть файл

@ -2,19 +2,418 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
"""
This file contains the custom methods which are executed whenever any command is called.
The custom methods are linked to the commands at the time of command registeration (commands.py).
"""
from knack.util import CLIError
def create_vmware_cs(cmd, resource_group_name, vmware_cs_name, location=None, tags=None):
raise CLIError('TODO: Implement `vmware_cs create`')
def list_private_cloud(client, location):
"""
Returns a list of private clouds in a region.
"""
return client.list(location)
def list_vmware_cs(cmd, resource_group_name=None):
raise CLIError('TODO: Implement `vmware_cs list`')
def show_private_cloud(client, private_cloud, location):
"""
Get the details of a private cloud.
"""
return client.get(private_cloud, location)
def update_vmware_cs(cmd, instance, tags=None):
with cmd.update_context(instance) as c:
c.set_param('tags', tags)
return instance
def list_resource_pool(client, private_cloud, location):
"""
Returns the list of resource pool in the specified private cloud.
"""
return client.list(location, private_cloud)
def show_resource_pool(client, private_cloud, resource_pool, location):
"""
Returns the details of a resource pool.
"""
return client.get(location, private_cloud, resource_pool)
def list_virtual_networks(client, private_cloud, resource_pool, location):
"""
Returns the list of available virtual networks in a resource pool, in a private cloud.
"""
return client.list(location, private_cloud, resource_pool)
def show_virtual_network(client, private_cloud, virtual_network, location):
"""
Returns the details of a virtual network in a private cloud.
"""
return client.get(location, private_cloud, virtual_network)
def list_vm_template(client, private_cloud, resource_pool, location):
"""
Returns the list of VMware virtual machines templates in a resource pool, in a private cloud.
"""
return client.list(private_cloud, location, resource_pool)
def show_vm_template(client, private_cloud, template, location):
"""
Returns details of a VMware virtual machines template in a private cloud.
"""
return client.get(location, private_cloud, template)
# --------------------------------------------------------------------------------------------
# Virtual Machine APIs
# --------------------------------------------------------------------------------------------
def _modify_template_disks_according_to_input(template_disks, input_disks):
"""
Change template disks according to the input given by the user.
"""
# Populating the disk names of vm-template in a dictionary,
# and mapping them to their index in template_disks list
vm_template_disk_names = {}
for (i, disk) in enumerate(template_disks):
vm_template_disk_names[disk.virtual_disk_name] = i
from .vendored_sdks.models import VirtualDisk
# Check if disks entered by the user exist in vm-template,
# then override the properties specified. Else create a new disk.
for disk in input_disks:
if disk['name'] in vm_template_disk_names.keys():
index = vm_template_disk_names[disk['name']]
if 'controller' in disk.keys():
template_disks[index].controller_id = disk['controller']
if 'mode' in disk.keys():
template_disks[index].independence_mode = disk['mode']
if 'size' in disk.keys():
template_disks[index].total_size = disk['size']
else:
disk_name = disk['name']
if 'controller' in disk.keys():
controller = disk['controller']
else:
raise CLIError('controller parameter not specified for disk ' + disk_name + ".")
if 'mode' in disk.keys():
mode = disk['mode']
else:
raise CLIError('mode parameter not specified for disk ' + disk_name + ".")
if 'size' in disk.keys():
size = disk['size']
else:
raise CLIError('size parameter not specified for disk ' + disk_name + ".")
disk_object = VirtualDisk(controller_id=controller,
independence_mode=mode,
total_size=size)
template_disks.append(disk_object)
return template_disks
def _modify_template_nics_according_to_input(template_nics, input_nics, cmd, client,
resource_group_name, vm_name,
location, private_cloud):
"""
Change template nics according to the input given by the user.
"""
# Populating the nic names of vm-template in a dictionary,
# and mapping them to their index in template_nics list
vm_template_nic_names = {}
for (i, nic) in enumerate(template_nics):
vm_template_nic_names[nic.virtual_nic_name] = i
from .vendored_sdks.models import VirtualNic
from .vendored_sdks.models import VirtualNetwork
from ._validators import virtual_network_name_or_id_validator
# Check if nics entered by a user exist in vm-template,
# then override the properties specified. Else create a new nic.
for nic in input_nics:
if nic['name'] in vm_template_nic_names.keys():
index = vm_template_nic_names[nic['name']]
if 'virtual-network' in nic.keys():
template_nics[index].network.id = nic['virtual-network']
if 'adapter' in nic.keys():
template_nics[index].nic_type = nic['adapter']
if 'power-on-boot' in nic.keys():
template_nics[index].power_on_boot = nic['power-on-boot']
template_nics[index].virtual_nic_id = None
else:
nic_name = nic['name']
if 'virtual-network' in nic.keys():
vnet = nic['virtual-network']
else:
raise CLIError('virtual-network parameter not specified for nic ' +
nic_name + ".")
if 'adapter' in nic.keys():
adapter = nic['adapter']
else:
raise CLIError('adapter parameter not specified for nic ' +
nic_name + ".")
if 'power-on-boot' in nic.keys():
power_on_boot = nic['power-on-boot']
else:
raise CLIError('power-on-boot parameter not specified for nic ' +
nic_name + ".")
vnet = virtual_network_name_or_id_validator(cmd, client, vnet,
resource_group_name, vm_name,
location, private_cloud)
network = VirtualNetwork(id=vnet)
nic_object = VirtualNic(network=network,
nic_type=adapter,
power_on_boot=power_on_boot)
template_nics.append(nic_object)
return template_nics
def create_vm(cmd, client, resource_group_name, vm_name,
private_cloud, template, resource_pool,
amount_of_ram=None, number_of_cores=None,
location=None, expose_to_guest_vm=None,
nics=None, disks=None):
"""
Create or update a VMware virtual machine.
The vm-template specified is used as a template for creation.
"""
from .vendored_sdks.models import VirtualMachine
from .vendored_sdks.models import ResourcePool
from ._config import PATH_CHAR
resource_pool = ResourcePool(id=resource_pool)
# Extracting template and private cloud name from the resource id
template_name = template.rsplit(PATH_CHAR, 1)[-1]
private_cloud_name = private_cloud.rsplit(PATH_CHAR, 1)[-1]
vm_template = client.virtual_machine_templates.get(location, private_cloud_name, template_name)
cores = number_of_cores or vm_template.number_of_cores
ram = amount_of_ram or vm_template.amount_of_ram
expose = vm_template.expose_to_guest_vm
if expose_to_guest_vm is not None:
expose = expose_to_guest_vm
final_disks = vm_template.disks
if disks is not None:
final_disks = _modify_template_disks_according_to_input(final_disks, disks)
final_nics = vm_template.nics
if nics is not None:
final_nics = _modify_template_nics_according_to_input(final_nics, nics, cmd, client,
resource_group_name, vm_name,
location, private_cloud)
virtual_machine = VirtualMachine(location=location,
amount_of_ram=ram,
disks=final_disks,
expose_to_guest_vm=expose,
nics=final_nics,
number_of_cores=cores,
private_cloud_id=private_cloud,
resource_pool=resource_pool,
template_id=template)
return client.virtual_machines.create_or_update(resource_group_name, vm_name, virtual_machine)
def list_vm(client, resource_group_name=None):
"""
Returns a list of VMware virtual machines in the current subscription.
If resource group is specified, only the virtual machines
in that resource group would be listed.
"""
if resource_group_name is None:
return client.list_by_subscription()
return client.list_by_resource_group(resource_group_name)
def delete_vm(client, resource_group_name, vm_name):
"""
Delete a VMware virtual machine.
"""
return client.delete(resource_group_name, vm_name)
def get_vm(client, resource_group_name, vm_name):
"""
Returns a VMware virtual machine.
"""
return client.get(resource_group_name, vm_name)
def start_vm(client, resource_group_name, vm_name):
"""
Start a VMware virtual machine.
"""
return client.start(resource_group_name, vm_name)
def stop_vm(client, resource_group_name, vm_name, stop_mode):
"""
Stop a VMware virtual machine.
"""
return client.stop(resource_group_name, vm_name, stop_mode)
def update_vm(client, resource_group_name, vm_name, **kwargs):
"""
Update VMware virtual machine tags.
"""
return client.update(resource_group_name, vm_name, kwargs['parameters'].tags)
# --------------------------------------------------------------------------------------------
# VM nics APIs
# --------------------------------------------------------------------------------------------
def add_vnic(cmd, client, resource_group_name, vm_name,
virtual_network, adapter="VMXNET3", power_on_boot=False):
"""
Add virtual network interface to a VMware virtual machine.
"""
from .vendored_sdks.models import VirtualNic
from .vendored_sdks.models import VirtualNetwork
from ._validators import virtual_network_name_or_id_validator
virtual_machine = client.get(resource_group_name, vm_name)
virtual_network = virtual_network_name_or_id_validator(cmd, client, virtual_network, resource_group_name, vm_name)
network = VirtualNetwork(id=virtual_network)
nic = VirtualNic(network=network,
nic_type=adapter,
power_on_boot=power_on_boot)
virtual_machine.nics.append(nic)
return client.create_or_update(resource_group_name, vm_name, virtual_machine)
def list_vnics(client, resource_group_name, vm_name):
"""
List details of a VMware virtual machine's nics.
"""
virtual_machine = client.get(resource_group_name, vm_name)
return virtual_machine.nics
def show_vnic(client, resource_group_name, vm_name, nic_name):
"""
Get the details of a VMware virtual machine's NIC.
"""
virtual_machine = client.get(resource_group_name, vm_name)
for nic in virtual_machine.nics:
if nic.virtual_nic_name == nic_name:
return nic
return None
def delete_vnics(client, resource_group_name, vm_name, nic_names):
"""
Delete NICs from a VM.
"""
import copy
virtual_machine = client.get(resource_group_name, vm_name)
# Dictionary to maintain the nics to delete
to_delete_nics = {}
for nic_name in nic_names:
to_delete_nics[nic_name] = True
# We'll be iterating over virtual_machine.nics.
# Hence we need a copy of that which we can modify within the loop.
final_nics = copy.deepcopy(virtual_machine.nics)
for nic in virtual_machine.nics:
if nic.virtual_nic_name in to_delete_nics.keys():
final_nics.remove(nic)
to_delete_nics[nic.virtual_nic_name] = False
virtual_machine.nics = final_nics
client.create_or_update(resource_group_name, vm_name, virtual_machine)
not_deleted_nics = ""
for nic_name in to_delete_nics:
if to_delete_nics[nic_name]:
not_deleted_nics = not_deleted_nics + nic_name + ", "
not_deleted_nics = not_deleted_nics[:-2]
if not_deleted_nics != "":
raise CLIError(not_deleted_nics + ' not present in the given virtual machine. Other nics (if mentioned) were deleted.')
# --------------------------------------------------------------------------------------------
# VM disks APIs
# --------------------------------------------------------------------------------------------
def add_vdisk(client, resource_group_name, vm_name, controller="1000",
independence_mode="persistent", size=16777216):
"""
Add disk to a VMware virtual machine
"""
from .vendored_sdks.models import VirtualDisk
virtual_machine = client.get(resource_group_name, vm_name)
disk = VirtualDisk(controller_id=controller,
independence_mode=independence_mode,
total_size=size)
virtual_machine.disks.append(disk)
return client.create_or_update(resource_group_name, vm_name, virtual_machine)
def list_vdisks(client, resource_group_name, vm_name):
"""
List details of disks available on a VMware virtual machine.
"""
virtual_machine = client.get(resource_group_name, vm_name)
return virtual_machine.disks
def show_vdisk(client, resource_group_name, vm_name, disk_name):
"""
Get the details of a VMware virtual machine's disk.
"""
virtual_machine = client.get(resource_group_name, vm_name)
for disk in virtual_machine.disks:
if disk.virtual_disk_name == disk_name:
return disk
return None
def delete_vdisks(client, resource_group_name, vm_name, disk_names):
"""
Delete disks from a VM.
"""
import copy
virtual_machine = client.get(resource_group_name, vm_name)
# Dictionary to maintain the disks to delete
to_delete_disks = {}
for disk_name in disk_names:
to_delete_disks[disk_name] = True
# We'll be iterating over virtual_machine.disks.
# Hence we need a copy of that which we can modify within the loop.
final_disks = copy.deepcopy(virtual_machine.disks)
for disk in virtual_machine.disks:
if disk.virtual_disk_name in to_delete_disks.keys():
final_disks.remove(disk)
to_delete_disks[disk.virtual_disk_name] = False
virtual_machine.disks = final_disks
client.create_or_update(resource_group_name, vm_name, virtual_machine)
not_deleted_disks = ""
for disk_name in to_delete_disks:
if to_delete_disks[disk_name]:
not_deleted_disks = not_deleted_disks + disk_name + ", "
not_deleted_disks = not_deleted_disks[:-2]
if not_deleted_disks != "":
raise CLIError(not_deleted_disks + ' not present in the given virtual machine. Other disks (if mentioned) were deleted.')

Просмотреть файл

@ -2,4 +2,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------

Просмотреть файл

@ -2,4 +2,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,99 @@
interactions:
- request:
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
"date": "2019-10-17T05:49:25Z"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group create
Connection:
- keep-alive
Content-Length:
- '110'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --location --name --tag
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001","name":"cli_test_vmware_cs000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2019-10-17T05:49:25Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
content-length:
- '384'
content-type:
- application/json; charset=utf-8
date:
- Thu, 17 Oct 2019 05:49:34 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group delete
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- --name --yes --no-wait
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: ''
headers:
cache-control:
- no-cache
content-length:
- '0'
date:
- Thu, 17 Oct 2019 05:49:44 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGVk1XQVJFOjVGQ1NGRzQ1TzNEN01MSFREQkpCVDdHWkRSM3xBNzU2Mjk2NkZGNjUxQTBBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
status:
code: 202
message: Accepted
version: 1

Просмотреть файл

@ -0,0 +1,937 @@
interactions:
- request:
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
"date": "2019-10-17T05:49:25Z"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group create
Connection:
- keep-alive
Content-Length:
- '110'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --location --name --tag
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001","name":"cli_test_vmware_cs000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2019-10-17T05:49:25Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
content-length:
- '384'
content-type:
- application/json; charset=utf-8
date:
- Thu, 17 Oct 2019 05:49:33 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1198'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm list
Connection:
- keep-alive
ParameterSetName:
- -g
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines?api-version=2019-04-01
response:
body:
string: '{"value":[]}'
headers:
cache-control:
- no-cache
content-length:
- '12'
content-type:
- application/json; charset=utf-8
date:
- Thu, 17 Oct 2019 05:49:33 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm create
Connection:
- keep-alive
ParameterSetName:
- -g -n --location --ram --cores --private-cloud --template --resource-pool
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualMachineTemplates/vm-125?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","location":"eastus","name":"UbuntuDesktop","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:9a:60","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"path":"Datacenter","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","vSphereNetworks":null,"vSphereTags":null,"vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachineTemplates"}
'
headers:
cache-control:
- no-cache
content-length:
- '1283'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:49:35 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- d4cb3bef-92bc-4bb0-a4fe-4ef0db0e9658
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 27643231be975fed
status:
code: 200
message: OK
- request:
body: '{"location": "eastus", "properties": {"amountOfRam": 1024, "disks": [{"controllerId":
"1000", "independenceMode": "persistent", "totalSize": 16777216, "virtualDiskId":
"2000"}], "nics": [{"macAddress": "00:50:56:89:9a:60", "network": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},
"nicType": "VMXNET3", "powerOnBoot": true, "virtualNicId": "4000"}], "numberOfCores":
1, "privateCloudId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus",
"resourcePool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169"},
"templateId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm create
Connection:
- keep-alive
Content-Length:
- '1036'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- -g -n --location --ram --cores --private-cloud --template --resource-pool
Referer:
- https://management.azure.com/
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000"}],"nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:9a:60","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000"}],"numberOfCores":1,"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","provisioningState":"Created","resourcePool":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169"},"templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","vSphereNetworks":null,"vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}
'
headers:
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/e843a831-f0a1-11e9-b68a-d6541c658aed?api-version=2019-04-01
cache-control:
- no-cache
content-length:
- '1426'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:49:39 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 5a68542f-801f-4e6c-b266-ca42d0665c66
x-env-name:
- eastus-he.azure.cloudsimple.com
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-tracing-transaction-id:
- 2809deef2370ea1e
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm create
Connection:
- keep-alive
ParameterSetName:
- -g -n --location --ram --cores --private-cloud --template --resource-pool
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/e843a831-f0a1-11e9-b68a-d6541c658aed?api-version=2019-04-01
response:
body:
string: '{"endTime":"2019-10-17T05:50:06.467Z","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/e843a831-f0a1-11e9-b68a-d6541c658aed","name":"e843a831-f0a1-11e9-b68a-d6541c658aed","startTime":"2019-10-17T05:49:38.865Z","status":"Succeeded"}
'
headers:
cache-control:
- no-cache
content-length:
- '313'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:10 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 97104dd9-37ef-432e-acab-7807044b6045
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 7a1c94c73671c593
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm create
Connection:
- keep-alive
ParameterSetName:
- -g -n --location --ram --cores --private-cloud --template --resource-pool
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"folder":"Datacenter","guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"assignable":true,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85","location":"eastus","name":"Datacenter/Workload01","properties":{"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus"},"type":"Microsoft.VMwareCloudSimple/virtualNetworks"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","provisioningState":"Succeeded","resourcePool":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169","location":"eastus","name":"AzCLITest","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"Datacenter/Cluster/AzCLITest"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},"status":"running","templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}
'
headers:
cache-control:
- no-cache
content-length:
- '2358'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:11 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 6597e411-73c4-47d8-9fb3-953bf2786ea6
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 62b622c27724ba90
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm list
Connection:
- keep-alive
ParameterSetName:
- -g
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines?api-version=2019-04-01
response:
body:
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"id":"45d858d8-20e2-4776-a14b-96e1e3ab7327:dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"45d858d8-20e2-4776-a14b-96e1e3ab7327","resourcePool":{"id":"45d858d8-20e2-4776-a14b-96e1e3ab7327:resgroup-169"},"templateId":"45d858d8-20e2-4776-a14b-96e1e3ab7327:vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}]}
'
headers:
cache-control:
- no-cache
content-length:
- '1247'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:12 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- cf4ec406-36fa-4708-b3ab-6cc86702e391
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 6e46a181bd61086f
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm show
Connection:
- keep-alive
ParameterSetName:
- -g -n
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"folder":"Datacenter","guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"assignable":true,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85","location":"eastus","name":"Datacenter/Workload01","properties":{"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus"},"type":"Microsoft.VMwareCloudSimple/virtualNetworks"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","provisioningState":"Succeeded","resourcePool":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169","location":"eastus","name":"AzCLITest","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"Datacenter/Cluster/AzCLITest"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},"status":"running","templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}
'
headers:
cache-control:
- no-cache
content-length:
- '2358'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:13 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 1a94b79a-97ef-44ae-b727-6c0bc3d4e2f6
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- e2952447c0fdf0
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm show
Connection:
- keep-alive
ParameterSetName:
- -g -n -o
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"folder":"Datacenter","guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"assignable":true,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85","location":"eastus","name":"Datacenter/Workload01","properties":{"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus"},"type":"Microsoft.VMwareCloudSimple/virtualNetworks"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","provisioningState":"Succeeded","resourcePool":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169","location":"eastus","name":"AzCLITest","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"Datacenter/Cluster/AzCLITest"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},"status":"running","templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}
'
headers:
cache-control:
- no-cache
content-length:
- '2358'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:14 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- a6254a57-6dea-40f7-8197-869dcdb4a611
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 6ee04688ec42b0eb
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm list
Connection:
- keep-alive
ParameterSetName:
- -g -o
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines?api-version=2019-04-01
response:
body:
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"id":"45d858d8-20e2-4776-a14b-96e1e3ab7327:dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"45d858d8-20e2-4776-a14b-96e1e3ab7327","resourcePool":{"id":"45d858d8-20e2-4776-a14b-96e1e3ab7327:resgroup-169"},"templateId":"45d858d8-20e2-4776-a14b-96e1e3ab7327:vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}]}
'
headers:
cache-control:
- no-cache
content-length:
- '1247'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:16 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 3f3dad92-c222-4051-9155-fcecbaf5f1f4
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 403dca08fde4f0e
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm update
Connection:
- keep-alive
ParameterSetName:
- -g -n --set
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"folder":"Datacenter","guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"assignable":true,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85","location":"eastus","name":"Datacenter/Workload01","properties":{"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus"},"type":"Microsoft.VMwareCloudSimple/virtualNetworks"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","provisioningState":"Succeeded","resourcePool":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169","location":"eastus","name":"AzCLITest","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"Datacenter/Cluster/AzCLITest"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},"status":"running","templateId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}
'
headers:
cache-control:
- no-cache
content-length:
- '2358'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:16 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 60ae853d-b9d6-43ef-adac-f8df061b6e79
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 8f8d1ac1820eef1
status:
code: 200
message: OK
- request:
body: '{"tags": {"foo": "boo"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm update
Connection:
- keep-alive
Content-Length:
- '24'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- -g -n --set
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PATCH
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001/providers/microsoft.vmwarecloudsimple/virtualmachines/cli-test1000002","location":"eastus","name":"cli-test1000002","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:93:76","network":{"id":"45d858d8-20e2-4776-a14b-96e1e3ab7327:dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"privateCloudId":"45d858d8-20e2-4776-a14b-96e1e3ab7327","provisioningState":"Succeeded","resourcePool":{"id":"45d858d8-20e2-4776-a14b-96e1e3ab7327:resgroup-169"},"status":"running","templateId":"45d858d8-20e2-4776-a14b-96e1e3ab7327:vm-125","vSphereNetworks":null,"vmId":"vm-1512","vmwaretools":"0"},"tags":{"foo":"boo"},"type":"Microsoft.VMwareCloudSimple/virtualMachines"}
'
headers:
cache-control:
- no-cache
content-length:
- '1307'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:19 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- f4493e78-01ee-45bf-acbb-00ed2920d0af
x-env-name:
- eastus-he.azure.cloudsimple.com
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-tracing-transaction-id:
- 1ff91a68fdc29a2c
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm delete
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- -g -n
Referer:
- https://management.azure.com/
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines/cli-test1000002?api-version=2019-04-01
response:
body:
string: ''
headers:
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/01a269fe-f0a2-11e9-b68d-d6541c658aed?api-version=2019-04-01
cache-control:
- no-cache
content-length:
- '0'
content-type:
- text/plain; charset=utf-8
date:
- Thu, 17 Oct 2019 05:50:21 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/01a269fe-f0a2-11e9-b68d-d6541c658aed?api-version=2019-04-01
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-correlation-id:
- c02cda85-e895-4664-9a28-29f266e48ed3
x-env-name:
- eastus-he.azure.cloudsimple.com
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
x-tracing-transaction-id:
- 7090d0ca01b985a6
status:
code: 202
message: Accepted
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm delete
Connection:
- keep-alive
ParameterSetName:
- -g -n
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/01a269fe-f0a2-11e9-b68d-d6541c658aed?api-version=2019-04-01
response:
body:
string: '{"endTime":"2019-10-17T05:50:25.958Z","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.vmwarecloudsimple/locations/eastus/operationresults/01a269fe-f0a2-11e9-b68d-d6541c658aed","name":"01a269fe-f0a2-11e9-b68d-d6541c658aed","startTime":"2019-10-17T05:50:21.430Z","status":"Succeeded"}
'
headers:
cache-control:
- no-cache
content-length:
- '313'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:31 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 6edd97ea-29d2-4d87-8df1-4c14118e9326
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 597217df9cc890d8
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm list
Connection:
- keep-alive
ParameterSetName:
- -g
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001/providers/Microsoft.VMwareCloudSimple/virtualMachines?api-version=2019-04-01
response:
body:
string: '{"value":[]}
'
headers:
cache-control:
- no-cache
content-length:
- '13'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:50:32 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- b9d6f396-ab3e-45e9-88c5-4f528fd4e556
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 5e0813a1329937be
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group delete
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- --name --yes --no-wait
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: ''
headers:
cache-control:
- no-cache
content-length:
- '0'
date:
- Thu, 17 Oct 2019 05:50:40 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGVk1XQVJFOjVGQ1NGNkU1R0dLTU5ETkNERjVLQjVYWEdVRnw4QkY1OTI4MkRDRTg5M0IxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- '14998'
status:
code: 202
message: Accepted
version: 1

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,217 @@
interactions:
- request:
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
"date": "2019-10-17T05:49:25Z"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group create
Connection:
- keep-alive
Content-Length:
- '110'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --location --name --tag
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001","name":"cli_test_vmware_cs000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2019-10-17T05:49:25Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
content-length:
- '384'
content-type:
- application/json; charset=utf-8
date:
- Thu, 17 Oct 2019 05:49:33 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware resource-pool list
Connection:
- keep-alive
ParameterSetName:
- -p --location
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcePools?api-version=2019-04-01
response:
body:
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-1013","location":"eastus","name":"mhenry","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/mhenry"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-108","location":"eastus","name":"cavillue","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/cavillue"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-1251","location":"eastus","name":"Trevor","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/Trevor"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-1314","location":"eastus","name":"cdubose","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/cdubose"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169","location":"eastus","name":"AzCLITest","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/AzCLITest"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-298","location":"eastus","name":"tony","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/tony"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-340","location":"eastus","name":"JetStream
Software","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/JetStream
Software"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-344","location":"eastus","name":"Ravi-RP","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/Ravi-RP"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-483","location":"eastus","name":"Sellalotofstuff","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/Sellalotofstuff"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-496","location":"eastus","name":"otgerles","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/otgerles"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-52","location":"eastus","name":"Workload","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/Workload"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-624","location":"eastus","name":"scholden","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/scholden"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-65","location":"eastus","name":"DevTest
VM","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/DevTest
VM"},"type":"Microsoft.VMwareCloudSimple/resourcePools"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-66","location":"eastus","name":"jujako","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/jujako"},"type":"Microsoft.VMwareCloudSimple/resourcePools"}]}
'
headers:
cache-control:
- no-cache
content-length:
- '6888'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:49:35 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 563fa8bb-abda-4204-84bc-e9d449cd40f5
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 5d32885e01b2ff26
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware resource-pool show
Connection:
- keep-alive
ParameterSetName:
- -p -n --location
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcePools/resgroup-169?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/resourcepools/resgroup-169","location":"eastus","name":"AzCLITest","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","properties":{"fullName":"avs-test-eastus/Datacenter/Cluster/AzCLITest"},"type":"Microsoft.VMwareCloudSimple/resourcePools"}
'
headers:
cache-control:
- no-cache
content-length:
- '492'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:49:36 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 45e1bb9a-649c-4129-b854-1fbef8e0fb05
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 4c025e9f9937b18f
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group delete
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- --name --yes --no-wait
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: ''
headers:
cache-control:
- no-cache
content-length:
- '0'
date:
- Thu, 17 Oct 2019 05:49:41 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGVk1XQVJFOjVGQ1NZT1dXQUFFTlVUV0VKV0wyQkVBQVQyQnxGQjI1RkQyMkJGMjgxQ0RCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
status:
code: 202
message: Accepted
version: 1

Просмотреть файл

@ -0,0 +1,233 @@
interactions:
- request:
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
"date": "2019-10-17T05:49:25Z"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group create
Connection:
- keep-alive
Content-Length:
- '110'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --location --name --tag
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmware_cs000001","name":"cli_test_vmware_cs000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2019-10-17T05:49:25Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
content-length:
- '384'
content-type:
- application/json; charset=utf-8
date:
- Thu, 17 Oct 2019 05:49:32 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm-template list
Connection:
- keep-alive
ParameterSetName:
- -p -r --location
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualMachineTemplates?api-version=2019-04-01&resourcePoolName=resgroup-169
response:
body:
string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","location":"eastus","name":"UbuntuDesktop","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:9a:60","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"path":"Datacenter","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","vSphereNetworks":null,"vSphereTags":null,"vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachineTemplates"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-1273","location":"eastus","name":"amtyagi-ub-template-01","properties":{"amountOfRam":2048,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"VMWARE_PARAVIRTUAL","type":"SCSI"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Other 3.x Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:39:c7","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-734"},"nicType":"E1000E","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"path":"Datacenter/amtyagi-vms","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","vSphereNetworks":null,"vSphereTags":null,"vmwaretools":"10346"},"type":"Microsoft.VMwareCloudSimple/virtualMachineTemplates"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-86","location":"eastus","name":"CentOS-Template","properties":{"amountOfRam":2048,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"VMWARE_PARAVIRTUAL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"CentOS 7 (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:a2:fa","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"path":"Datacenter","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","vSphereNetworks":null,"vSphereTags":null,"vmwaretools":"10309"},"type":"Microsoft.VMwareCloudSimple/virtualMachineTemplates"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-93","location":"eastus","name":"Windows
Server 2016","properties":{"amountOfRam":4096,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_SAS","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":41943040,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Microsoft Windows Server 2016 (64-bit)","guestOSType":"windows","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:70:bc","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},"nicType":"E1000E","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":2,"path":"Datacenter","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","vSphereNetworks":null,"vSphereTags":null,"vmwaretools":"10338"},"type":"Microsoft.VMwareCloudSimple/virtualMachineTemplates"}]}
'
headers:
cache-control:
- no-cache
content-length:
- '5138'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:49:35 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 0326a9cb-fbe1-47bc-84cf-b0950677a363
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 894ffb78243a511
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmware vm-template show
Connection:
- keep-alive
ParameterSetName:
- -p -n --location
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 azure-mgmt-vmwarecloudsimple/0.1.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualMachineTemplates/vm-125?api-version=2019-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualmachinetemplates/vm-125","location":"eastus","name":"UbuntuDesktop","properties":{"amountOfRam":1024,"controllers":[{"id":"1000","name":"SCSI
controller 0","subType":"LSI_PARALEL","type":"SCSI"},{"id":"15000","name":"SATA
controller 0","subType":"AHCI","type":"SATA"}],"disks":[{"controllerId":"1000","independenceMode":"persistent","totalSize":16777216,"virtualDiskId":"2000","virtualDiskName":"Hard
disk 1"}],"guestOS":"Ubuntu Linux (64-bit)","guestOSType":"linux","nics":[{"ipAddresses":null,"macAddress":"00:50:56:89:9a:60","network":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus/virtualnetworks/dvportgroup-85"},"nicType":"VMXNET3","powerOnBoot":true,"virtualNicId":"4000","virtualNicName":"Network
adapter 1"}],"numberOfCores":1,"path":"Datacenter","privateCloudId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.VMwareCloudSimple/locations/eastus/privateClouds/avs-test-eastus","vSphereNetworks":null,"vSphereTags":null,"vmwaretools":"0"},"type":"Microsoft.VMwareCloudSimple/virtualMachineTemplates"}
'
headers:
cache-control:
- no-cache
content-length:
- '1283'
content-type:
- application/json
date:
- Thu, 17 Oct 2019 05:49:36 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- nginx/1.13.12
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding,Accept-Encoding
x-content-type-options:
- nosniff
x-correlation-id:
- 0886d663-0ce4-4c0a-bb21-5fb94045e31b
x-env-name:
- eastus-he.azure.cloudsimple.com
x-tracing-transaction-id:
- 76ec6a198f47ce55
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group delete
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- --name --yes --no-wait
User-Agent:
- python/3.6.8 (Windows-10-10.0.18362-SP0) msrest/0.6.8 msrest_azure/0.6.1 resourcemanagementclient/2.2.0
Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmware_cs000001?api-version=2018-05-01
response:
body:
string: ''
headers:
cache-control:
- no-cache
content-length:
- '0'
date:
- Thu, 17 Oct 2019 05:49:45 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGVk1XQVJFOjVGQ1M3WUk1RVVLMkFIRktNWlpPT1FGS1ZFS3w2MzU3Q0EzNTAxMEJFRUIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- '14999'
status:
code: 202
message: Accepted
version: 1

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -6,35 +6,605 @@
import os
import unittest
from knack.util import CLIError
from azure_devtools.scenario_tests import AllowLargeResponse
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer)
from msrestazure.azure_exceptions import CloudError
import logging
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
class Vmware_csScenarioTest(ScenarioTest):
class VmwareCsScenarioTest(ScenarioTest):
"""
Test for AVS by CloudSimple CLI commands.
This tests various command exposed by CloudSimple CLI.
To run the tests, run 'azdev test vmware-cs --discover --live'
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs')
def test_vmware_cs(self, resource_group):
The prerequisites for the tests are that you should be logged in to a subscription in the CLI.
That subscription should contain:
az_cli_cs_test resource group,
avs-test-eastus private cloud,
vm-125 vm template in vSphere,
resgroup-169 resource pool in vSphere,
dvportgroup-85 virtual network.
You can modify the above specified params in this test file.
"""
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_cs_vm_create_param_validation(self, resource_group):
"""
Tests the create API for vmware vm.
"""
self.kwargs.update({
'name': 'test1'
'name': self.create_random_name(prefix='cli-test', length=24),
'loc': 'eastus',
'pc': 'avs-test-eastus',
'vm_template': 'vm-125',
'rp': 'resgroup-169',
'ram': 1024,
'cores': 1
})
self.cmd('vmware_cs create -g {rg} -n {name} --tags foo=doo', checks=[
self.check('tags.foo', 'doo'),
self.check('name', '{name}')
])
self.cmd('vmware_cs update -g {rg} -n {name} --tags foo=boo', checks=[
# Checking that invalid vm_name causes error
with self.assertRaisesRegexp(CLIError, "Virtual machine name should only contain letters, numbers, or hyphen."):
self.cmd('az vmware vm create -g {rg} -n invalid_name# --location {loc} --ram {ram} \
--cores {cores} --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Checking that if entered value for ram is float, it causes error
with self.assertRaisesRegexp(CLIError, "RAM should be a postive integer value."):
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram 1024.5 \
--cores {cores} --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Checking that if entered value for ram is 0, it causes error
with self.assertRaisesRegexp(CLIError, "RAM should be a postive integer value."):
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram 0 \
--cores {cores} --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Checking that if entered value for ram is negative, it causes error
with self.assertRaisesRegexp(CLIError, "RAM should be a postive integer value."):
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram -1024 \
--cores {cores} --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Checking that if entered value for cores is float, it causes error
with self.assertRaisesRegexp(CLIError, "Cores should be a postive integer value."):
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram {ram} \
--cores 1.5 --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Checking that if entered value for cores is 0, it causes error
with self.assertRaisesRegexp(CLIError, "Cores should be a postive integer value."):
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram {ram} \
--cores 0 --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Checking that if entered value for cores is negative, it causes error
with self.assertRaisesRegexp(CLIError, "Cores should be a postive integer value."):
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram {ram} \
--cores -1 --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_cs_vm_crud(self, resource_group):
"""
Tests the CRUD APIs for vmware vm.
"""
self.kwargs.update({
'name': self.create_random_name(prefix='cli-test1', length=24),
'loc': 'eastus',
'pc': 'avs-test-eastus',
'vm_template': 'vm-125',
'rp': 'resgroup-169',
'ram': 1024,
'cores': 1
})
# Checking that the number of VM in our rg (used for testing) is 0.
count = len(self.cmd('az vmware vm list -g {rg}').get_output_in_json())
self.assertEqual(count, 0)
# Creating a VM. Checking json to see if the operation succeeded.
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram {ram} \
--cores {cores} --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name}'),
self.check('amountOfRam', '{ram}'),
self.check('location', '{loc}')
])
# Checking that the number of VM in our rg (used for testing) is 1 now.
count = len(self.cmd('az vmware vm list -g {rg}').get_output_in_json())
self.assertEqual(count, 1)
# Testing show command
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name}'),
self.check('amountOfRam', '{ram}'),
self.check('location', '{loc}')
])
# Show as table
self.cmd('az vmware vm show -g {rg} -n {name} -o table')
# List as table
self.cmd('az vmware vm list -g {rg} -o table')
# Testing update command
self.cmd('az vmware vm update -g {rg} -n {name} --set tags.foo=boo', checks=[
self.check('tags.foo', 'boo')
])
count = len(self.cmd('vmware_cs list').get_output_in_json())
self.cmd('vmware_cs show - {rg} -n {name}', checks=[
self.check('name', '{name}'),
self.check('resourceGroup', '{rg}'),
self.check('tags.foo', 'boo')
])
self.cmd('vmware_cs delete -g {rg} -n {name}')
final_count = len(self.cmd('vmware_cs list').get_output_in_json())
self.assertTrue(final_count, count - 1)
# Deleting a VM.
self.cmd('az vmware vm delete -g {rg} -n {name}')
# Checking that the number of VM in our rg is 0 now.
count = len(self.cmd('az vmware vm list -g {rg}').get_output_in_json())
self.assertEqual(count, 0)
def test_vmware_cs_vm_create(self):
"""
Tests the create API for vmware vm.
"""
self.kwargs.update({
'name1': self.create_random_name(prefix='cli-test', length=24),
'name2': self.create_random_name(prefix='cli-test', length=24),
'name3': self.create_random_name(prefix='cli-test', length=24),
'name4': self.create_random_name(prefix='cli-test', length=24),
'name5': self.create_random_name(prefix='cli-test', length=24),
'name6': self.create_random_name(prefix='cli-test', length=24),
'rg': 'az_cli_cs_test',
'pc': 'avs-test-eastus',
'vm_template': 'vm-125',
'rp': 'resgroup-169',
'vnet': 'dvportgroup-85'
})
# Creating a VM with default parameters from the vm template
self.cmd('az vmware vm create -g {rg} -n {name1} -p {pc} --template {vm_template} -r {rp}',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name1}'),
self.check('amountOfRam', 1024),
self.check('disks | [0].virtualDiskName', 'Hard disk 1'),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('guestOsType', 'linux'),
self.check('location', 'eastus'),
self.check('nics | [0].virtualNicName', 'Network adapter 1'),
self.check('numberOfCores', 1)
])
# Creating a VM with default parameters from the vm template and adding a nic
self.cmd('az vmware vm create -g {rg} -n {name2} \
-p {pc} --template {vm_template} -r {rp} \
--nic name=NicNameWouldBeReassigned virtual-network={vnet} \
adapter=VMXNET3 power-on-boot=True',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name2}'),
self.check('amountOfRam', 1024),
self.check('disks | [0].virtualDiskName', 'Hard disk 1'),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('guestOsType', 'linux'),
self.check('location', 'eastus'),
self.check('nics | [0].virtualNicName', 'Network adapter 1'),
self.check('nics | [1].virtualNicName', 'Network adapter 2'),
self.check('nics | [1].powerOnBoot', True),
self.check('nics | [1].nicType', 'VMXNET3'),
self.check('nics | [1].network.name', 'Datacenter/Workload01'),
self.check('numberOfCores', 1)
])
# Customizing specific properties of a VM. Changing the number of cores to 2 and adapter of
# "Network adapter 1" nic to E1000E, from that specified in the template.
self.cmd('az vmware vm create -n {name3} -g {rg} -p {pc} -r {rp} --template {vm_template} \
--cores 2 --nic name="Network adapter 1" adapter=E1000E',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name3}'),
self.check('amountOfRam', 1024),
self.check('disks | [0].virtualDiskName', 'Hard disk 1'),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('guestOsType', 'linux'),
self.check('location', 'eastus'),
self.check('nics | [0].virtualNicName', 'Network adapter 1'),
self.check('nics | [0].nicType', 'E1000E'),
self.check('numberOfCores', 2)
])
# Customizing specific properties of a VM. Changing the adapter of
# "Network adapter 1" nic to E1000E, from that specified in the
# template, and also adding another nic with virtual network
# MyVirtualNetwork, adapter VMXNET3, that power ups on boot.
self.cmd('az vmware vm create -g {rg} -n {name4} \
-p {pc} --template {vm_template} -r {rp} \
--nic name="Network adapter 1" adapter=E1000E --nic \
name=NicNameWouldBeReassigned virtual-network={vnet} \
adapter=VMXNET3 power-on-boot=True',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name4}'),
self.check('amountOfRam', 1024),
self.check('disks | [0].virtualDiskName', 'Hard disk 1'),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('guestOsType', 'linux'),
self.check('location', 'eastus'),
self.check('nics | [0].virtualNicName', 'Network adapter 1'),
self.check('nics | [0].nicType', 'E1000E'),
self.check('nics | [1].virtualNicName', 'Network adapter 2'),
self.check('nics | [1].powerOnBoot', True),
self.check('nics | [1].nicType', 'VMXNET3'),
self.check('nics | [1].network.name', 'Datacenter/Workload01'),
self.check('numberOfCores', 1)
])
# Creating a virtual machine and adding an extra disk
# to the VM with SCSI controller 0, persistent
# mode, and 41943040 KB size.
self.cmd('az vmware vm create -n {name5} -g {rg} -p {pc} -r {rp} --template {vm_template} \
--disk name=DiskNameWouldBeReassigned controller=1000 \
mode=persistent size=41943040',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name5}'),
self.check('amountOfRam', 1024),
self.check('disks | [0].virtualDiskName', 'Hard disk 1'),
self.check('disks | [1].controllerId', '1000'),
self.check('disks | [1].independenceMode', 'persistent'),
self.check('disks | [1].totalSize', 41943040),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('guestOsType', 'linux'),
self.check('location', 'eastus'),
self.check('nics | [0].virtualNicName', 'Network adapter 1'),
self.check('numberOfCores', 1)
])
# Customizing specific properties of a VM. Changing the
# size of "Hard disk 1" disk to 21943040 KB,
# from that specified in the template, and also adding
# another disk with SCSI controller 0,
# persistent mode, and 41943040 KB size.
self.cmd('az vmware vm create -g {rg} -n {name6} \
-p {pc} --template {vm_template} -r {rp} \
--disk name="Hard disk 1" size=21943040 --disk \
name=DiskNameWouldBeReassigned controller=1000 \
mode=persistent size=41943040',
checks=[
self.check('provisioningState', 'Succeeded'),
self.check('resourceGroup', '{rg}'),
self.check('name', '{name6}'),
self.check('amountOfRam', 1024),
self.check('disks | [0].virtualDiskName', 'Hard disk 1'),
self.check('disks | [0].totalSize', 21943040),
self.check('disks | [1].controllerId', '1000'),
self.check('disks | [1].independenceMode', 'persistent'),
self.check('disks | [1].totalSize', 41943040),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('guestOsType', 'linux'),
self.check('location', 'eastus'),
self.check('nics | [0].virtualNicName', 'Network adapter 1'),
self.check('numberOfCores', 1)
])
# Deleting the VMs.
self.cmd('az vmware vm delete -g {rg} -n {name1}')
self.cmd('az vmware vm delete -g {rg} -n {name2}')
self.cmd('az vmware vm delete -g {rg} -n {name3}')
self.cmd('az vmware vm delete -g {rg} -n {name4}')
self.cmd('az vmware vm delete -g {rg} -n {name5}')
self.cmd('az vmware vm delete -g {rg} -n {name6}')
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_cs_vm_start_stop(self, resource_group):
"""
Tests the start/stop APIs for vmware vm.
"""
self.kwargs.update({
'name': self.create_random_name(prefix='cli-test', length=24),
'loc': 'eastus',
'pc': 'avs-test-eastus',
'vm_template': 'vm-125',
'rp': 'resgroup-169',
'ram': 1024,
'cores': 1
})
# Creating a VM.
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} --ram {ram} \
--cores {cores} --private-cloud {pc} --template {vm_template} \
--resource-pool {rp}')
# Testing that VM is in running state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'running')])
# Power off the VM
self.cmd('az vmware vm stop -g {rg} -n {name} --mode poweroff')
# Testing that VM is in powered off state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'poweredoff')])
# Start the VM
self.cmd('az vmware vm start -g {rg} -n {name}')
# Testing that VM is in running state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'running')])
# Shut down the VM
self.cmd('az vmware vm stop -g {rg} -n {name} --mode shutdown')
# Testing that VM is in powered off state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'poweredoff')])
# Start the VM
self.cmd('az vmware vm start -g {rg} -n {name}')
# Testing that VM is in running state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'running')])
# Reboot the VM
self.cmd('az vmware vm stop -g {rg} -n {name} --mode reboot')
# Testing that VM is in running state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'running')])
# Suspend the VM
self.cmd('az vmware vm stop -g {rg} -n {name} --mode suspend')
# Testing that VM is in suspended state
self.cmd('az vmware vm show -g {rg} -n {name}',
checks=[self.check('status', 'suspended')])
# Deleting the VM.
self.cmd('az vmware vm delete -g {rg} -n {name}')
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_vm_template_list_and_show(self, resource_group):
"""
Tests the list and show vm templates command.
"""
self.kwargs.update({
'rp': 'resgroup-169',
'pc': 'avs-test-eastus',
'vmtemplate': 'vm-125',
'loc': 'eastus'
})
self.cmd('az vmware vm-template list -p {pc} -r {rp} --location {loc}')
self.cmd('az vmware vm-template show -p {pc} -n {vmtemplate} --location {loc}',
checks=[
self.check('guestOsType', 'linux'),
self.check('guestOs', 'Ubuntu Linux (64-bit)'),
self.check('type', 'Microsoft.VMwareCloudSimple/virtualMachineTemplates')
])
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_vnet_list_and_show(self, resource_group):
"""
Tests the list and show virtual networks command.
"""
self.kwargs.update({
'rp': 'resgroup-169',
'pc': 'avs-test-eastus',
'vnet': 'dvportgroup-85',
'loc': 'eastus'
})
self.cmd('az vmware virtual-network list -p {pc} -r {rp} --location {loc}')
self.cmd('az vmware virtual-network show -p {pc} -n {vnet} --location {loc}',
checks=[
self.check('name', 'Datacenter/Workload01'),
self.check('type', 'Microsoft.VMwareCloudSimple/virtualNetworks')
])
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_resource_pool_list_and_show(self, resource_group):
"""
Tests the list and show resource pools command.
"""
self.kwargs.update({
'rp': 'resgroup-169',
'pc': 'avs-test-eastus',
'loc': 'eastus'
})
self.cmd('az vmware resource-pool list -p {pc} --location {loc}')
self.cmd('az vmware resource-pool show -p {pc} -n {rp} --location {loc}',
checks=[
self.check('location', 'eastus'),
self.check('name', 'AzCLITest'),
self.check('type', 'Microsoft.VMwareCloudSimple/resourcePools')
])
@ResourceGroupPreparer(name_prefix='cli_test_vmware_cs', parameter_name_for_location='eastus')
def test_vmware_private_cloud_list_and_show(self, resource_group):
"""
Tests the list and show private clouds command.
"""
self.kwargs.update({
'pc': 'avs-test-eastus',
'loc': 'eastus'
})
self.cmd('az vmware private-cloud list --location {loc}')
self.cmd('az vmware private-cloud show -n {pc} --location {loc}',
checks=[
self.check('location', 'eastus'),
self.check('name', '{pc}')
])
def test_vmware_cs_vm_disk_apis(self):
self.kwargs.update({
'name': self.create_random_name(prefix='cli-test', length=24),
'loc': 'eastus',
'pc': 'avs-test-eastus',
'vm_template': 'vm-125',
'rp': 'resgroup-169',
'rg': 'az_cli_cs_test'
})
# Creating a VM.
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} \
--private-cloud {pc} --template {vm_template} --resource-pool {rp}')
# Add a disk with the default values
self.cmd('az vmware vm disk add -g {rg} --vm-name {name}',
checks=[
self.check('disks | [1].controllerId', '1000'),
self.check('disks | [1].independenceMode', "persistent"),
self.check('disks | [1].totalSize', 16777216),
])
# Add a custom disk
self.cmd('az vmware vm disk add -g {rg} --vm-name {name} \
--mode independent_nonpersistent --size 8388608',
checks=[
self.check('disks | [2].controllerId', '1000'),
self.check('disks | [2].independenceMode', "independent_nonpersistent"),
self.check('disks | [2].totalSize', 8388608)
])
# Show a disk
self.cmd('az vmware vm disk show -g {rg} --vm-name {name} -n "Hard disk 1"',
checks=[
self.check('controllerId', '1000'),
self.check('independenceMode', "persistent"),
self.check('totalSize', 16777216),
self.check('virtualDiskName', "Hard disk 1")
])
# Checking that the number of disk in the VM is 3 now.
count = len(self.cmd('az vmware vm disk list -g {rg} \
--vm-name {name}').get_output_in_json())
self.assertEqual(count, 3)
# Delete disks. Among the given disks, two disk are present in VM and one disk is absent.
# The present disk should be deleted, and an error for the absent disk should be displayed.
with self.assertRaisesRegexp(CLIError, "Hard disk 4 not present in the given virtual machine."):
self.cmd('az vmware vm disk delete -g {rg} --vm-name {name} \
--disks "Hard disk 1" "Hard disk 2" "Hard disk 4"')
# Polling till update operation is complete
vm_status = self.cmd('az vmware vm show -g {rg} -n \
{name}').get_output_in_json()["status"]
while vm_status == "updating":
vm_status = self.cmd('az vmware vm show -g {rg} -n \
{name}').get_output_in_json()["status"]
self.cmd('az vmware vm disk add -g {rg} --vm-name {name} \
--mode independent_nonpersistent --size 8388608',
checks=[
self.check('disks | [1].controllerId', '1000'),
self.check('disks | [1].independenceMode', "independent_nonpersistent"),
self.check('disks | [1].totalSize', 8388608)
])
# Checking that the number of disk in the VM is 2 now.
count = len(self.cmd('az vmware vm disk list -g {rg} \
--vm-name {name}').get_output_in_json())
self.assertEqual(count, 2)
# Deleting the VM.
self.cmd('az vmware vm delete -g {rg} -n {name}')
def test_vmware_cs_vm_nic_apis(self):
self.kwargs.update({
'name': self.create_random_name(prefix='cli-test', length=24),
'loc': 'eastus',
'pc': 'avs-test-eastus',
'vm_template': 'vm-125',
'rp': 'resgroup-169',
'vnet': 'dvportgroup-85',
'rg': 'az_cli_cs_test'
})
# Creating a VM.
self.cmd('az vmware vm create -g {rg} -n {name} --location {loc} \
--private-cloud {pc} --template {vm_template} --resource-pool {rp}')
# Add a nic with the default values
self.cmd('az vmware vm nic add -g {rg} --vm-name {name} --virtual-network {vnet}',
checks=[
self.check('nics | [1].nicType', 'VMXNET3'),
self.check('nics | [1].powerOnBoot', None),
self.check('nics | [1].network.name', 'Datacenter/Workload01')
])
# Add a custom nic
self.cmd('az vmware vm nic add -g {rg} --vm-name {name} \
--virtual-network {vnet} --adapter E1000 --power-on-boot false',
checks=[
self.check('nics | [2].nicType', 'E1000'),
self.check('nics | [2].powerOnBoot', None),
self.check('nics | [1].network.name', 'Datacenter/Workload01')
])
# Show a nic
self.cmd('az vmware vm nic show -g {rg} --vm-name {name} -n "Network adapter 1"',
checks=[
self.check('nicType', 'VMXNET3'),
self.check('powerOnBoot', True),
self.check('network.name', 'Datacenter/Workload01'),
self.check('virtualNicName', "Network adapter 1")
])
# Checking that the number of nics in the VM is 3 now.
count = len(self.cmd('az vmware vm nic list -g {rg} --vm-name {name}').get_output_in_json())
self.assertEqual(count, 3)
# Delete nics. Among the given nics, two nics are present in VM and one nic is absent.
# The present nics should be deleted, and an error for the absent nic should be displayed.
with self.assertRaisesRegexp(CLIError, 'Network adapter 4 not present in the given virtual machine.'):
self.cmd('az vmware vm nic delete -g {rg} --vm-name {name} \
--nics "Network adapter 1" "Network adapter 2" "Network adapter 4"')
# Polling till update operation is complete
vm_status = self.cmd('az vmware vm show -g {rg} -n \
{name}').get_output_in_json()["status"]
while vm_status == "updating":
vm_status = self.cmd('az vmware vm show -g {rg} -n \
{name}').get_output_in_json()["status"]
# Add a nic with the default values
self.cmd('az vmware vm nic add -g {rg} --vm-name {name} --virtual-network {vnet}',
checks=[
self.check('nics | [1].nicType', 'VMXNET3'),
self.check('nics | [1].powerOnBoot', None),
self.check('nics | [1].network.name', 'Datacenter/Workload01')
])
# Checking that the number of nics in the VM is 2 now.
count = len(self.cmd('az vmware vm nic list -g {rg} --vm-name {name}').get_output_in_json())
self.assertEqual(count, 2)
# Deleting the VM.
self.cmd('az vmware vm delete -g {rg} -n {name}')

Просмотреть файл

@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------
from .vmware_cloud_simple_client import VMwareCloudSimpleClient
from .version import VERSION
from ._configuration import VMwareCloudSimpleClientConfiguration
from ._vmware_cloud_simple_client import VMwareCloudSimpleClient
__all__ = ['VMwareCloudSimpleClient', 'VMwareCloudSimpleClientConfiguration']
__all__ = ['VMwareCloudSimpleClient']
from .version import VERSION
__version__ = VERSION

Просмотреть файл

@ -0,0 +1,53 @@
# 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 msrestazure import AzureConfiguration
from .version import VERSION
class VMwareCloudSimpleClientConfiguration(AzureConfiguration):
"""Configuration for VMwareCloudSimpleClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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, subscription_id, referer, base_url=None):
if credentials is None:
raise ValueError("Parameter 'credentials' 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'
super(VMwareCloudSimpleClientConfiguration, self).__init__(base_url)
# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True
self.add_user_agent('azure-mgmt-vmwarecloudsimple/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')
self.credentials = credentials
self.subscription_id = subscription_id
self.referer = referer

Просмотреть файл

@ -0,0 +1,96 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from ._configuration import VMwareCloudSimpleClientConfiguration
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(SDKClient):
"""Description of the new service
:ivar config: Configuration for client.
:vartype config: VMwareCloudSimpleClientConfiguration
: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<msrestazure.azure_active_directory>`
: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, subscription_id, referer, base_url=None):
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)}
self.api_version = '2019-04-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.dedicated_cloud_nodes = DedicatedCloudNodesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.dedicated_cloud_services = DedicatedCloudServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.skus_availability = SkusAvailabilityOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_clouds = PrivateCloudsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resource_pools = ResourcePoolsOperations(
self._client, self.config, self._serialize, self._deserialize)
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.usages = UsagesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_machines = VirtualMachinesOperations(
self._client, self.config, self._serialize, self._deserialize)

Просмотреть файл

@ -10,66 +10,66 @@
# --------------------------------------------------------------------------
try:
from .available_operation_display_py3 import AvailableOperationDisplay
from .available_operation_display_property_service_specification_metrics_item_py3 import AvailableOperationDisplayPropertyServiceSpecificationMetricsItem
from .available_operation_display_property_service_specification_metrics_list_py3 import AvailableOperationDisplayPropertyServiceSpecificationMetricsList
from .available_operation_py3 import AvailableOperation
from .csrp_error_body_py3 import CSRPErrorBody
from .csrp_error_py3 import CSRPError, CSRPErrorException
from .sku_py3 import Sku
from .dedicated_cloud_node_py3 import DedicatedCloudNode
from .dedicated_cloud_service_py3 import DedicatedCloudService
from .operation_error_py3 import OperationError
from .operation_resource_py3 import OperationResource
from .patch_payload_py3 import PatchPayload
from .resource_pool_py3 import ResourcePool
from .virtual_disk_controller_py3 import VirtualDiskController
from .virtual_disk_py3 import VirtualDisk
from .virtual_network_py3 import VirtualNetwork
from .virtual_nic_py3 import VirtualNic
from .virtual_machine_template_py3 import VirtualMachineTemplate
from .private_cloud_py3 import PrivateCloud
from .sku_availability_py3 import SkuAvailability
from .usage_name_py3 import UsageName
from .usage_py3 import Usage
from .virtual_machine_py3 import VirtualMachine
from .virtual_machine_stop_mode_py3 import VirtualMachineStopMode
from ._models_py3 import AvailableOperation
from ._models_py3 import AvailableOperationDisplay
from ._models_py3 import AvailableOperationDisplayPropertyServiceSpecificationMetricsItem
from ._models_py3 import AvailableOperationDisplayPropertyServiceSpecificationMetricsList
from ._models_py3 import CSRPError, CSRPErrorException
from ._models_py3 import CSRPErrorBody
from ._models_py3 import DedicatedCloudNode
from ._models_py3 import DedicatedCloudService
from ._models_py3 import OperationError
from ._models_py3 import OperationResource
from ._models_py3 import PatchPayload
from ._models_py3 import PrivateCloud
from ._models_py3 import ResourcePool
from ._models_py3 import Sku
from ._models_py3 import SkuAvailability
from ._models_py3 import Usage
from ._models_py3 import UsageName
from ._models_py3 import VirtualDisk
from ._models_py3 import VirtualDiskController
from ._models_py3 import VirtualMachine
from ._models_py3 import VirtualMachineStopMode
from ._models_py3 import VirtualMachineTemplate
from ._models_py3 import VirtualNetwork
from ._models_py3 import VirtualNic
except (SyntaxError, ImportError):
from .available_operation_display import AvailableOperationDisplay
from .available_operation_display_property_service_specification_metrics_item import AvailableOperationDisplayPropertyServiceSpecificationMetricsItem
from .available_operation_display_property_service_specification_metrics_list import AvailableOperationDisplayPropertyServiceSpecificationMetricsList
from .available_operation import AvailableOperation
from .csrp_error_body import CSRPErrorBody
from .csrp_error import CSRPError, CSRPErrorException
from .sku import Sku
from .dedicated_cloud_node import DedicatedCloudNode
from .dedicated_cloud_service import DedicatedCloudService
from .operation_error import OperationError
from .operation_resource import OperationResource
from .patch_payload import PatchPayload
from .resource_pool import ResourcePool
from .virtual_disk_controller import VirtualDiskController
from .virtual_disk import VirtualDisk
from .virtual_network import VirtualNetwork
from .virtual_nic import VirtualNic
from .virtual_machine_template import VirtualMachineTemplate
from .private_cloud import PrivateCloud
from .sku_availability import SkuAvailability
from .usage_name import UsageName
from .usage import Usage
from .virtual_machine import VirtualMachine
from .virtual_machine_stop_mode import VirtualMachineStopMode
from .available_operation_paged import AvailableOperationPaged
from .dedicated_cloud_node_paged import DedicatedCloudNodePaged
from .dedicated_cloud_service_paged import DedicatedCloudServicePaged
from .sku_availability_paged import SkuAvailabilityPaged
from .private_cloud_paged import PrivateCloudPaged
from .resource_pool_paged import ResourcePoolPaged
from .virtual_machine_template_paged import VirtualMachineTemplatePaged
from .virtual_network_paged import VirtualNetworkPaged
from .usage_paged import UsagePaged
from .virtual_machine_paged import VirtualMachinePaged
from .vmware_cloud_simple_client_enums import (
from ._models import AvailableOperation
from ._models import AvailableOperationDisplay
from ._models import AvailableOperationDisplayPropertyServiceSpecificationMetricsItem
from ._models import AvailableOperationDisplayPropertyServiceSpecificationMetricsList
from ._models import CSRPError, CSRPErrorException
from ._models import CSRPErrorBody
from ._models import DedicatedCloudNode
from ._models import DedicatedCloudService
from ._models import OperationError
from ._models import OperationResource
from ._models import PatchPayload
from ._models import PrivateCloud
from ._models import ResourcePool
from ._models import Sku
from ._models import SkuAvailability
from ._models import Usage
from ._models import UsageName
from ._models import VirtualDisk
from ._models import VirtualDiskController
from ._models import VirtualMachine
from ._models import VirtualMachineStopMode
from ._models import VirtualMachineTemplate
from ._models import VirtualNetwork
from ._models import VirtualNic
from ._paged_models import AvailableOperationPaged
from ._paged_models import DedicatedCloudNodePaged
from ._paged_models import DedicatedCloudServicePaged
from ._paged_models import PrivateCloudPaged
from ._paged_models import ResourcePoolPaged
from ._paged_models import SkuAvailabilityPaged
from ._paged_models import UsagePaged
from ._paged_models import VirtualMachinePaged
from ._paged_models import VirtualMachineTemplatePaged
from ._paged_models import VirtualNetworkPaged
from ._vmware_cloud_simple_client_enums import (
OperationOrigin,
AggregationType,
NodeStatus,
@ -84,30 +84,30 @@ from .vmware_cloud_simple_client_enums import (
)
__all__ = [
'AvailableOperation',
'AvailableOperationDisplay',
'AvailableOperationDisplayPropertyServiceSpecificationMetricsItem',
'AvailableOperationDisplayPropertyServiceSpecificationMetricsList',
'AvailableOperation',
'CSRPErrorBody',
'CSRPError', 'CSRPErrorException',
'Sku',
'CSRPErrorBody',
'DedicatedCloudNode',
'DedicatedCloudService',
'OperationError',
'OperationResource',
'PatchPayload',
'ResourcePool',
'VirtualDiskController',
'VirtualDisk',
'VirtualNetwork',
'VirtualNic',
'VirtualMachineTemplate',
'PrivateCloud',
'ResourcePool',
'Sku',
'SkuAvailability',
'UsageName',
'Usage',
'UsageName',
'VirtualDisk',
'VirtualDiskController',
'VirtualMachine',
'VirtualMachineStopMode',
'VirtualMachineTemplate',
'VirtualNetwork',
'VirtualNic',
'AvailableOperationPaged',
'DedicatedCloudNodePaged',
'DedicatedCloudServicePaged',

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,144 @@
# 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.paging import Paged
class AvailableOperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`AvailableOperation <azure.mgmt.vmwarecloudsimple.models.AvailableOperation>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[AvailableOperation]'}
}
def __init__(self, *args, **kwargs):
super(AvailableOperationPaged, self).__init__(*args, **kwargs)
class DedicatedCloudNodePaged(Paged):
"""
A paging container for iterating over a list of :class:`DedicatedCloudNode <azure.mgmt.vmwarecloudsimple.models.DedicatedCloudNode>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[DedicatedCloudNode]'}
}
def __init__(self, *args, **kwargs):
super(DedicatedCloudNodePaged, self).__init__(*args, **kwargs)
class DedicatedCloudServicePaged(Paged):
"""
A paging container for iterating over a list of :class:`DedicatedCloudService <azure.mgmt.vmwarecloudsimple.models.DedicatedCloudService>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[DedicatedCloudService]'}
}
def __init__(self, *args, **kwargs):
super(DedicatedCloudServicePaged, self).__init__(*args, **kwargs)
class SkuAvailabilityPaged(Paged):
"""
A paging container for iterating over a list of :class:`SkuAvailability <azure.mgmt.vmwarecloudsimple.models.SkuAvailability>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[SkuAvailability]'}
}
def __init__(self, *args, **kwargs):
super(SkuAvailabilityPaged, self).__init__(*args, **kwargs)
class PrivateCloudPaged(Paged):
"""
A paging container for iterating over a list of :class:`PrivateCloud <azure.mgmt.vmwarecloudsimple.models.PrivateCloud>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[PrivateCloud]'}
}
def __init__(self, *args, **kwargs):
super(PrivateCloudPaged, self).__init__(*args, **kwargs)
class ResourcePoolPaged(Paged):
"""
A paging container for iterating over a list of :class:`ResourcePool <azure.mgmt.vmwarecloudsimple.models.ResourcePool>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ResourcePool]'}
}
def __init__(self, *args, **kwargs):
super(ResourcePoolPaged, self).__init__(*args, **kwargs)
class VirtualMachineTemplatePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualMachineTemplate <azure.mgmt.vmwarecloudsimple.models.VirtualMachineTemplate>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualMachineTemplate]'}
}
def __init__(self, *args, **kwargs):
super(VirtualMachineTemplatePaged, self).__init__(*args, **kwargs)
class VirtualNetworkPaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualNetwork <azure.mgmt.vmwarecloudsimple.models.VirtualNetwork>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualNetwork]'}
}
def __init__(self, *args, **kwargs):
super(VirtualNetworkPaged, self).__init__(*args, **kwargs)
class UsagePaged(Paged):
"""
A paging container for iterating over a list of :class:`Usage <azure.mgmt.vmwarecloudsimple.models.Usage>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Usage]'}
}
def __init__(self, *args, **kwargs):
super(UsagePaged, self).__init__(*args, **kwargs)
class VirtualMachinePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualMachine <azure.mgmt.vmwarecloudsimple.models.VirtualMachine>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualMachine]'}
}
def __init__(self, *args, **kwargs):
super(VirtualMachinePaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,49 +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.serialization import Model
class AvailableOperation(Model):
"""Resource provider available operation model.
:param display: The list of operations
:type display:
~azure.mgmt.vmwarecloudsimple.models.AvailableOperationDisplay
:param is_data_action: Indicating whether the operation is a data action
or not. Default value: False .
:type is_data_action: bool
:param name:
{resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
:type name: str
:param origin: The origin of operation. Possible values include: 'user',
'system', 'user,system'
:type origin: str or ~azure.mgmt.vmwarecloudsimple.models.OperationOrigin
:param service_specification: The list of specification's service metrics
:type service_specification:
~azure.mgmt.vmwarecloudsimple.models.AvailableOperationDisplayPropertyServiceSpecificationMetricsList
"""
_attribute_map = {
'display': {'key': 'display', 'type': 'AvailableOperationDisplay'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'origin': {'key': 'origin', 'type': 'OperationOrigin'},
'service_specification': {'key': 'properties.serviceSpecification', 'type': 'AvailableOperationDisplayPropertyServiceSpecificationMetricsList'},
}
def __init__(self, **kwargs):
super(AvailableOperation, self).__init__(**kwargs)
self.display = kwargs.get('display', None)
self.is_data_action = kwargs.get('is_data_action', False)
self.name = kwargs.get('name', None)
self.origin = kwargs.get('origin', None)
self.service_specification = kwargs.get('service_specification', None)

Просмотреть файл

@ -1,40 +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.serialization import Model
class AvailableOperationDisplay(Model):
"""Resource provider available operation display model.
:param description: Description of the operation for display purposes
:type description: str
:param operation: Name of the operation for display purposes
:type operation: str
:param provider: Name of the provider for display purposes
:type provider: str
:param resource: Name of the resource type for display purposes
:type resource: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
}
def __init__(self, **kwargs):
super(AvailableOperationDisplay, self).__init__(**kwargs)
self.description = kwargs.get('description', None)
self.operation = kwargs.get('operation', None)
self.provider = kwargs.get('provider', None)
self.resource = kwargs.get('resource', None)

Просмотреть файл

@ -1,56 +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.serialization import Model
class AvailableOperationDisplayPropertyServiceSpecificationMetricsItem(Model):
"""Available operation display property service specification metrics item.
All required parameters must be populated in order to send to Azure.
:param aggregation_type: Required. Metric's aggregation type for e.g.
(Average, Total). Possible values include: 'Average', 'Total'
:type aggregation_type: str or
~azure.mgmt.vmwarecloudsimple.models.AggregationType
:param display_description: Required. Metric's description
:type display_description: str
:param display_name: Required. Human readable metric's name
:type display_name: str
:param name: Required. Metric's name/id
:type name: str
:param unit: Required. Metric's unit
:type unit: str
"""
_validation = {
'aggregation_type': {'required': True},
'display_description': {'required': True},
'display_name': {'required': True},
'name': {'required': True},
'unit': {'required': True},
}
_attribute_map = {
'aggregation_type': {'key': 'aggregationType', 'type': 'AggregationType'},
'display_description': {'key': 'displayDescription', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'unit': {'key': 'unit', 'type': 'str'},
}
def __init__(self, **kwargs):
super(AvailableOperationDisplayPropertyServiceSpecificationMetricsItem, self).__init__(**kwargs)
self.aggregation_type = kwargs.get('aggregation_type', None)
self.display_description = kwargs.get('display_description', None)
self.display_name = kwargs.get('display_name', None)
self.name = kwargs.get('name', None)
self.unit = kwargs.get('unit', None)

Просмотреть файл

@ -1,56 +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.serialization import Model
class AvailableOperationDisplayPropertyServiceSpecificationMetricsItem(Model):
"""Available operation display property service specification metrics item.
All required parameters must be populated in order to send to Azure.
:param aggregation_type: Required. Metric's aggregation type for e.g.
(Average, Total). Possible values include: 'Average', 'Total'
:type aggregation_type: str or
~azure.mgmt.vmwarecloudsimple.models.AggregationType
:param display_description: Required. Metric's description
:type display_description: str
:param display_name: Required. Human readable metric's name
:type display_name: str
:param name: Required. Metric's name/id
:type name: str
:param unit: Required. Metric's unit
:type unit: str
"""
_validation = {
'aggregation_type': {'required': True},
'display_description': {'required': True},
'display_name': {'required': True},
'name': {'required': True},
'unit': {'required': True},
}
_attribute_map = {
'aggregation_type': {'key': 'aggregationType', 'type': 'AggregationType'},
'display_description': {'key': 'displayDescription', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'unit': {'key': 'unit', 'type': 'str'},
}
def __init__(self, *, aggregation_type, display_description: str, display_name: str, name: str, unit: str, **kwargs) -> None:
super(AvailableOperationDisplayPropertyServiceSpecificationMetricsItem, self).__init__(**kwargs)
self.aggregation_type = aggregation_type
self.display_description = display_description
self.display_name = display_name
self.name = name
self.unit = unit

Просмотреть файл

@ -1,29 +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.serialization import Model
class AvailableOperationDisplayPropertyServiceSpecificationMetricsList(Model):
"""List of available operation display property service specification metrics.
:param metric_specifications: Metric specifications of operation
:type metric_specifications:
list[~azure.mgmt.vmwarecloudsimple.models.AvailableOperationDisplayPropertyServiceSpecificationMetricsItem]
"""
_attribute_map = {
'metric_specifications': {'key': 'metricSpecifications', 'type': '[AvailableOperationDisplayPropertyServiceSpecificationMetricsItem]'},
}
def __init__(self, **kwargs):
super(AvailableOperationDisplayPropertyServiceSpecificationMetricsList, self).__init__(**kwargs)
self.metric_specifications = kwargs.get('metric_specifications', None)

Просмотреть файл

@ -1,29 +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.serialization import Model
class AvailableOperationDisplayPropertyServiceSpecificationMetricsList(Model):
"""List of available operation display property service specification metrics.
:param metric_specifications: Metric specifications of operation
:type metric_specifications:
list[~azure.mgmt.vmwarecloudsimple.models.AvailableOperationDisplayPropertyServiceSpecificationMetricsItem]
"""
_attribute_map = {
'metric_specifications': {'key': 'metricSpecifications', 'type': '[AvailableOperationDisplayPropertyServiceSpecificationMetricsItem]'},
}
def __init__(self, *, metric_specifications=None, **kwargs) -> None:
super(AvailableOperationDisplayPropertyServiceSpecificationMetricsList, self).__init__(**kwargs)
self.metric_specifications = metric_specifications

Просмотреть файл

@ -1,40 +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.serialization import Model
class AvailableOperationDisplay(Model):
"""Resource provider available operation display model.
:param description: Description of the operation for display purposes
:type description: str
:param operation: Name of the operation for display purposes
:type operation: str
:param provider: Name of the provider for display purposes
:type provider: str
:param resource: Name of the resource type for display purposes
:type resource: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
}
def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None:
super(AvailableOperationDisplay, self).__init__(**kwargs)
self.description = description
self.operation = operation
self.provider = provider
self.resource = resource

Просмотреть файл

@ -1,27 +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.paging import Paged
class AvailableOperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`AvailableOperation <azure.mgmt.vmwarecloudsimple.models.AvailableOperation>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[AvailableOperation]'}
}
def __init__(self, *args, **kwargs):
super(AvailableOperationPaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,49 +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.serialization import Model
class AvailableOperation(Model):
"""Resource provider available operation model.
:param display: The list of operations
:type display:
~azure.mgmt.vmwarecloudsimple.models.AvailableOperationDisplay
:param is_data_action: Indicating whether the operation is a data action
or not. Default value: False .
:type is_data_action: bool
:param name:
{resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
:type name: str
:param origin: The origin of operation. Possible values include: 'user',
'system', 'user,system'
:type origin: str or ~azure.mgmt.vmwarecloudsimple.models.OperationOrigin
:param service_specification: The list of specification's service metrics
:type service_specification:
~azure.mgmt.vmwarecloudsimple.models.AvailableOperationDisplayPropertyServiceSpecificationMetricsList
"""
_attribute_map = {
'display': {'key': 'display', 'type': 'AvailableOperationDisplay'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
'name': {'key': 'name', 'type': 'str'},
'origin': {'key': 'origin', 'type': 'OperationOrigin'},
'service_specification': {'key': 'properties.serviceSpecification', 'type': 'AvailableOperationDisplayPropertyServiceSpecificationMetricsList'},
}
def __init__(self, *, display=None, is_data_action: bool=False, name: str=None, origin=None, service_specification=None, **kwargs) -> None:
super(AvailableOperation, self).__init__(**kwargs)
self.display = display
self.is_data_action = is_data_action
self.name = name
self.origin = origin
self.service_specification = service_specification

Просмотреть файл

@ -1,41 +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.serialization import Model
from msrest.exceptions import HttpOperationError
class CSRPError(Model):
"""General error model.
:param error: Error's body
:type error: ~azure.mgmt.vmwarecloudsimple.models.CSRPErrorBody
"""
_attribute_map = {
'error': {'key': 'error', 'type': 'CSRPErrorBody'},
}
def __init__(self, **kwargs):
super(CSRPError, self).__init__(**kwargs)
self.error = kwargs.get('error', None)
class CSRPErrorException(HttpOperationError):
"""Server responsed with exception of type: 'CSRPError'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""
def __init__(self, deserialize, response, *args):
super(CSRPErrorException, self).__init__(deserialize, response, 'CSRPError', *args)

Просмотреть файл

@ -1,49 +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.serialization import Model
class CSRPErrorBody(Model):
"""Error properties.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: Error's code
:vartype code: str
:ivar details: Error's details
:vartype details: list[~azure.mgmt.vmwarecloudsimple.models.CSRPErrorBody]
:ivar message: Error's message
:vartype message: str
:param target: Error's target
:type target: str
"""
_validation = {
'code': {'readonly': True},
'details': {'readonly': True},
'message': {'readonly': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'details': {'key': 'details', 'type': '[CSRPErrorBody]'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
}
def __init__(self, **kwargs):
super(CSRPErrorBody, self).__init__(**kwargs)
self.code = None
self.details = None
self.message = None
self.target = kwargs.get('target', None)

Просмотреть файл

@ -1,49 +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.serialization import Model
class CSRPErrorBody(Model):
"""Error properties.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: Error's code
:vartype code: str
:ivar details: Error's details
:vartype details: list[~azure.mgmt.vmwarecloudsimple.models.CSRPErrorBody]
:ivar message: Error's message
:vartype message: str
:param target: Error's target
:type target: str
"""
_validation = {
'code': {'readonly': True},
'details': {'readonly': True},
'message': {'readonly': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'details': {'key': 'details', 'type': '[CSRPErrorBody]'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
}
def __init__(self, *, target: str=None, **kwargs) -> None:
super(CSRPErrorBody, self).__init__(**kwargs)
self.code = None
self.details = None
self.message = None
self.target = target

Просмотреть файл

@ -1,41 +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.serialization import Model
from msrest.exceptions import HttpOperationError
class CSRPError(Model):
"""General error model.
:param error: Error's body
:type error: ~azure.mgmt.vmwarecloudsimple.models.CSRPErrorBody
"""
_attribute_map = {
'error': {'key': 'error', 'type': 'CSRPErrorBody'},
}
def __init__(self, *, error=None, **kwargs) -> None:
super(CSRPError, self).__init__(**kwargs)
self.error = error
class CSRPErrorException(HttpOperationError):
"""Server responsed with exception of type: 'CSRPError'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""
def __init__(self, deserialize, response, *args):
super(CSRPErrorException, self).__init__(deserialize, response, 'CSRPError', *args)

Просмотреть файл

@ -1,138 +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.serialization import Model
class DedicatedCloudNode(Model):
"""Dedicated cloud node model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudNodes/{dedicatedCloudNodeName}
:vartype id: str
:param location: Required. Azure region
:type location: str
:ivar name: {dedicatedCloudNodeName}
:vartype name: str
:param availability_zone_id: Required. Availability Zone id, e.g. "az1"
:type availability_zone_id: str
:ivar availability_zone_name: Availability Zone name, e.g. "Availability
Zone 1"
:vartype availability_zone_name: str
:ivar cloud_rack_name: VMWare Cloud Rack Name
:vartype cloud_rack_name: str
:ivar created: date time the resource was created
:vartype created: object
:param nodes_count: Required. count of nodes to create
:type nodes_count: int
:param placement_group_id: Required. Placement Group id, e.g. "n1"
:type placement_group_id: str
:ivar placement_group_name: Placement Name, e.g. "Placement Group 1"
:vartype placement_group_name: str
:ivar private_cloud_id: Private Cloud Id
:vartype private_cloud_id: str
:ivar private_cloud_name: Resource Pool Name
:vartype private_cloud_name: str
:ivar provisioning_state: The provisioning status of the resource
:vartype provisioning_state: str
:param purchase_id: Required. purchase id
:type purchase_id: str
:param id1: Required. SKU's id
:type id1: str
:param name1: Required. SKU's name
:type name1: str
:ivar status: Node status, indicates is private cloud set up on this node
or not. Possible values include: 'unused', 'used'
:vartype status: str or ~azure.mgmt.vmwarecloudsimple.models.NodeStatus
:ivar vmware_cluster_name: VMWare Cluster Name
:vartype vmware_cluster_name: str
:param sku: Dedicated Cloud Nodes SKU
:type sku: ~azure.mgmt.vmwarecloudsimple.models.Sku
:param tags: Dedicated Cloud Nodes tags
:type tags: dict[str, str]
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'location': {'required': True},
'name': {'readonly': True, 'pattern': r'^[-a-zA-Z0-9]+$'},
'availability_zone_id': {'required': True},
'availability_zone_name': {'readonly': True},
'cloud_rack_name': {'readonly': True},
'created': {'readonly': True},
'nodes_count': {'required': True},
'placement_group_id': {'required': True},
'placement_group_name': {'readonly': True},
'private_cloud_id': {'readonly': True},
'private_cloud_name': {'readonly': True},
'provisioning_state': {'readonly': True},
'purchase_id': {'required': True},
'id1': {'required': True},
'name1': {'required': True},
'status': {'readonly': True},
'vmware_cluster_name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'availability_zone_id': {'key': 'properties.availabilityZoneId', 'type': 'str'},
'availability_zone_name': {'key': 'properties.availabilityZoneName', 'type': 'str'},
'cloud_rack_name': {'key': 'properties.cloudRackName', 'type': 'str'},
'created': {'key': 'properties.created', 'type': 'object'},
'nodes_count': {'key': 'properties.nodesCount', 'type': 'int'},
'placement_group_id': {'key': 'properties.placementGroupId', 'type': 'str'},
'placement_group_name': {'key': 'properties.placementGroupName', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'private_cloud_name': {'key': 'properties.privateCloudName', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'purchase_id': {'key': 'properties.purchaseId', 'type': 'str'},
'id1': {'key': 'properties.skuDescription.id', 'type': 'str'},
'name1': {'key': 'properties.skuDescription.name', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'NodeStatus'},
'vmware_cluster_name': {'key': 'properties.vmwareClusterName', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(DedicatedCloudNode, self).__init__(**kwargs)
self.id = None
self.location = kwargs.get('location', None)
self.name = None
self.availability_zone_id = kwargs.get('availability_zone_id', None)
self.availability_zone_name = None
self.cloud_rack_name = None
self.created = None
self.nodes_count = kwargs.get('nodes_count', None)
self.placement_group_id = kwargs.get('placement_group_id', None)
self.placement_group_name = None
self.private_cloud_id = None
self.private_cloud_name = None
self.provisioning_state = None
self.purchase_id = kwargs.get('purchase_id', None)
self.id1 = kwargs.get('id1', None)
self.name1 = kwargs.get('name1', None)
self.status = None
self.vmware_cluster_name = None
self.sku = kwargs.get('sku', None)
self.tags = kwargs.get('tags', None)
self.type = None

Просмотреть файл

@ -1,27 +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.paging import Paged
class DedicatedCloudNodePaged(Paged):
"""
A paging container for iterating over a list of :class:`DedicatedCloudNode <azure.mgmt.vmwarecloudsimple.models.DedicatedCloudNode>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[DedicatedCloudNode]'}
}
def __init__(self, *args, **kwargs):
super(DedicatedCloudNodePaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,138 +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.serialization import Model
class DedicatedCloudNode(Model):
"""Dedicated cloud node model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudNodes/{dedicatedCloudNodeName}
:vartype id: str
:param location: Required. Azure region
:type location: str
:ivar name: {dedicatedCloudNodeName}
:vartype name: str
:param availability_zone_id: Required. Availability Zone id, e.g. "az1"
:type availability_zone_id: str
:ivar availability_zone_name: Availability Zone name, e.g. "Availability
Zone 1"
:vartype availability_zone_name: str
:ivar cloud_rack_name: VMWare Cloud Rack Name
:vartype cloud_rack_name: str
:ivar created: date time the resource was created
:vartype created: object
:param nodes_count: Required. count of nodes to create
:type nodes_count: int
:param placement_group_id: Required. Placement Group id, e.g. "n1"
:type placement_group_id: str
:ivar placement_group_name: Placement Name, e.g. "Placement Group 1"
:vartype placement_group_name: str
:ivar private_cloud_id: Private Cloud Id
:vartype private_cloud_id: str
:ivar private_cloud_name: Resource Pool Name
:vartype private_cloud_name: str
:ivar provisioning_state: The provisioning status of the resource
:vartype provisioning_state: str
:param purchase_id: Required. purchase id
:type purchase_id: str
:param id1: Required. SKU's id
:type id1: str
:param name1: Required. SKU's name
:type name1: str
:ivar status: Node status, indicates is private cloud set up on this node
or not. Possible values include: 'unused', 'used'
:vartype status: str or ~azure.mgmt.vmwarecloudsimple.models.NodeStatus
:ivar vmware_cluster_name: VMWare Cluster Name
:vartype vmware_cluster_name: str
:param sku: Dedicated Cloud Nodes SKU
:type sku: ~azure.mgmt.vmwarecloudsimple.models.Sku
:param tags: Dedicated Cloud Nodes tags
:type tags: dict[str, str]
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'location': {'required': True},
'name': {'readonly': True, 'pattern': r'^[-a-zA-Z0-9]+$'},
'availability_zone_id': {'required': True},
'availability_zone_name': {'readonly': True},
'cloud_rack_name': {'readonly': True},
'created': {'readonly': True},
'nodes_count': {'required': True},
'placement_group_id': {'required': True},
'placement_group_name': {'readonly': True},
'private_cloud_id': {'readonly': True},
'private_cloud_name': {'readonly': True},
'provisioning_state': {'readonly': True},
'purchase_id': {'required': True},
'id1': {'required': True},
'name1': {'required': True},
'status': {'readonly': True},
'vmware_cluster_name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'availability_zone_id': {'key': 'properties.availabilityZoneId', 'type': 'str'},
'availability_zone_name': {'key': 'properties.availabilityZoneName', 'type': 'str'},
'cloud_rack_name': {'key': 'properties.cloudRackName', 'type': 'str'},
'created': {'key': 'properties.created', 'type': 'object'},
'nodes_count': {'key': 'properties.nodesCount', 'type': 'int'},
'placement_group_id': {'key': 'properties.placementGroupId', 'type': 'str'},
'placement_group_name': {'key': 'properties.placementGroupName', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'private_cloud_name': {'key': 'properties.privateCloudName', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'purchase_id': {'key': 'properties.purchaseId', 'type': 'str'},
'id1': {'key': 'properties.skuDescription.id', 'type': 'str'},
'name1': {'key': 'properties.skuDescription.name', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'NodeStatus'},
'vmware_cluster_name': {'key': 'properties.vmwareClusterName', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, *, location: str, availability_zone_id: str, nodes_count: int, placement_group_id: str, purchase_id: str, id1: str, name1: str, sku=None, tags=None, **kwargs) -> None:
super(DedicatedCloudNode, self).__init__(**kwargs)
self.id = None
self.location = location
self.name = None
self.availability_zone_id = availability_zone_id
self.availability_zone_name = None
self.cloud_rack_name = None
self.created = None
self.nodes_count = nodes_count
self.placement_group_id = placement_group_id
self.placement_group_name = None
self.private_cloud_id = None
self.private_cloud_name = None
self.provisioning_state = None
self.purchase_id = purchase_id
self.id1 = id1
self.name1 = name1
self.status = None
self.vmware_cluster_name = None
self.sku = sku
self.tags = tags
self.type = None

Просмотреть файл

@ -1,79 +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.serialization import Model
class DedicatedCloudService(Model):
"""Dedicated cloud service model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudServices/{dedicatedCloudServiceName}
:vartype id: str
:param location: Required. Azure region
:type location: str
:ivar name: {dedicatedCloudServiceName}
:vartype name: str
:param gateway_subnet: Required. gateway Subnet for the account. It will
collect the subnet address and always treat it as /28
:type gateway_subnet: str
:ivar is_account_onboarded: indicates whether account onboarded or not in
a given region. Possible values include: 'notOnBoarded', 'onBoarded',
'onBoardingFailed', 'onBoarding'
:vartype is_account_onboarded: str or
~azure.mgmt.vmwarecloudsimple.models.OnboardingStatus
:param nodes: total nodes purchased
:type nodes: int
:param service_url: link to a service management web portal
:type service_url: str
:param tags: The list of tags
:type tags: dict[str, str]
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'location': {'required': True},
'name': {'readonly': True, 'pattern': r'^[-a-zA-Z0-9]+$'},
'gateway_subnet': {'required': True},
'is_account_onboarded': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'gateway_subnet': {'key': 'properties.gatewaySubnet', 'type': 'str'},
'is_account_onboarded': {'key': 'properties.isAccountOnboarded', 'type': 'OnboardingStatus'},
'nodes': {'key': 'properties.nodes', 'type': 'int'},
'service_url': {'key': 'properties.serviceURL', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(DedicatedCloudService, self).__init__(**kwargs)
self.id = None
self.location = kwargs.get('location', None)
self.name = None
self.gateway_subnet = kwargs.get('gateway_subnet', None)
self.is_account_onboarded = None
self.nodes = kwargs.get('nodes', None)
self.service_url = kwargs.get('service_url', None)
self.tags = kwargs.get('tags', None)
self.type = None

Просмотреть файл

@ -1,27 +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.paging import Paged
class DedicatedCloudServicePaged(Paged):
"""
A paging container for iterating over a list of :class:`DedicatedCloudService <azure.mgmt.vmwarecloudsimple.models.DedicatedCloudService>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[DedicatedCloudService]'}
}
def __init__(self, *args, **kwargs):
super(DedicatedCloudServicePaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,79 +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.serialization import Model
class DedicatedCloudService(Model):
"""Dedicated cloud service model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudServices/{dedicatedCloudServiceName}
:vartype id: str
:param location: Required. Azure region
:type location: str
:ivar name: {dedicatedCloudServiceName}
:vartype name: str
:param gateway_subnet: Required. gateway Subnet for the account. It will
collect the subnet address and always treat it as /28
:type gateway_subnet: str
:ivar is_account_onboarded: indicates whether account onboarded or not in
a given region. Possible values include: 'notOnBoarded', 'onBoarded',
'onBoardingFailed', 'onBoarding'
:vartype is_account_onboarded: str or
~azure.mgmt.vmwarecloudsimple.models.OnboardingStatus
:param nodes: total nodes purchased
:type nodes: int
:param service_url: link to a service management web portal
:type service_url: str
:param tags: The list of tags
:type tags: dict[str, str]
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'location': {'required': True},
'name': {'readonly': True, 'pattern': r'^[-a-zA-Z0-9]+$'},
'gateway_subnet': {'required': True},
'is_account_onboarded': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'gateway_subnet': {'key': 'properties.gatewaySubnet', 'type': 'str'},
'is_account_onboarded': {'key': 'properties.isAccountOnboarded', 'type': 'OnboardingStatus'},
'nodes': {'key': 'properties.nodes', 'type': 'int'},
'service_url': {'key': 'properties.serviceURL', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, *, location: str, gateway_subnet: str, nodes: int=None, service_url: str=None, tags=None, **kwargs) -> None:
super(DedicatedCloudService, self).__init__(**kwargs)
self.id = None
self.location = location
self.name = None
self.gateway_subnet = gateway_subnet
self.is_account_onboarded = None
self.nodes = nodes
self.service_url = service_url
self.tags = tags
self.type = None

Просмотреть файл

@ -1,32 +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.serialization import Model
class OperationError(Model):
"""Operation error model.
:param code: Error's code
:type code: str
:param message: Error's message
:type message: str
"""
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(self, **kwargs):
super(OperationError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)

Просмотреть файл

@ -1,32 +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.serialization import Model
class OperationError(Model):
"""Operation error model.
:param code: Error's code
:type code: str
:param message: Error's message
:type message: str
"""
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
super(OperationError, self).__init__(**kwargs)
self.code = code
self.message = message

Просмотреть файл

@ -1,59 +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.serialization import Model
class OperationResource(Model):
"""Operation status response.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar end_time: End time of the operation
:vartype end_time: datetime
:param error: Error Message if operation failed
:type error: ~azure.mgmt.vmwarecloudsimple.models.OperationError
:ivar id: Operation Id
:vartype id: str
:ivar name: Operation ID
:vartype name: str
:ivar start_time: Start time of the operation
:vartype start_time: datetime
:ivar status: Operation status
:vartype status: str
"""
_validation = {
'end_time': {'readonly': True},
'id': {'readonly': True},
'name': {'readonly': True},
'start_time': {'readonly': True},
'status': {'readonly': True},
}
_attribute_map = {
'end_time': {'key': 'endTime', 'type': 'iso-8601'},
'error': {'key': 'error', 'type': 'OperationError'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'start_time': {'key': 'startTime', 'type': 'iso-8601'},
'status': {'key': 'status', 'type': 'str'},
}
def __init__(self, **kwargs):
super(OperationResource, self).__init__(**kwargs)
self.end_time = None
self.error = kwargs.get('error', None)
self.id = None
self.name = None
self.start_time = None
self.status = None

Просмотреть файл

@ -1,59 +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.serialization import Model
class OperationResource(Model):
"""Operation status response.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar end_time: End time of the operation
:vartype end_time: datetime
:param error: Error Message if operation failed
:type error: ~azure.mgmt.vmwarecloudsimple.models.OperationError
:ivar id: Operation Id
:vartype id: str
:ivar name: Operation ID
:vartype name: str
:ivar start_time: Start time of the operation
:vartype start_time: datetime
:ivar status: Operation status
:vartype status: str
"""
_validation = {
'end_time': {'readonly': True},
'id': {'readonly': True},
'name': {'readonly': True},
'start_time': {'readonly': True},
'status': {'readonly': True},
}
_attribute_map = {
'end_time': {'key': 'endTime', 'type': 'iso-8601'},
'error': {'key': 'error', 'type': 'OperationError'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'start_time': {'key': 'startTime', 'type': 'iso-8601'},
'status': {'key': 'status', 'type': 'str'},
}
def __init__(self, *, error=None, **kwargs) -> None:
super(OperationResource, self).__init__(**kwargs)
self.end_time = None
self.error = error
self.id = None
self.name = None
self.start_time = None
self.status = None

Просмотреть файл

@ -1,28 +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.serialization import Model
class PatchPayload(Model):
"""General patch payload modal.
:param tags: The tags key:value pairs
:type tags: dict[str, str]
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, **kwargs):
super(PatchPayload, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)

Просмотреть файл

@ -1,28 +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.serialization import Model
class PatchPayload(Model):
"""General patch payload modal.
:param tags: The tags key:value pairs
:type tags: dict[str, str]
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, *, tags=None, **kwargs) -> None:
super(PatchPayload, self).__init__(**kwargs)
self.tags = tags

Просмотреть файл

@ -1,143 +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.serialization import Model
class PrivateCloud(Model):
"""Private cloud model.
:param id: Azure Id, e.g.
"/subscriptions/4da99247-a172-4ed6-8ae9-ebed2d12f839/providers/Microsoft.VMwareCloudSimple/privateClouds/cloud123"
:type id: str
:param location: Location where private cloud created, e.g "westus"
:type location: str
:param name: Private cloud name
:type name: str
:param availability_zone_id: Availability Zone id, e.g. "az1"
:type availability_zone_id: str
:param availability_zone_name: Availability Zone name, e.g. "Availability
Zone 1"
:type availability_zone_name: str
:param clusters_number: Number of clusters
:type clusters_number: int
:param created_by: User's emails who created cloud
:type created_by: str
:param created_on: When private cloud was created
:type created_on: datetime
:param dns_servers: Array of DNS servers
:type dns_servers: list[str]
:param expires: Expiration date of PC
:type expires: str
:param nsx_type: Nsx Type, e.g. "Advanced"
:type nsx_type: str
:param placement_group_id: Placement Group id, e.g. "n1"
:type placement_group_id: str
:param placement_group_name: Placement Group name
:type placement_group_name: str
:param private_cloud_id: Id of a private cloud
:type private_cloud_id: str
:param resource_pools: The list of Resource Pools
:type resource_pools:
list[~azure.mgmt.vmwarecloudsimple.models.ResourcePool]
:param state: Private Cloud state, e.g. "operational"
:type state: str
:param total_cpu_cores: Number of cores
:type total_cpu_cores: int
:param total_nodes: Number of nodes
:type total_nodes: int
:param total_ram: Memory size
:type total_ram: int
:param total_storage: Disk space in TB
:type total_storage: float
:param private_cloud_properties_type: Virtualization type e.g. "vSphere"
:type private_cloud_properties_type: str
:param v_sphere_version: e.g. "6.5u2"
:type v_sphere_version: str
:param vcenter_fqdn: FQDN for vcenter access
:type vcenter_fqdn: str
:param vcenter_refid: Vcenter ip address
:type vcenter_refid: str
:param virtual_machine_templates: The list of Virtual Machine Templates
:type virtual_machine_templates:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualMachineTemplate]
:param virtual_networks: The list of Virtual Networks
:type virtual_networks:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork]
:param vr_ops_enabled: Is Vrops enabled/disabled
:type vr_ops_enabled: bool
:param type: Azure Resource type. Possible values include:
'Microsoft.VMwareCloudSimple/privateClouds'
:type type: str or
~azure.mgmt.vmwarecloudsimple.models.PrivateCloudResourceType
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'availability_zone_id': {'key': 'properties.availabilityZoneId', 'type': 'str'},
'availability_zone_name': {'key': 'properties.availabilityZoneName', 'type': 'str'},
'clusters_number': {'key': 'properties.clustersNumber', 'type': 'int'},
'created_by': {'key': 'properties.createdBy', 'type': 'str'},
'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'},
'dns_servers': {'key': 'properties.dnsServers', 'type': '[str]'},
'expires': {'key': 'properties.expires', 'type': 'str'},
'nsx_type': {'key': 'properties.nsxType', 'type': 'str'},
'placement_group_id': {'key': 'properties.placementGroupId', 'type': 'str'},
'placement_group_name': {'key': 'properties.placementGroupName', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'resource_pools': {'key': 'properties.resourcePools', 'type': '[ResourcePool]'},
'state': {'key': 'properties.state', 'type': 'str'},
'total_cpu_cores': {'key': 'properties.totalCpuCores', 'type': 'int'},
'total_nodes': {'key': 'properties.totalNodes', 'type': 'int'},
'total_ram': {'key': 'properties.totalRam', 'type': 'int'},
'total_storage': {'key': 'properties.totalStorage', 'type': 'float'},
'private_cloud_properties_type': {'key': 'properties.type', 'type': 'str'},
'v_sphere_version': {'key': 'properties.vSphereVersion', 'type': 'str'},
'vcenter_fqdn': {'key': 'properties.vcenterFqdn', 'type': 'str'},
'vcenter_refid': {'key': 'properties.vcenterRefid', 'type': 'str'},
'virtual_machine_templates': {'key': 'properties.virtualMachineTemplates', 'type': '[VirtualMachineTemplate]'},
'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[VirtualNetwork]'},
'vr_ops_enabled': {'key': 'properties.vrOpsEnabled', 'type': 'bool'},
'type': {'key': 'type', 'type': 'PrivateCloudResourceType'},
}
def __init__(self, **kwargs):
super(PrivateCloud, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.location = kwargs.get('location', None)
self.name = kwargs.get('name', None)
self.availability_zone_id = kwargs.get('availability_zone_id', None)
self.availability_zone_name = kwargs.get('availability_zone_name', None)
self.clusters_number = kwargs.get('clusters_number', None)
self.created_by = kwargs.get('created_by', None)
self.created_on = kwargs.get('created_on', None)
self.dns_servers = kwargs.get('dns_servers', None)
self.expires = kwargs.get('expires', None)
self.nsx_type = kwargs.get('nsx_type', None)
self.placement_group_id = kwargs.get('placement_group_id', None)
self.placement_group_name = kwargs.get('placement_group_name', None)
self.private_cloud_id = kwargs.get('private_cloud_id', None)
self.resource_pools = kwargs.get('resource_pools', None)
self.state = kwargs.get('state', None)
self.total_cpu_cores = kwargs.get('total_cpu_cores', None)
self.total_nodes = kwargs.get('total_nodes', None)
self.total_ram = kwargs.get('total_ram', None)
self.total_storage = kwargs.get('total_storage', None)
self.private_cloud_properties_type = kwargs.get('private_cloud_properties_type', None)
self.v_sphere_version = kwargs.get('v_sphere_version', None)
self.vcenter_fqdn = kwargs.get('vcenter_fqdn', None)
self.vcenter_refid = kwargs.get('vcenter_refid', None)
self.virtual_machine_templates = kwargs.get('virtual_machine_templates', None)
self.virtual_networks = kwargs.get('virtual_networks', None)
self.vr_ops_enabled = kwargs.get('vr_ops_enabled', None)
self.type = kwargs.get('type', None)

Просмотреть файл

@ -1,27 +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.paging import Paged
class PrivateCloudPaged(Paged):
"""
A paging container for iterating over a list of :class:`PrivateCloud <azure.mgmt.vmwarecloudsimple.models.PrivateCloud>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[PrivateCloud]'}
}
def __init__(self, *args, **kwargs):
super(PrivateCloudPaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,143 +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.serialization import Model
class PrivateCloud(Model):
"""Private cloud model.
:param id: Azure Id, e.g.
"/subscriptions/4da99247-a172-4ed6-8ae9-ebed2d12f839/providers/Microsoft.VMwareCloudSimple/privateClouds/cloud123"
:type id: str
:param location: Location where private cloud created, e.g "westus"
:type location: str
:param name: Private cloud name
:type name: str
:param availability_zone_id: Availability Zone id, e.g. "az1"
:type availability_zone_id: str
:param availability_zone_name: Availability Zone name, e.g. "Availability
Zone 1"
:type availability_zone_name: str
:param clusters_number: Number of clusters
:type clusters_number: int
:param created_by: User's emails who created cloud
:type created_by: str
:param created_on: When private cloud was created
:type created_on: datetime
:param dns_servers: Array of DNS servers
:type dns_servers: list[str]
:param expires: Expiration date of PC
:type expires: str
:param nsx_type: Nsx Type, e.g. "Advanced"
:type nsx_type: str
:param placement_group_id: Placement Group id, e.g. "n1"
:type placement_group_id: str
:param placement_group_name: Placement Group name
:type placement_group_name: str
:param private_cloud_id: Id of a private cloud
:type private_cloud_id: str
:param resource_pools: The list of Resource Pools
:type resource_pools:
list[~azure.mgmt.vmwarecloudsimple.models.ResourcePool]
:param state: Private Cloud state, e.g. "operational"
:type state: str
:param total_cpu_cores: Number of cores
:type total_cpu_cores: int
:param total_nodes: Number of nodes
:type total_nodes: int
:param total_ram: Memory size
:type total_ram: int
:param total_storage: Disk space in TB
:type total_storage: float
:param private_cloud_properties_type: Virtualization type e.g. "vSphere"
:type private_cloud_properties_type: str
:param v_sphere_version: e.g. "6.5u2"
:type v_sphere_version: str
:param vcenter_fqdn: FQDN for vcenter access
:type vcenter_fqdn: str
:param vcenter_refid: Vcenter ip address
:type vcenter_refid: str
:param virtual_machine_templates: The list of Virtual Machine Templates
:type virtual_machine_templates:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualMachineTemplate]
:param virtual_networks: The list of Virtual Networks
:type virtual_networks:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork]
:param vr_ops_enabled: Is Vrops enabled/disabled
:type vr_ops_enabled: bool
:param type: Azure Resource type. Possible values include:
'Microsoft.VMwareCloudSimple/privateClouds'
:type type: str or
~azure.mgmt.vmwarecloudsimple.models.PrivateCloudResourceType
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'availability_zone_id': {'key': 'properties.availabilityZoneId', 'type': 'str'},
'availability_zone_name': {'key': 'properties.availabilityZoneName', 'type': 'str'},
'clusters_number': {'key': 'properties.clustersNumber', 'type': 'int'},
'created_by': {'key': 'properties.createdBy', 'type': 'str'},
'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'},
'dns_servers': {'key': 'properties.dnsServers', 'type': '[str]'},
'expires': {'key': 'properties.expires', 'type': 'str'},
'nsx_type': {'key': 'properties.nsxType', 'type': 'str'},
'placement_group_id': {'key': 'properties.placementGroupId', 'type': 'str'},
'placement_group_name': {'key': 'properties.placementGroupName', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'resource_pools': {'key': 'properties.resourcePools', 'type': '[ResourcePool]'},
'state': {'key': 'properties.state', 'type': 'str'},
'total_cpu_cores': {'key': 'properties.totalCpuCores', 'type': 'int'},
'total_nodes': {'key': 'properties.totalNodes', 'type': 'int'},
'total_ram': {'key': 'properties.totalRam', 'type': 'int'},
'total_storage': {'key': 'properties.totalStorage', 'type': 'float'},
'private_cloud_properties_type': {'key': 'properties.type', 'type': 'str'},
'v_sphere_version': {'key': 'properties.vSphereVersion', 'type': 'str'},
'vcenter_fqdn': {'key': 'properties.vcenterFqdn', 'type': 'str'},
'vcenter_refid': {'key': 'properties.vcenterRefid', 'type': 'str'},
'virtual_machine_templates': {'key': 'properties.virtualMachineTemplates', 'type': '[VirtualMachineTemplate]'},
'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[VirtualNetwork]'},
'vr_ops_enabled': {'key': 'properties.vrOpsEnabled', 'type': 'bool'},
'type': {'key': 'type', 'type': 'PrivateCloudResourceType'},
}
def __init__(self, *, id: str=None, location: str=None, name: str=None, availability_zone_id: str=None, availability_zone_name: str=None, clusters_number: int=None, created_by: str=None, created_on=None, dns_servers=None, expires: str=None, nsx_type: str=None, placement_group_id: str=None, placement_group_name: str=None, private_cloud_id: str=None, resource_pools=None, state: str=None, total_cpu_cores: int=None, total_nodes: int=None, total_ram: int=None, total_storage: float=None, private_cloud_properties_type: str=None, v_sphere_version: str=None, vcenter_fqdn: str=None, vcenter_refid: str=None, virtual_machine_templates=None, virtual_networks=None, vr_ops_enabled: bool=None, type=None, **kwargs) -> None:
super(PrivateCloud, self).__init__(**kwargs)
self.id = id
self.location = location
self.name = name
self.availability_zone_id = availability_zone_id
self.availability_zone_name = availability_zone_name
self.clusters_number = clusters_number
self.created_by = created_by
self.created_on = created_on
self.dns_servers = dns_servers
self.expires = expires
self.nsx_type = nsx_type
self.placement_group_id = placement_group_id
self.placement_group_name = placement_group_name
self.private_cloud_id = private_cloud_id
self.resource_pools = resource_pools
self.state = state
self.total_cpu_cores = total_cpu_cores
self.total_nodes = total_nodes
self.total_ram = total_ram
self.total_storage = total_storage
self.private_cloud_properties_type = private_cloud_properties_type
self.v_sphere_version = v_sphere_version
self.vcenter_fqdn = vcenter_fqdn
self.vcenter_refid = vcenter_refid
self.virtual_machine_templates = virtual_machine_templates
self.virtual_networks = virtual_networks
self.vr_ops_enabled = vr_ops_enabled
self.type = type

Просмотреть файл

@ -1,61 +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.serialization import Model
class ResourcePool(Model):
"""Resource pool model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param id: Required. resource pool id (privateCloudId:vsphereId)
:type id: str
:param location: Azure region
:type location: str
:ivar name: {ResourcePoolName}
:vartype name: str
:ivar private_cloud_id: The Private Cloud Id
:vartype private_cloud_id: str
:ivar full_name: Hierarchical resource pool name
:vartype full_name: str
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'required': True},
'name': {'readonly': True},
'private_cloud_id': {'readonly': True},
'full_name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'private_cloud_id': {'key': 'privateCloudId', 'type': 'str'},
'full_name': {'key': 'properties.fullName', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ResourcePool, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.location = kwargs.get('location', None)
self.name = None
self.private_cloud_id = None
self.full_name = None
self.type = None

Просмотреть файл

@ -1,27 +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.paging import Paged
class ResourcePoolPaged(Paged):
"""
A paging container for iterating over a list of :class:`ResourcePool <azure.mgmt.vmwarecloudsimple.models.ResourcePool>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ResourcePool]'}
}
def __init__(self, *args, **kwargs):
super(ResourcePoolPaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,61 +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.serialization import Model
class ResourcePool(Model):
"""Resource pool model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param id: Required. resource pool id (privateCloudId:vsphereId)
:type id: str
:param location: Azure region
:type location: str
:ivar name: {ResourcePoolName}
:vartype name: str
:ivar private_cloud_id: The Private Cloud Id
:vartype private_cloud_id: str
:ivar full_name: Hierarchical resource pool name
:vartype full_name: str
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'required': True},
'name': {'readonly': True},
'private_cloud_id': {'readonly': True},
'full_name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'private_cloud_id': {'key': 'privateCloudId', 'type': 'str'},
'full_name': {'key': 'properties.fullName', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, *, id: str, location: str=None, **kwargs) -> None:
super(ResourcePool, self).__init__(**kwargs)
self.id = id
self.location = location
self.name = None
self.private_cloud_id = None
self.full_name = None
self.type = None

Просмотреть файл

@ -1,53 +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.serialization import Model
class Sku(Model):
"""The purchase SKU for CloudSimple paid resources.
All required parameters must be populated in order to send to Azure.
:param capacity: The capacity of the SKU
:type capacity: str
:param description: dedicatedCloudNode example: 8 x Ten-Core Intel® Xeon®
Processor E5-2640 v4 2.40GHz 25MB Cache (90W); 12 x 64GB PC4-19200 2400MHz
DDR4 ECC Registered DIMM, ...
:type description: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here
:type family: str
:param name: Required. The name of the SKU for VMWare CloudSimple Node
:type name: str
:param tier: The tier of the SKU
:type tier: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'capacity': {'key': 'capacity', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'family': {'key': 'family', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'tier': {'key': 'tier', 'type': 'str'},
}
def __init__(self, **kwargs):
super(Sku, self).__init__(**kwargs)
self.capacity = kwargs.get('capacity', None)
self.description = kwargs.get('description', None)
self.family = kwargs.get('family', None)
self.name = kwargs.get('name', None)
self.tier = kwargs.get('tier', None)

Просмотреть файл

@ -1,64 +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.serialization import Model
class SkuAvailability(Model):
"""SKU availability model.
All required parameters must be populated in order to send to Azure.
:param dedicated_availability_zone_id: CloudSimple Availability Zone id
:type dedicated_availability_zone_id: str
:param dedicated_availability_zone_name: CloudSimple Availability Zone
Name
:type dedicated_availability_zone_name: str
:param dedicated_placement_group_id: CloudSimple Placement Group Id
:type dedicated_placement_group_id: str
:param dedicated_placement_group_name: CloudSimple Placement Group name
:type dedicated_placement_group_name: str
:param limit: Required. indicates how many resources of a given SKU is
available in a AZ->PG
:type limit: int
:param resource_type: resource type e.g. DedicatedCloudNodes
:type resource_type: str
:param sku_id: sku id
:type sku_id: str
:param sku_name: sku name
:type sku_name: str
"""
_validation = {
'limit': {'required': True},
}
_attribute_map = {
'dedicated_availability_zone_id': {'key': 'dedicatedAvailabilityZoneId', 'type': 'str'},
'dedicated_availability_zone_name': {'key': 'dedicatedAvailabilityZoneName', 'type': 'str'},
'dedicated_placement_group_id': {'key': 'dedicatedPlacementGroupId', 'type': 'str'},
'dedicated_placement_group_name': {'key': 'dedicatedPlacementGroupName', 'type': 'str'},
'limit': {'key': 'limit', 'type': 'int'},
'resource_type': {'key': 'resourceType', 'type': 'str'},
'sku_id': {'key': 'skuId', 'type': 'str'},
'sku_name': {'key': 'skuName', 'type': 'str'},
}
def __init__(self, **kwargs):
super(SkuAvailability, self).__init__(**kwargs)
self.dedicated_availability_zone_id = kwargs.get('dedicated_availability_zone_id', None)
self.dedicated_availability_zone_name = kwargs.get('dedicated_availability_zone_name', None)
self.dedicated_placement_group_id = kwargs.get('dedicated_placement_group_id', None)
self.dedicated_placement_group_name = kwargs.get('dedicated_placement_group_name', None)
self.limit = kwargs.get('limit', None)
self.resource_type = kwargs.get('resource_type', None)
self.sku_id = kwargs.get('sku_id', None)
self.sku_name = kwargs.get('sku_name', None)

Просмотреть файл

@ -1,27 +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.paging import Paged
class SkuAvailabilityPaged(Paged):
"""
A paging container for iterating over a list of :class:`SkuAvailability <azure.mgmt.vmwarecloudsimple.models.SkuAvailability>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[SkuAvailability]'}
}
def __init__(self, *args, **kwargs):
super(SkuAvailabilityPaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,64 +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.serialization import Model
class SkuAvailability(Model):
"""SKU availability model.
All required parameters must be populated in order to send to Azure.
:param dedicated_availability_zone_id: CloudSimple Availability Zone id
:type dedicated_availability_zone_id: str
:param dedicated_availability_zone_name: CloudSimple Availability Zone
Name
:type dedicated_availability_zone_name: str
:param dedicated_placement_group_id: CloudSimple Placement Group Id
:type dedicated_placement_group_id: str
:param dedicated_placement_group_name: CloudSimple Placement Group name
:type dedicated_placement_group_name: str
:param limit: Required. indicates how many resources of a given SKU is
available in a AZ->PG
:type limit: int
:param resource_type: resource type e.g. DedicatedCloudNodes
:type resource_type: str
:param sku_id: sku id
:type sku_id: str
:param sku_name: sku name
:type sku_name: str
"""
_validation = {
'limit': {'required': True},
}
_attribute_map = {
'dedicated_availability_zone_id': {'key': 'dedicatedAvailabilityZoneId', 'type': 'str'},
'dedicated_availability_zone_name': {'key': 'dedicatedAvailabilityZoneName', 'type': 'str'},
'dedicated_placement_group_id': {'key': 'dedicatedPlacementGroupId', 'type': 'str'},
'dedicated_placement_group_name': {'key': 'dedicatedPlacementGroupName', 'type': 'str'},
'limit': {'key': 'limit', 'type': 'int'},
'resource_type': {'key': 'resourceType', 'type': 'str'},
'sku_id': {'key': 'skuId', 'type': 'str'},
'sku_name': {'key': 'skuName', 'type': 'str'},
}
def __init__(self, *, limit: int, dedicated_availability_zone_id: str=None, dedicated_availability_zone_name: str=None, dedicated_placement_group_id: str=None, dedicated_placement_group_name: str=None, resource_type: str=None, sku_id: str=None, sku_name: str=None, **kwargs) -> None:
super(SkuAvailability, self).__init__(**kwargs)
self.dedicated_availability_zone_id = dedicated_availability_zone_id
self.dedicated_availability_zone_name = dedicated_availability_zone_name
self.dedicated_placement_group_id = dedicated_placement_group_id
self.dedicated_placement_group_name = dedicated_placement_group_name
self.limit = limit
self.resource_type = resource_type
self.sku_id = sku_id
self.sku_name = sku_name

Просмотреть файл

@ -1,53 +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.serialization import Model
class Sku(Model):
"""The purchase SKU for CloudSimple paid resources.
All required parameters must be populated in order to send to Azure.
:param capacity: The capacity of the SKU
:type capacity: str
:param description: dedicatedCloudNode example: 8 x Ten-Core Intel® Xeon®
Processor E5-2640 v4 2.40GHz 25MB Cache (90W); 12 x 64GB PC4-19200 2400MHz
DDR4 ECC Registered DIMM, ...
:type description: str
:param family: If the service has different generations of hardware, for
the same SKU, then that can be captured here
:type family: str
:param name: Required. The name of the SKU for VMWare CloudSimple Node
:type name: str
:param tier: The tier of the SKU
:type tier: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'capacity': {'key': 'capacity', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'family': {'key': 'family', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'tier': {'key': 'tier', 'type': 'str'},
}
def __init__(self, *, name: str, capacity: str=None, description: str=None, family: str=None, tier: str=None, **kwargs) -> None:
super(Sku, self).__init__(**kwargs)
self.capacity = capacity
self.description = description
self.family = family
self.name = name
self.tier = tier

Просмотреть файл

@ -1,51 +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.serialization import Model
class Usage(Model):
"""Usage model.
All required parameters must be populated in order to send to Azure.
:param current_value: Required. The current usage value. Default value: 0
.
:type current_value: int
:param limit: Required. limit of a given sku in a region for a
subscription. The maximum permitted value for the usage quota. If there is
no limit, this value will be -1. Default value: 0 .
:type limit: int
:param name: Usage name value and localized name
:type name: ~azure.mgmt.vmwarecloudsimple.models.UsageName
:param unit: The usages' unit. Possible values include: 'Count', 'Bytes',
'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond'
:type unit: str or ~azure.mgmt.vmwarecloudsimple.models.UsageCount
"""
_validation = {
'current_value': {'required': True},
'limit': {'required': True},
}
_attribute_map = {
'current_value': {'key': 'currentValue', 'type': 'int'},
'limit': {'key': 'limit', 'type': 'int'},
'name': {'key': 'name', 'type': 'UsageName'},
'unit': {'key': 'unit', 'type': 'UsageCount'},
}
def __init__(self, **kwargs):
super(Usage, self).__init__(**kwargs)
self.current_value = kwargs.get('current_value', 0)
self.limit = kwargs.get('limit', 0)
self.name = kwargs.get('name', None)
self.unit = kwargs.get('unit', None)

Просмотреть файл

@ -1,33 +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.serialization import Model
class UsageName(Model):
"""User name model.
:param localized_value: e.g. "Virtual Machines"
:type localized_value: str
:param value: resource type or resource type sku name, e.g.
virtualMachines
:type value: str
"""
_attribute_map = {
'localized_value': {'key': 'localizedValue', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}
def __init__(self, **kwargs):
super(UsageName, self).__init__(**kwargs)
self.localized_value = kwargs.get('localized_value', None)
self.value = kwargs.get('value', None)

Просмотреть файл

@ -1,33 +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.serialization import Model
class UsageName(Model):
"""User name model.
:param localized_value: e.g. "Virtual Machines"
:type localized_value: str
:param value: resource type or resource type sku name, e.g.
virtualMachines
:type value: str
"""
_attribute_map = {
'localized_value': {'key': 'localizedValue', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}
def __init__(self, *, localized_value: str=None, value: str=None, **kwargs) -> None:
super(UsageName, self).__init__(**kwargs)
self.localized_value = localized_value
self.value = value

Просмотреть файл

@ -1,27 +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.paging import Paged
class UsagePaged(Paged):
"""
A paging container for iterating over a list of :class:`Usage <azure.mgmt.vmwarecloudsimple.models.Usage>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Usage]'}
}
def __init__(self, *args, **kwargs):
super(UsagePaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,51 +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.serialization import Model
class Usage(Model):
"""Usage model.
All required parameters must be populated in order to send to Azure.
:param current_value: Required. The current usage value. Default value: 0
.
:type current_value: int
:param limit: Required. limit of a given sku in a region for a
subscription. The maximum permitted value for the usage quota. If there is
no limit, this value will be -1. Default value: 0 .
:type limit: int
:param name: Usage name value and localized name
:type name: ~azure.mgmt.vmwarecloudsimple.models.UsageName
:param unit: The usages' unit. Possible values include: 'Count', 'Bytes',
'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond'
:type unit: str or ~azure.mgmt.vmwarecloudsimple.models.UsageCount
"""
_validation = {
'current_value': {'required': True},
'limit': {'required': True},
}
_attribute_map = {
'current_value': {'key': 'currentValue', 'type': 'int'},
'limit': {'key': 'limit', 'type': 'int'},
'name': {'key': 'name', 'type': 'UsageName'},
'unit': {'key': 'unit', 'type': 'UsageCount'},
}
def __init__(self, *, current_value: int=0, limit: int=0, name=None, unit=None, **kwargs) -> None:
super(Usage, self).__init__(**kwargs)
self.current_value = current_value
self.limit = limit
self.name = name
self.unit = unit

Просмотреть файл

@ -1,59 +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.serialization import Model
class VirtualDisk(Model):
"""Virtual disk model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param controller_id: Required. Disk's Controller id
:type controller_id: str
:param independence_mode: Required. Disk's independence mode type.
Possible values include: 'persistent', 'independent_persistent',
'independent_nonpersistent'
:type independence_mode: str or
~azure.mgmt.vmwarecloudsimple.models.DiskIndependenceMode
:param total_size: Required. Disk's total size
:type total_size: int
:param virtual_disk_id: Disk's id
:type virtual_disk_id: str
:ivar virtual_disk_name: Disk's display name
:vartype virtual_disk_name: str
"""
_validation = {
'controller_id': {'required': True},
'independence_mode': {'required': True},
'total_size': {'required': True},
'virtual_disk_name': {'readonly': True},
}
_attribute_map = {
'controller_id': {'key': 'controllerId', 'type': 'str'},
'independence_mode': {'key': 'independenceMode', 'type': 'DiskIndependenceMode'},
'total_size': {'key': 'totalSize', 'type': 'int'},
'virtual_disk_id': {'key': 'virtualDiskId', 'type': 'str'},
'virtual_disk_name': {'key': 'virtualDiskName', 'type': 'str'},
}
def __init__(self, **kwargs):
super(VirtualDisk, self).__init__(**kwargs)
self.controller_id = kwargs.get('controller_id', None)
self.independence_mode = kwargs.get('independence_mode', None)
self.total_size = kwargs.get('total_size', None)
self.virtual_disk_id = kwargs.get('virtual_disk_id', None)
self.virtual_disk_name = None

Просмотреть файл

@ -1,51 +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.serialization import Model
class VirtualDiskController(Model):
"""Virtual disk controller model.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Controller's id
:vartype id: str
:ivar name: The display name of Controller
:vartype name: str
:ivar sub_type: dik controller subtype (VMWARE_PARAVIRTUAL, BUS_PARALLEL,
LSI_PARALLEL, LSI_SAS)
:vartype sub_type: str
:ivar type: disk controller type (SCSI)
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'sub_type': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'sub_type': {'key': 'subType', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(VirtualDiskController, self).__init__(**kwargs)
self.id = None
self.name = None
self.sub_type = None
self.type = None

Просмотреть файл

@ -1,51 +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.serialization import Model
class VirtualDiskController(Model):
"""Virtual disk controller model.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Controller's id
:vartype id: str
:ivar name: The display name of Controller
:vartype name: str
:ivar sub_type: dik controller subtype (VMWARE_PARAVIRTUAL, BUS_PARALLEL,
LSI_PARALLEL, LSI_SAS)
:vartype sub_type: str
:ivar type: disk controller type (SCSI)
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'sub_type': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'sub_type': {'key': 'subType', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(VirtualDiskController, self).__init__(**kwargs)
self.id = None
self.name = None
self.sub_type = None
self.type = None

Просмотреть файл

@ -1,59 +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.serialization import Model
class VirtualDisk(Model):
"""Virtual disk model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param controller_id: Required. Disk's Controller id
:type controller_id: str
:param independence_mode: Required. Disk's independence mode type.
Possible values include: 'persistent', 'independent_persistent',
'independent_nonpersistent'
:type independence_mode: str or
~azure.mgmt.vmwarecloudsimple.models.DiskIndependenceMode
:param total_size: Required. Disk's total size
:type total_size: int
:param virtual_disk_id: Disk's id
:type virtual_disk_id: str
:ivar virtual_disk_name: Disk's display name
:vartype virtual_disk_name: str
"""
_validation = {
'controller_id': {'required': True},
'independence_mode': {'required': True},
'total_size': {'required': True},
'virtual_disk_name': {'readonly': True},
}
_attribute_map = {
'controller_id': {'key': 'controllerId', 'type': 'str'},
'independence_mode': {'key': 'independenceMode', 'type': 'DiskIndependenceMode'},
'total_size': {'key': 'totalSize', 'type': 'int'},
'virtual_disk_id': {'key': 'virtualDiskId', 'type': 'str'},
'virtual_disk_name': {'key': 'virtualDiskName', 'type': 'str'},
}
def __init__(self, *, controller_id: str, independence_mode, total_size: int, virtual_disk_id: str=None, **kwargs) -> None:
super(VirtualDisk, self).__init__(**kwargs)
self.controller_id = controller_id
self.independence_mode = independence_mode
self.total_size = total_size
self.virtual_disk_id = virtual_disk_id
self.virtual_disk_name = None

Просмотреть файл

@ -1,160 +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.serialization import Model
class VirtualMachine(Model):
"""Virtual machine model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/virtualMachines/{virtualMachineName}
:vartype id: str
:param location: Required. Azure region
:type location: str
:ivar name: {virtualMachineName}
:vartype name: str
:param amount_of_ram: Required. The amount of memory
:type amount_of_ram: int
:ivar controllers: The list of Virtual Disks' Controllers
:vartype controllers:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualDiskController]
:param disks: The list of Virtual Disks
:type disks: list[~azure.mgmt.vmwarecloudsimple.models.VirtualDisk]
:ivar dnsname: The DNS name of Virtual Machine in VCenter
:vartype dnsname: str
:param expose_to_guest_vm: Expose Guest OS or not
: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
~azure.mgmt.vmwarecloudsimple.models.GuestOSType
:param nics: The list of Virtual NICs
:type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic]
:param number_of_cores: Required. The number of CPU cores
:type number_of_cores: int
:param password: Password for login
:type password: str
:param private_cloud_id: Required. Private Cloud Id
:type private_cloud_id: str
:ivar provisioning_state: The provisioning status of the resource
:vartype provisioning_state: str
:ivar public_ip: The public ip of Virtual Machine
:vartype public_ip: str
:param resource_pool: Virtual Machines Resource Pool
:type resource_pool: ~azure.mgmt.vmwarecloudsimple.models.ResourcePool
:ivar status: The status of Virtual machine. Possible values include:
'running', 'suspended', 'poweredoff', 'updating', 'deallocating',
'deleting'
:vartype status: str or
~azure.mgmt.vmwarecloudsimple.models.VirtualMachineStatus
:param template_id: Virtual Machine Template Id
:type template_id: str
:param username: Username for login
:type username: str
:param v_sphere_networks: The list of Virtual VSphere Networks
:type v_sphere_networks: list[str]
:ivar vm_id: The internal id of Virtual Machine in VCenter
:vartype vm_id: str
:ivar vmwaretools: VMware tools version
:vartype vmwaretools: str
:param tags: The list of tags
:type tags: dict[str, str]
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'location': {'required': True},
'name': {'readonly': True, 'pattern': r'^[-a-zA-Z0-9]+$'},
'amount_of_ram': {'required': True},
'controllers': {'readonly': True},
'dnsname': {'readonly': True},
'folder': {'readonly': True},
'guest_os': {'required': True},
'guest_os_type': {'required': True},
'number_of_cores': {'required': True},
'private_cloud_id': {'required': True},
'provisioning_state': {'readonly': True},
'public_ip': {'readonly': True},
'status': {'readonly': True},
'vm_id': {'readonly': True},
'vmwaretools': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'amount_of_ram': {'key': 'properties.amountOfRam', 'type': 'int'},
'controllers': {'key': 'properties.controllers', 'type': '[VirtualDiskController]'},
'disks': {'key': 'properties.disks', 'type': '[VirtualDisk]'},
'dnsname': {'key': 'properties.dnsname', 'type': 'str'},
'expose_to_guest_vm': {'key': 'properties.exposeToGuestVM', 'type': 'bool'},
'folder': {'key': 'properties.folder', 'type': 'str'},
'guest_os': {'key': 'properties.guestOS', 'type': 'str'},
'guest_os_type': {'key': 'properties.guestOSType', 'type': 'GuestOSType'},
'nics': {'key': 'properties.nics', 'type': '[VirtualNic]'},
'number_of_cores': {'key': 'properties.numberOfCores', 'type': 'int'},
'password': {'key': 'properties.password', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'public_ip': {'key': 'properties.publicIP', 'type': 'str'},
'resource_pool': {'key': 'properties.resourcePool', 'type': 'ResourcePool'},
'status': {'key': 'properties.status', 'type': 'VirtualMachineStatus'},
'template_id': {'key': 'properties.templateId', 'type': 'str'},
'username': {'key': 'properties.username', 'type': 'str'},
'v_sphere_networks': {'key': 'properties.vSphereNetworks', 'type': '[str]'},
'vm_id': {'key': 'properties.vmId', 'type': 'str'},
'vmwaretools': {'key': 'properties.vmwaretools', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(VirtualMachine, self).__init__(**kwargs)
self.id = None
self.location = kwargs.get('location', None)
self.name = None
self.amount_of_ram = kwargs.get('amount_of_ram', None)
self.controllers = None
self.disks = kwargs.get('disks', None)
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.nics = kwargs.get('nics', None)
self.number_of_cores = kwargs.get('number_of_cores', None)
self.password = kwargs.get('password', None)
self.private_cloud_id = kwargs.get('private_cloud_id', None)
self.provisioning_state = None
self.public_ip = None
self.resource_pool = kwargs.get('resource_pool', None)
self.status = None
self.template_id = kwargs.get('template_id', None)
self.username = kwargs.get('username', None)
self.v_sphere_networks = kwargs.get('v_sphere_networks', None)
self.vm_id = None
self.vmwaretools = None
self.tags = kwargs.get('tags', None)
self.type = None

Просмотреть файл

@ -1,27 +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.paging import Paged
class VirtualMachinePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualMachine <azure.mgmt.vmwarecloudsimple.models.VirtualMachine>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualMachine]'}
}
def __init__(self, *args, **kwargs):
super(VirtualMachinePaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,160 +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.serialization import Model
class VirtualMachine(Model):
"""Virtual machine model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/virtualMachines/{virtualMachineName}
:vartype id: str
:param location: Required. Azure region
:type location: str
:ivar name: {virtualMachineName}
:vartype name: str
:param amount_of_ram: Required. The amount of memory
:type amount_of_ram: int
:ivar controllers: The list of Virtual Disks' Controllers
:vartype controllers:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualDiskController]
:param disks: The list of Virtual Disks
:type disks: list[~azure.mgmt.vmwarecloudsimple.models.VirtualDisk]
:ivar dnsname: The DNS name of Virtual Machine in VCenter
:vartype dnsname: str
:param expose_to_guest_vm: Expose Guest OS or not
: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
~azure.mgmt.vmwarecloudsimple.models.GuestOSType
:param nics: The list of Virtual NICs
:type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic]
:param number_of_cores: Required. The number of CPU cores
:type number_of_cores: int
:param password: Password for login
:type password: str
:param private_cloud_id: Required. Private Cloud Id
:type private_cloud_id: str
:ivar provisioning_state: The provisioning status of the resource
:vartype provisioning_state: str
:ivar public_ip: The public ip of Virtual Machine
:vartype public_ip: str
:param resource_pool: Virtual Machines Resource Pool
:type resource_pool: ~azure.mgmt.vmwarecloudsimple.models.ResourcePool
:ivar status: The status of Virtual machine. Possible values include:
'running', 'suspended', 'poweredoff', 'updating', 'deallocating',
'deleting'
:vartype status: str or
~azure.mgmt.vmwarecloudsimple.models.VirtualMachineStatus
:param template_id: Virtual Machine Template Id
:type template_id: str
:param username: Username for login
:type username: str
:param v_sphere_networks: The list of Virtual VSphere Networks
:type v_sphere_networks: list[str]
:ivar vm_id: The internal id of Virtual Machine in VCenter
:vartype vm_id: str
:ivar vmwaretools: VMware tools version
:vartype vmwaretools: str
:param tags: The list of tags
:type tags: dict[str, str]
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'location': {'required': True},
'name': {'readonly': True, 'pattern': r'^[-a-zA-Z0-9]+$'},
'amount_of_ram': {'required': True},
'controllers': {'readonly': True},
'dnsname': {'readonly': True},
'folder': {'readonly': True},
'guest_os': {'required': True},
'guest_os_type': {'required': True},
'number_of_cores': {'required': True},
'private_cloud_id': {'required': True},
'provisioning_state': {'readonly': True},
'public_ip': {'readonly': True},
'status': {'readonly': True},
'vm_id': {'readonly': True},
'vmwaretools': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'amount_of_ram': {'key': 'properties.amountOfRam', 'type': 'int'},
'controllers': {'key': 'properties.controllers', 'type': '[VirtualDiskController]'},
'disks': {'key': 'properties.disks', 'type': '[VirtualDisk]'},
'dnsname': {'key': 'properties.dnsname', 'type': 'str'},
'expose_to_guest_vm': {'key': 'properties.exposeToGuestVM', 'type': 'bool'},
'folder': {'key': 'properties.folder', 'type': 'str'},
'guest_os': {'key': 'properties.guestOS', 'type': 'str'},
'guest_os_type': {'key': 'properties.guestOSType', 'type': 'GuestOSType'},
'nics': {'key': 'properties.nics', 'type': '[VirtualNic]'},
'number_of_cores': {'key': 'properties.numberOfCores', 'type': 'int'},
'password': {'key': 'properties.password', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'public_ip': {'key': 'properties.publicIP', 'type': 'str'},
'resource_pool': {'key': 'properties.resourcePool', 'type': 'ResourcePool'},
'status': {'key': 'properties.status', 'type': 'VirtualMachineStatus'},
'template_id': {'key': 'properties.templateId', 'type': 'str'},
'username': {'key': 'properties.username', 'type': 'str'},
'v_sphere_networks': {'key': 'properties.vSphereNetworks', 'type': '[str]'},
'vm_id': {'key': 'properties.vmId', 'type': 'str'},
'vmwaretools': {'key': 'properties.vmwaretools', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'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:
super(VirtualMachine, self).__init__(**kwargs)
self.id = None
self.location = location
self.name = None
self.amount_of_ram = amount_of_ram
self.controllers = None
self.disks = disks
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.nics = nics
self.number_of_cores = number_of_cores
self.password = password
self.private_cloud_id = private_cloud_id
self.provisioning_state = None
self.public_ip = None
self.resource_pool = resource_pool
self.status = None
self.template_id = template_id
self.username = username
self.v_sphere_networks = v_sphere_networks
self.vm_id = None
self.vmwaretools = None
self.tags = tags
self.type = None

Просмотреть файл

@ -1,30 +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.serialization import Model
class VirtualMachineStopMode(Model):
"""List of virtual machine stop modes.
:param mode: mode indicates a type of stop operation - reboot, suspend,
shutdown or power-off. Possible values include: 'reboot', 'suspend',
'shutdown', 'poweroff'
:type mode: str or ~azure.mgmt.vmwarecloudsimple.models.StopMode
"""
_attribute_map = {
'mode': {'key': 'mode', 'type': 'StopMode'},
}
def __init__(self, **kwargs):
super(VirtualMachineStopMode, self).__init__(**kwargs)
self.mode = kwargs.get('mode', None)

Просмотреть файл

@ -1,30 +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.serialization import Model
class VirtualMachineStopMode(Model):
"""List of virtual machine stop modes.
:param mode: mode indicates a type of stop operation - reboot, suspend,
shutdown or power-off. Possible values include: 'reboot', 'suspend',
'shutdown', 'poweroff'
:type mode: str or ~azure.mgmt.vmwarecloudsimple.models.StopMode
"""
_attribute_map = {
'mode': {'key': 'mode', 'type': 'StopMode'},
}
def __init__(self, *, mode=None, **kwargs) -> None:
super(VirtualMachineStopMode, self).__init__(**kwargs)
self.mode = mode

Просмотреть файл

@ -1,112 +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.serialization import Model
class VirtualMachineTemplate(Model):
"""Virtual machine template model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: virtual machine template id (privateCloudId:vsphereId)
:vartype id: str
:param location: Azure region
:type location: str
:ivar name: {virtualMachineTemplateName}
:vartype name: str
:param amount_of_ram: The amount of memory
:type amount_of_ram: int
:param controllers: The list of Virtual Disk Controllers
:type controllers:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualDiskController]
:param description: The description of Virtual Machine Template
:type description: str
:param disks: The list of Virtual Disks
: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
:param nics: The list of Virtual NICs
:type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic]
:param number_of_cores: The number of CPU cores
:type number_of_cores: int
:param path: path to folder
:type path: str
:param private_cloud_id: Required. The Private Cloud Id
:type private_cloud_id: str
:param v_sphere_networks: The list of VSphere networks
:type v_sphere_networks: list[str]
:param v_sphere_tags: The tags from VSphere
:type v_sphere_tags: list[str]
:ivar vmwaretools: The VMware tools version
:vartype vmwaretools: str
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'guest_os': {'required': True},
'guest_os_type': {'required': True},
'private_cloud_id': {'required': True},
'vmwaretools': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'amount_of_ram': {'key': 'properties.amountOfRam', 'type': 'int'},
'controllers': {'key': 'properties.controllers', 'type': '[VirtualDiskController]'},
'description': {'key': 'properties.description', 'type': 'str'},
'disks': {'key': 'properties.disks', 'type': '[VirtualDisk]'},
'expose_to_guest_vm': {'key': 'properties.exposeToGuestVM', 'type': 'bool'},
'guest_os': {'key': 'properties.guestOS', 'type': 'str'},
'guest_os_type': {'key': 'properties.guestOSType', 'type': 'str'},
'nics': {'key': 'properties.nics', 'type': '[VirtualNic]'},
'number_of_cores': {'key': 'properties.numberOfCores', 'type': 'int'},
'path': {'key': 'properties.path', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'v_sphere_networks': {'key': 'properties.vSphereNetworks', 'type': '[str]'},
'v_sphere_tags': {'key': 'properties.vSphereTags', 'type': '[str]'},
'vmwaretools': {'key': 'properties.vmwaretools', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
super(VirtualMachineTemplate, self).__init__(**kwargs)
self.id = None
self.location = kwargs.get('location', None)
self.name = None
self.amount_of_ram = kwargs.get('amount_of_ram', None)
self.controllers = kwargs.get('controllers', None)
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.nics = kwargs.get('nics', None)
self.number_of_cores = kwargs.get('number_of_cores', None)
self.path = kwargs.get('path', None)
self.private_cloud_id = kwargs.get('private_cloud_id', None)
self.v_sphere_networks = kwargs.get('v_sphere_networks', None)
self.v_sphere_tags = kwargs.get('v_sphere_tags', None)
self.vmwaretools = None
self.type = None

Просмотреть файл

@ -1,27 +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.paging import Paged
class VirtualMachineTemplatePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualMachineTemplate <azure.mgmt.vmwarecloudsimple.models.VirtualMachineTemplate>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualMachineTemplate]'}
}
def __init__(self, *args, **kwargs):
super(VirtualMachineTemplatePaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,112 +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.serialization import Model
class VirtualMachineTemplate(Model):
"""Virtual machine template model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: virtual machine template id (privateCloudId:vsphereId)
:vartype id: str
:param location: Azure region
:type location: str
:ivar name: {virtualMachineTemplateName}
:vartype name: str
:param amount_of_ram: The amount of memory
:type amount_of_ram: int
:param controllers: The list of Virtual Disk Controllers
:type controllers:
list[~azure.mgmt.vmwarecloudsimple.models.VirtualDiskController]
:param description: The description of Virtual Machine Template
:type description: str
:param disks: The list of Virtual Disks
: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
:param nics: The list of Virtual NICs
:type nics: list[~azure.mgmt.vmwarecloudsimple.models.VirtualNic]
:param number_of_cores: The number of CPU cores
:type number_of_cores: int
:param path: path to folder
:type path: str
:param private_cloud_id: Required. The Private Cloud Id
:type private_cloud_id: str
:param v_sphere_networks: The list of VSphere networks
:type v_sphere_networks: list[str]
:param v_sphere_tags: The tags from VSphere
:type v_sphere_tags: list[str]
:ivar vmwaretools: The VMware tools version
:vartype vmwaretools: str
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'guest_os': {'required': True},
'guest_os_type': {'required': True},
'private_cloud_id': {'required': True},
'vmwaretools': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'amount_of_ram': {'key': 'properties.amountOfRam', 'type': 'int'},
'controllers': {'key': 'properties.controllers', 'type': '[VirtualDiskController]'},
'description': {'key': 'properties.description', 'type': 'str'},
'disks': {'key': 'properties.disks', 'type': '[VirtualDisk]'},
'expose_to_guest_vm': {'key': 'properties.exposeToGuestVM', 'type': 'bool'},
'guest_os': {'key': 'properties.guestOS', 'type': 'str'},
'guest_os_type': {'key': 'properties.guestOSType', 'type': 'str'},
'nics': {'key': 'properties.nics', 'type': '[VirtualNic]'},
'number_of_cores': {'key': 'properties.numberOfCores', 'type': 'int'},
'path': {'key': 'properties.path', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'v_sphere_networks': {'key': 'properties.vSphereNetworks', 'type': '[str]'},
'v_sphere_tags': {'key': 'properties.vSphereTags', 'type': '[str]'},
'vmwaretools': {'key': 'properties.vmwaretools', 'type': 'str'},
'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:
super(VirtualMachineTemplate, self).__init__(**kwargs)
self.id = None
self.location = location
self.name = None
self.amount_of_ram = amount_of_ram
self.controllers = controllers
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.nics = nics
self.number_of_cores = number_of_cores
self.path = path
self.private_cloud_id = private_cloud_id
self.v_sphere_networks = v_sphere_networks
self.v_sphere_tags = v_sphere_tags
self.vmwaretools = None
self.type = None

Просмотреть файл

@ -1,61 +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.serialization import Model
class VirtualNetwork(Model):
"""Virtual network model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar assignable: can be used in vm creation/deletion
:vartype assignable: bool
:param id: Required. virtual network id (privateCloudId:vsphereId)
:type id: str
:param location: Azure region
:type location: str
:ivar name: {VirtualNetworkName}
:vartype name: str
:ivar private_cloud_id: The Private Cloud id
:vartype private_cloud_id: str
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'assignable': {'readonly': True},
'id': {'required': True},
'name': {'readonly': True},
'private_cloud_id': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'assignable': {'key': 'assignable', 'type': 'bool'},
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
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.name = None
self.private_cloud_id = None
self.type = None

Просмотреть файл

@ -1,27 +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.paging import Paged
class VirtualNetworkPaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualNetwork <azure.mgmt.vmwarecloudsimple.models.VirtualNetwork>` object
"""
_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualNetwork]'}
}
def __init__(self, *args, **kwargs):
super(VirtualNetworkPaged, self).__init__(*args, **kwargs)

Просмотреть файл

@ -1,61 +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.serialization import Model
class VirtualNetwork(Model):
"""Virtual network model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar assignable: can be used in vm creation/deletion
:vartype assignable: bool
:param id: Required. virtual network id (privateCloudId:vsphereId)
:type id: str
:param location: Azure region
:type location: str
:ivar name: {VirtualNetworkName}
:vartype name: str
:ivar private_cloud_id: The Private Cloud id
:vartype private_cloud_id: str
:ivar type: {resourceProviderNamespace}/{resourceType}
:vartype type: str
"""
_validation = {
'assignable': {'readonly': True},
'id': {'required': True},
'name': {'readonly': True},
'private_cloud_id': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'assignable': {'key': 'assignable', 'type': 'bool'},
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'private_cloud_id': {'key': 'properties.privateCloudId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, *, id: str, location: str=None, **kwargs) -> None:
super(VirtualNetwork, self).__init__(**kwargs)
self.assignable = None
self.id = id
self.location = location
self.name = None
self.private_cloud_id = None
self.type = None

Просмотреть файл

@ -1,63 +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.serialization import Model
class VirtualNic(Model):
"""Virtual NIC model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param ip_addresses: NIC ip address
:type ip_addresses: list[str]
:param mac_address: NIC MAC address
:type mac_address: str
:param network: The list of Virtual Networks
:type network: ~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork
:param nic_type: Required. NIC type. Possible values include: 'E1000',
'E1000E', 'PCNET32', 'VMXNET', 'VMXNET2', 'VMXNET3'
:type nic_type: str or ~azure.mgmt.vmwarecloudsimple.models.NICType
:param power_on_boot: Is NIC powered on/off on boot
:type power_on_boot: bool
:param virtual_nic_id: NIC id
:type virtual_nic_id: str
:ivar virtual_nic_name: NIC name
:vartype virtual_nic_name: str
"""
_validation = {
'nic_type': {'required': True},
'virtual_nic_name': {'readonly': True},
}
_attribute_map = {
'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'},
'mac_address': {'key': 'macAddress', 'type': 'str'},
'network': {'key': 'network', 'type': 'VirtualNetwork'},
'nic_type': {'key': 'nicType', 'type': 'NICType'},
'power_on_boot': {'key': 'powerOnBoot', 'type': 'bool'},
'virtual_nic_id': {'key': 'virtualNicId', 'type': 'str'},
'virtual_nic_name': {'key': 'virtualNicName', 'type': 'str'},
}
def __init__(self, **kwargs):
super(VirtualNic, self).__init__(**kwargs)
self.ip_addresses = kwargs.get('ip_addresses', None)
self.mac_address = kwargs.get('mac_address', None)
self.network = kwargs.get('network', None)
self.nic_type = kwargs.get('nic_type', None)
self.power_on_boot = kwargs.get('power_on_boot', None)
self.virtual_nic_id = kwargs.get('virtual_nic_id', None)
self.virtual_nic_name = None

Просмотреть файл

@ -1,63 +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.serialization import Model
class VirtualNic(Model):
"""Virtual NIC model.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param ip_addresses: NIC ip address
:type ip_addresses: list[str]
:param mac_address: NIC MAC address
:type mac_address: str
:param network: The list of Virtual Networks
:type network: ~azure.mgmt.vmwarecloudsimple.models.VirtualNetwork
:param nic_type: Required. NIC type. Possible values include: 'E1000',
'E1000E', 'PCNET32', 'VMXNET', 'VMXNET2', 'VMXNET3'
:type nic_type: str or ~azure.mgmt.vmwarecloudsimple.models.NICType
:param power_on_boot: Is NIC powered on/off on boot
:type power_on_boot: bool
:param virtual_nic_id: NIC id
:type virtual_nic_id: str
:ivar virtual_nic_name: NIC name
:vartype virtual_nic_name: str
"""
_validation = {
'nic_type': {'required': True},
'virtual_nic_name': {'readonly': True},
}
_attribute_map = {
'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'},
'mac_address': {'key': 'macAddress', 'type': 'str'},
'network': {'key': 'network', 'type': 'VirtualNetwork'},
'nic_type': {'key': 'nicType', 'type': 'NICType'},
'power_on_boot': {'key': 'powerOnBoot', 'type': 'bool'},
'virtual_nic_id': {'key': 'virtualNicId', 'type': 'str'},
'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:
super(VirtualNic, self).__init__(**kwargs)
self.ip_addresses = ip_addresses
self.mac_address = mac_address
self.network = network
self.nic_type = nic_type
self.power_on_boot = power_on_boot
self.virtual_nic_id = virtual_nic_id
self.virtual_nic_name = None

Просмотреть файл

@ -9,32 +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 ._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',
'Operations',
'DedicatedCloudNodesOperations',
'DedicatedCloudServicesOperations',
'SkusAvailabilityOperations',
'PrivateCloudsOperations',
'ResourcePoolsOperations',
'VirtualMachineTemplatesOperations',
'VirtualNetworksOperations',
'UsagesOperations',
'VirtualMachinesOperations',
]

Просмотреть файл

@ -17,8 +17,10 @@ from msrestazure.polling.arm_polling import ARMPolling
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.
:param client: Client for service requests.
:param config: Configuration of service client.
@ -61,8 +63,7 @@ class DedicatedCloudNodeOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_by_subscription.metadata['url']
@ -97,6 +98,11 @@ class DedicatedCloudNodeOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -105,12 +111,10 @@ class DedicatedCloudNodeOperations(object):
return response
# Deserialize response
deserialized = models.DedicatedCloudNodePaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.DedicatedCloudNodePaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.DedicatedCloudNodePaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes'}
@ -140,8 +144,7 @@ class DedicatedCloudNodeOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url']
@ -177,6 +180,11 @@ class DedicatedCloudNodeOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -185,12 +193,10 @@ class DedicatedCloudNodeOperations(object):
return response
# Deserialize response
deserialized = models.DedicatedCloudNodePaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.DedicatedCloudNodePaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.DedicatedCloudNodePaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes'}
@ -227,6 +233,7 @@ class DedicatedCloudNodeOperations(object):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
@ -246,7 +253,6 @@ class DedicatedCloudNodeOperations(object):
raise models.CSRPErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DedicatedCloudNode', response)
@ -491,7 +497,6 @@ class DedicatedCloudNodeOperations(object):
raise models.CSRPErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DedicatedCloudNode', response)

Просмотреть файл

@ -17,8 +17,10 @@ from msrestazure.polling.arm_polling import ARMPolling
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.
:param client: Client for service requests.
:param config: Configuration of service client.
@ -62,8 +64,7 @@ class DedicatedCloudServiceOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_by_subscription.metadata['url']
@ -98,6 +99,11 @@ class DedicatedCloudServiceOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -106,12 +112,10 @@ class DedicatedCloudServiceOperations(object):
return response
# Deserialize response
deserialized = models.DedicatedCloudServicePaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.DedicatedCloudServicePaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.DedicatedCloudServicePaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices'}
@ -120,7 +124,7 @@ class DedicatedCloudServiceOperations(object):
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
@ -141,8 +145,7 @@ class DedicatedCloudServiceOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url']
@ -178,6 +181,11 @@ class DedicatedCloudServiceOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -186,12 +194,10 @@ class DedicatedCloudServiceOperations(object):
return response
# Deserialize response
deserialized = models.DedicatedCloudServicePaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.DedicatedCloudServicePaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.DedicatedCloudServicePaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices'}
@ -248,7 +254,6 @@ class DedicatedCloudServiceOperations(object):
raise models.CSRPErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DedicatedCloudService', response)
@ -319,7 +324,6 @@ class DedicatedCloudServiceOperations(object):
raise models.CSRPErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DedicatedCloudService', response)
@ -477,7 +481,6 @@ class DedicatedCloudServiceOperations(object):
raise models.CSRPErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DedicatedCloudService', response)

Просмотреть файл

@ -0,0 +1,172 @@
# 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 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.
: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 list(
self, custom_headers=None, raw=False, **operation_config):
"""Implements list of available operations.
Return list of operations.
: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<msrest:optionsforoperations>`.
:return: An iterator like instance of AvailableOperation
:rtype:
~azure.mgmt.vmwarecloudsimple.models.AvailableOperationPaged[~azure.mgmt.vmwarecloudsimple.models.AvailableOperation]
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
else:
url = next_link
query_parameters = {}
# 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)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.CSRPErrorException(self._deserialize, response)
return response
# Deserialize response
header_dict = None
if raw:
header_dict = {}
deserialized = models.AvailableOperationPaged(internal_paging, self._deserialize.dependencies, header_dict)
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<msrest:optionsforoperations>`.
:return: OperationResource or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.vmwarecloudsimple.models.OperationResource or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.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}'}

Просмотреть файл

@ -15,8 +15,10 @@ from msrest.pipeline import ClientRawResponse
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.
:param client: Client for service requests.
:param config: Configuration of service client.
@ -37,11 +39,13 @@ class PrivateCloudByRegionOperations(object):
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
@ -53,14 +57,13 @@ class PrivateCloudByRegionOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
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)
@ -84,6 +87,11 @@ class PrivateCloudByRegionOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -92,12 +100,72 @@ class PrivateCloudByRegionOperations(object):
return response
# Deserialize response
deserialized = models.PrivateCloudPaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.PrivateCloudPaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.PrivateCloudPaged(internal_paging, self._deserialize.dependencies, header_dict)
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<msrest:optionsforoperations>`.
:return: PrivateCloud or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.vmwarecloudsimple.models.PrivateCloud or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.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}'}

Просмотреть файл

@ -15,8 +15,10 @@ from msrest.pipeline import ClientRawResponse
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.
:param client: Client for service requests.
:param config: Configuration of service client.
@ -37,11 +39,13 @@ class ResourcePoolsByPCOperations(object):
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
@ -55,14 +59,13 @@ class ResourcePoolsByPCOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
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)
@ -87,6 +90,11 @@ class ResourcePoolsByPCOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -95,12 +103,75 @@ class ResourcePoolsByPCOperations(object):
return response
# Deserialize response
deserialized = models.ResourcePoolPaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.ResourcePoolPaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.ResourcePoolPaged(internal_paging, self._deserialize.dependencies, header_dict)
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<msrest:optionsforoperations>`.
:return: ResourcePool or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.vmwarecloudsimple.models.ResourcePool or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.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}'}

Просмотреть файл

@ -15,8 +15,10 @@ from msrest.pipeline import ClientRawResponse
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.
:param client: Client for service requests.
:param config: Configuration of service client.
@ -37,11 +39,13 @@ class SkusAvailabilityWithinRegionOperations(object):
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
@ -56,14 +60,13 @@ class SkusAvailabilityWithinRegionOperations(object):
:raises:
:class:`CSRPErrorException<azure.mgmt.vmwarecloudsimple.models.CSRPErrorException>`
"""
def internal_paging(next_link=None, raw=False):
def prepare_request(next_link=None):
if not next_link:
# Construct URL
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)
@ -89,6 +92,11 @@ class SkusAvailabilityWithinRegionOperations(object):
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
def internal_paging(next_link=None):
request = prepare_request(next_link)
response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
@ -97,12 +105,10 @@ class SkusAvailabilityWithinRegionOperations(object):
return response
# Deserialize response
deserialized = models.SkuAvailabilityPaged(internal_paging, self._deserialize.dependencies)
header_dict = None
if raw:
header_dict = {}
client_raw_response = models.SkuAvailabilityPaged(internal_paging, self._deserialize.dependencies, header_dict)
return client_raw_response
deserialized = models.SkuAvailabilityPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/availabilities'}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше