Revert "Changing namespace to vmware-cs"

This reverts commit fc4817a0d9.
This commit is contained in:
Shivam Mittal 2020-02-05 18:57:42 +05:30
Родитель fc4817a0d9
Коммит dfcde83b09
3 изменённых файлов: 82 добавлений и 82 удалений

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

@ -9,17 +9,17 @@ This file contains the help strings (summaries and examples) for all commands an
from knack.help_files import helps # pylint: disable=unused-import
helps['vmware-cs'] = """
helps['vmware'] = """
type: group
short-summary: Manage Azure VMware Solution by CloudSimple.
short-summary: Manage Azure VMware Solution.
"""
helps['vmware-cs vm'] = """
helps['vmware vm'] = """
type: group
short-summary: Manage VMware virtual machines.
"""
helps['vmware-cs vm create'] = """
helps['vmware vm create'] = """
type: command
short-summary: Create a VMware virtual machine.
@ -47,278 +47,278 @@ helps['vmware-cs vm create'] = """
examples:
- name: Creating a VM with default parameters from the vm template.
text: >
az vmware-cs vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate
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-cs vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --nic name=NicNameWouldBeAssigned virtual-network=MyVirtualNetwork adapter=VMXNET3 power-on-boot=True
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-cs vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --cores 2 --nic name="Network adapter 1" adapter=E1000E
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-cs 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
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-cs vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --disk name=DiskNameWouldBeAssigned controller=1000 mode=persistent size=41943040
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-cs 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
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 vm list'] = """
helps['vmware vm list'] = """
type: command
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-cs vm list
az vmware vm list
- name: List details of VMware VMs in a particular resource group.
text: >
az vmware-cs vm list -g MyResourceGroup
az vmware vm list -g MyResourceGroup
"""
helps['vmware-cs vm delete'] = """
helps['vmware vm delete'] = """
type: command
short-summary: Delete a VMware virtual machine.
examples:
- name: Delete a VMware VM.
text: >
az vmware-cs vm delete -n MyVm -g MyResourceGroup
az vmware vm delete -n MyVm -g MyResourceGroup
"""
helps['vmware-cs vm show'] = """
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-cs vm show -n MyVm -g MyResourceGroup
az vmware vm show -n MyVm -g MyResourceGroup
"""
helps['vmware-cs vm start'] = """
helps['vmware vm start'] = """
type: command
short-summary: Start a VMware virtual machine.
examples:
- name: Start a VMware VM.
text: >
az vmware-cs vm start -n MyVm -g MyResourceGroup
az vmware vm start -n MyVm -g MyResourceGroup
"""
helps['vmware-cs vm stop'] = """
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-cs vm stop -n MyVm -g MyResourceGroup --mode poweroff
az vmware vm stop -n MyVm -g MyResourceGroup --mode poweroff
- name: Restart a VMware VM.
text: >
az vmware-cs vm stop -n MyVm -g MyResourceGroup --mode reboot
az vmware vm stop -n MyVm -g MyResourceGroup --mode reboot
"""
helps['vmware-cs vm update'] = """
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-cs vm update -n MyVm -g MyResourceGroup --set tags.tagName=tagValue
az vmware vm update -n MyVm -g MyResourceGroup --set tags.tagName=tagValue
- name: Remove a tag.
text: >
az vmware-cs vm update -n MyVm -g MyResourceGroup --remove tags.tagName
az vmware vm update -n MyVm -g MyResourceGroup --remove tags.tagName
"""
helps['vmware-cs vm nic'] = """
helps['vmware vm nic'] = """
type: group
short-summary: Manage VMware virtual machine's Network Interface Cards.
"""
helps['vmware-cs vm nic add'] = """
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-cs vm nic add --vm-name MyVm -g MyResourceGroup --virtual-network MyVirtualNetwork
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-cs vm nic add --vm-name MyVm -g MyResourceGroup --virtual-network MyVirtualNetwork --adapter E1000E --power-on-boot true
az vmware vm nic add --vm-name MyVm -g MyResourceGroup --virtual-network MyVirtualNetwork --adapter E1000E --power-on-boot true
"""
helps['vmware-cs vm nic list'] = """
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-cs vm nic list --vm-name MyVm -g MyResourceGroup
az vmware vm nic list --vm-name MyVm -g MyResourceGroup
"""
helps['vmware-cs vm nic show'] = """
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-cs vm nic show --vm-name MyVm -g MyResourceGroup -n "My NIC Name"
az vmware vm nic show --vm-name MyVm -g MyResourceGroup -n "My NIC Name"
"""
helps['vmware-cs vm nic delete'] = """
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-cs vm nic delete --vm-name MyVm -g MyResourceGroup --nics "My NIC Name 1" "My NIC Name 2"
az vmware vm nic delete --vm-name MyVm -g MyResourceGroup --nics "My NIC Name 1" "My NIC Name 2"
"""
helps['vmware-cs vm disk'] = """
helps['vmware vm disk'] = """
type: group
short-summary: Manage VMware virtual machine's disks.
"""
helps['vmware-cs vm disk add'] = """
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-cs vm disk add --vm-name MyVm -g MyResourceGroup
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-cs vm disk add --vm-name MyVm -g MyResourceGroup --controller 15000 --size 67108864
az vmware vm disk add --vm-name MyVm -g MyResourceGroup --controller 15000 --size 67108864
"""
helps['vmware-cs vm disk list'] = """
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-cs vm disk list --vm-name MyVm -g MyResourceGroup
az vmware vm disk list --vm-name MyVm -g MyResourceGroup
"""
helps['vmware-cs vm disk show'] = """
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-cs vm disk show --vm-name MyVm -g MyResourceGroup -n "My Disk Name"
az vmware vm disk show --vm-name MyVm -g MyResourceGroup -n "My Disk Name"
"""
helps['vmware-cs vm disk delete'] = """
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-cs vm disk delete --vm-name MyVm -g MyResourceGroup --disks "My Disk Name 1" "My Disk Name 2"
az vmware vm disk delete --vm-name MyVm -g MyResourceGroup --disks "My Disk Name 1" "My Disk Name 2"
"""
helps['vmware-cs vm-template'] = """
helps['vmware vm-template'] = """
type: group
short-summary: Manage VMware virtual machine templates.
"""
helps['vmware-cs vm-template list'] = """
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-cs vm-template list -p MyPrivateCloud -r MyResourcePool --location eastus
az vmware vm-template list -p MyPrivateCloud -r MyResourcePool --location eastus
"""
helps['vmware-cs vm-template show'] = """
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-cs vm-template show -n MyVmTemplate -p MyPrivateCloud --location eastus
az vmware vm-template show -n MyVmTemplate -p MyPrivateCloud --location eastus
"""
helps['vmware-cs virtual-network'] = """
helps['vmware virtual-network'] = """
type: group
short-summary: Manage virtual networks.
"""
helps['vmware-cs virtual-network list'] = """
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-cs virtual-network list -p MyPrivateCloud -r MyResourcePool --location eastus
az vmware virtual-network list -p MyPrivateCloud -r MyResourcePool --location eastus
"""
helps['vmware-cs virtual-network show'] = """
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-cs virtual-network show -n MyVirtualNetwork -p MyPrivateCloud --location eastus
az vmware virtual-network show -n MyVirtualNetwork -p MyPrivateCloud --location eastus
"""
helps['vmware-cs private-cloud'] = """
helps['vmware private-cloud'] = """
type: group
short-summary: Manage VMware private clouds.
"""
helps['vmware-cs private-cloud list'] = """
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-cs private-cloud list --location eastus
az vmware private-cloud list --location eastus
"""
helps['vmware-cs private-cloud show'] = """
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-cs private-cloud show -n MyPrivateCloud --location eastus
az vmware private-cloud show -n MyPrivateCloud --location eastus
"""
helps['vmware-cs resource-pool'] = """
helps['vmware resource-pool'] = """
type: group
short-summary: Manage VMware resource pools.
"""
helps['vmware-cs resource-pool list'] = """
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-cs resource-pool list -p MyPrivateCloud --location eastus
az vmware resource-pool list -p MyPrivateCloud --location eastus
"""
helps['vmware-cs resource-pool show'] = """
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-cs resource-pool show -n MyResourcePool -p MyPrivateCloud --location eastus
az vmware resource-pool show -n MyResourcePool -p MyPrivateCloud --location eastus
"""

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

@ -35,13 +35,13 @@ def load_arguments(self, _):
Load argument method of command loader.
"""
with self.argument_context('vmware-cs') as c:
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.")
with self.argument_context('vmware-cs vm') as c:
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,
@ -74,7 +74,7 @@ def load_arguments(self, _):
c.argument('disks', options_list=['--disk'], action=AddDiskAction, arg_group='Storage', nargs='+')
with self.argument_context('vmware-cs vm nic') as c:
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,
@ -92,7 +92,7 @@ def load_arguments(self, _):
c.argument('nic_names', options_list=['--nics'], nargs='+', arg_group='Network',
help="Names of NICs.")
with self.argument_context('vmware-cs vm disk') as c:
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,
@ -110,7 +110,7 @@ def load_arguments(self, _):
c.argument('disk_names', options_list=['--disks'], nargs='+', arg_group='Storage',
help="Names of disks.")
with self.argument_context('vmware-cs vm-template') as c:
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'),
@ -126,7 +126,7 @@ def load_arguments(self, _):
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")
with self.argument_context('vmware-cs virtual-network') as c:
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'),
@ -141,7 +141,7 @@ def load_arguments(self, _):
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")
with self.argument_context('vmware-cs resource-pool') as c:
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'),
@ -153,7 +153,7 @@ def load_arguments(self, _):
c.argument('location', get_location_type(self.cli_ctx),
help="Region in which the private cloud is present.")
with self.argument_context('vmware-cs private-cloud') as c:
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'),

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

@ -27,10 +27,10 @@ def load_command_table(self, _):
custom_tmpl = 'azext_vmware_cs.custom#{}'
custom_type = CliCommandType(operations_tmpl=custom_tmpl)
with self.command_group('vmware-cs vm', client_factory=cf_vmware_cs) as g:
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 vm', client_factory=cf_virtual_machine) as g:
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',
@ -39,33 +39,33 @@ def load_command_table(self, _):
g.custom_command('start', 'start_vm')
g.custom_command('stop', 'stop_vm')
with self.command_group('vmware-cs vm disk', client_factory=cf_virtual_machine) as g:
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 vm nic', client_factory=cf_virtual_machine) as g:
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-cs vm-template', client_factory=cf_virtual_machine_template) as g:
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-cs virtual-network', client_factory=cf_virtual_network) as g:
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-cs resource-pool', client_factory=cf_resource_pool) as g:
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-cs private-cloud', client_factory=cf_private_cloud) as g:
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-cs', is_preview=True):
with self.command_group('vmware', is_preview=True):
pass