Skip to content

Commit

Permalink
Merge pull request Azure#160 from yanzhudd/migrate_vm
Browse files Browse the repository at this point in the history
Add command models for compute
  • Loading branch information
yanzhudd authored Mar 28, 2023
2 parents 61ed2fc + 457dcfb commit 706aa09
Show file tree
Hide file tree
Showing 31 changed files with 1,467 additions and 1,534 deletions.
289 changes: 287 additions & 2 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -56165,6 +56165,138 @@
},
"vm": {
"commandGroups": {
"extension": {
"commandGroups": {
"image": {
"commands": {
"list-names": {
"help": {
"short": "List the names of available extensions."
},
"names": [
"vm",
"extension",
"image",
"list-names"
],
"versions": [
{
"examples": [
{
"commands": [
"vm extension image list-names --publisher Microsoft.Azure.Extensions -l westus --query \"[?starts_with(name, 'Docker')]\""
],
"name": "Find Docker extensions by publisher and location."
},
{
"commands": [
"vm extension image list-names --publisher Microsoft.Azure.Extensions -l westus --query \"[?starts_with(name, 'Custom')]\""
],
"name": "Find CustomScript extensions by publisher and location."
}
],
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/providers/microsoft.compute/locations/{}/publishers/{}/artifacttypes/vmextension/types",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"list-versions": {
"help": {
"short": "List the versions for available extensions."
},
"names": [
"vm",
"extension",
"image",
"list-versions"
],
"versions": [
{
"examples": [
{
"commands": [
"vm extension image list-versions --publisher Microsoft.Azure.Extensions -l westus -n DockerExtension -o table"
],
"name": "Find the available versions for the Docker extension."
}
],
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/providers/microsoft.compute/locations/{}/publishers/{}/artifacttypes/vmextension/types/{}/versions",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"show": {
"help": {
"short": "Display information for an extension."
},
"names": [
"vm",
"extension",
"image",
"show"
],
"versions": [
{
"examples": [
{
"commands": [
"vm extension image show -l westus -n CustomScript --publisher Microsoft.Azure.Extensions --version 2.0.2"
],
"name": "Show the CustomScript extension version 2.0.2."
},
{
"commands": [
"vm extension image list-versions --publisher Microsoft.Azure.Extensions -l westus -n DockerExtension --query \"[].name\" -o tsv | sort | tail -n 1",
"vm extension image show -l westus \\\\ --publisher Microsoft.Azure.Extensions -n DockerExtension --version LatestVersion"
],
"name": "Show the latest version of the Docker extension."
}
],
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/providers/microsoft.compute/locations/{}/publishers/{}/artifacttypes/vmextension/types/{}/versions/{}",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
}
},
"help": {
"short": "Find the available VM extensions for a subscription and region."
},
"names": [
"vm",
"extension",
"image"
]
}
},
"help": {
"lines": [
"Extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. For example, if a virtual machine requires software installation, anti-virus protection, or Docker configuration, a VM extension can be used to complete these tasks. Extensions can be bundled with a new virtual machine deployment or run against any existing system."
],
"short": "Manage extensions on VMs."
},
"names": [
"vm",
"extension"
]
},
"host": {
"commandGroups": {
"group": {
Expand Down Expand Up @@ -56319,6 +56451,159 @@
]
}
},
"commands": {
"create": {
"help": {
"short": "Create a dedicated host."
},
"names": [
"vm",
"host",
"create"
],
"versions": [
{
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/hostgroups/{}/hosts/{}",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"delete": {
"help": {
"short": "Delete a dedicated host."
},
"names": [
"vm",
"host",
"delete"
],
"versions": [
{
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/hostgroups/{}/hosts/{}",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"list": {
"help": {
"short": "List dedicated hosts."
},
"names": [
"vm",
"host",
"list"
],
"versions": [
{
"examples": [
{
"commands": [
"vm host list --host-group MyHostGroup --resource-group MyResourceGroup"
],
"name": "List dedicated hosts."
}
],
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/hostgroups/{}/hosts",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"restart": {
"help": {
"lines": [
"The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details."
],
"short": "Restart the dedicated host."
},
"names": [
"vm",
"host",
"restart"
],
"versions": [
{
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/hostgroups/{}/hosts/{}/restart",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"show": {
"help": {
"short": "Get the details of a dedicated host."
},
"names": [
"vm",
"host",
"show"
],
"versions": [
{
"examples": [
{
"commands": [
"vm host show --host-group MyHostGroup --name MyDedicatedHost --resource-group MyResourceGroup"
],
"name": "Get the details of a dedicated host."
}
],
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/hostgroups/{}/hosts/{}",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
},
"update": {
"help": {
"short": "Update a dedicated host."
},
"names": [
"vm",
"host",
"update"
],
"versions": [
{
"name": "2022-11-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.compute/hostgroups/{}/hosts/{}",
"plane": "mgmt-plane",
"version": "2022-11-01"
}
]
}
]
}
},
"help": {
"short": "Manage Dedicated Hosts for Virtual Machines"
},
Expand Down Expand Up @@ -56544,7 +56829,7 @@
"commands": {
"cancel": {
"help": {
"short": "Cancels the current virtual machine scale set rolling upgrade."
"short": "Cancel the current virtual machine scale set rolling upgrade."
},
"names": [
"vmss",
Expand Down Expand Up @@ -56588,7 +56873,7 @@
},
"start": {
"help": {
"short": "Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected."
"short": "Start a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected."
},
"names": [
"vmss",
Expand Down
21 changes: 21 additions & 0 deletions Commands/vm/extension/image/_list-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# [Command] _vm extension image list-names_

List the names of available extensions.

## Versions

### [2022-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2xvY2F0aW9ucy97fS9wdWJsaXNoZXJzL3t9L2FydGlmYWN0dHlwZXMvdm1leHRlbnNpb24vdHlwZXM=/2022-11-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/providers/microsoft.compute/locations/{}/publishers/{}/artifacttypes/vmextension/types 2022-11-01 -->

#### examples

- Find Docker extensions by publisher and location.
```bash
vm extension image list-names --publisher Microsoft.Azure.Extensions -l westus --query "[?starts_with(name, 'Docker')]"
```

- Find CustomScript extensions by publisher and location.
```bash
vm extension image list-names --publisher Microsoft.Azure.Extensions -l westus --query "[?starts_with(name, 'Custom')]"
```
16 changes: 16 additions & 0 deletions Commands/vm/extension/image/_list-versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _vm extension image list-versions_

List the versions for available extensions.

## Versions

### [2022-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2xvY2F0aW9ucy97fS9wdWJsaXNoZXJzL3t9L2FydGlmYWN0dHlwZXMvdm1leHRlbnNpb24vdHlwZXMve30vdmVyc2lvbnM=/2022-11-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/providers/microsoft.compute/locations/{}/publishers/{}/artifacttypes/vmextension/types/{}/versions 2022-11-01 -->

#### examples

- Find the available versions for the Docker extension.
```bash
vm extension image list-versions --publisher Microsoft.Azure.Extensions -l westus -n DockerExtension -o table
```
22 changes: 22 additions & 0 deletions Commands/vm/extension/image/_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# [Command] _vm extension image show_

Display information for an extension.

## Versions

### [2022-11-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb21wdXRlL2xvY2F0aW9ucy97fS9wdWJsaXNoZXJzL3t9L2FydGlmYWN0dHlwZXMvdm1leHRlbnNpb24vdHlwZXMve30vdmVyc2lvbnMve30=/2022-11-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/providers/microsoft.compute/locations/{}/publishers/{}/artifacttypes/vmextension/types/{}/versions/{} 2022-11-01 -->

#### examples

- Show the CustomScript extension version 2.0.2.
```bash
vm extension image show -l westus -n CustomScript --publisher Microsoft.Azure.Extensions --version 2.0.2
```

- Show the latest version of the Docker extension.
```bash
vm extension image list-versions --publisher Microsoft.Azure.Extensions -l westus -n DockerExtension --query "[].name" -o tsv | sort | tail -n 1
vm extension image show -l westus \\ --publisher Microsoft.Azure.Extensions -n DockerExtension --version LatestVersion
```
14 changes: 14 additions & 0 deletions Commands/vm/extension/image/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# [Group] _vm extension image_

Find the available VM extensions for a subscription and region.

## Commands

- [list-names](/Commands/vm/extension/image/_list-names.md)
: List the names of available extensions.

- [list-versions](/Commands/vm/extension/image/_list-versions.md)
: List the versions for available extensions.

- [show](/Commands/vm/extension/image/_show.md)
: Display information for an extension.
Loading

0 comments on commit 706aa09

Please sign in to comment.