Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding required aaz changes for reimage NVA #669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Commands/network/virtual-appliance/_reimage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# [Command] _network virtual-appliance reimage_

Reimages one VM belonging to the specified Network Virtual Appliance.

## Versions

### [2024-07-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/reimage 2024-07-01 -->

#### examples

- Reimages Specific NetworkVirtualAppliance VMs in VM Scale Set
```bash
network virtual-appliance reimage--resource-group rg1 --network-virtual-appliance-name nvaName --subscription subscriptionId --instance-ids 0
```
3 changes: 3 additions & 0 deletions Commands/network/virtual-appliance/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Manage Azure Network Virtual Appliance.
- [list](/Commands/network/virtual-appliance/_list.md)
: List all Azure network virtual appliance.

- [reimage](/Commands/network/virtual-appliance/_reimage.md)
: Reimages one VM belonging to the specified Network Virtual Appliance.

- [restart](/Commands/network/virtual-appliance/_restart.md)
: Restarts one or more VMs belonging to the specified Network Virtual Appliance.

Expand Down
30 changes: 30 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -139727,6 +139727,36 @@
}
]
},
"reimage": {
"help": {
"short": "Reimages one VM belonging to the specified Network Virtual Appliance."
},
"names": [
"network",
"virtual-appliance",
"reimage"
],
"versions": [
{
"examples": [
{
"commands": [
"network virtual-appliance reimage--resource-group rg1 --network-virtual-appliance-name nvaName --subscription subscriptionId --instance-ids 0"
],
"name": "Reimages Specific NetworkVirtualAppliance VMs in VM Scale Set"
}
],
"name": "2024-07-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/reimage",
"plane": "mgmt-plane",
"version": "2024-07-01"
}
]
}
]
},
"restart": {
"help": {
"lines": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/reimage", "version": "2024-07-01", "swagger": "mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrVmlydHVhbEFwcGxpYW5jZXMve25ldHdvcmtWaXJ0dWFsQXBwbGlhbmNlTmFtZX0vcmVpbWFnZQ==/V/MjAyNC0wNy0wMQ=="}], "commandGroups": [{"name": "network virtual-appliance", "commands": [{"name": "reimage", "version": "2024-07-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/reimage", "version": "2024-07-01", "swagger": "mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrVmlydHVhbEFwcGxpYW5jZXMve25ldHdvcmtWaXJ0dWFsQXBwbGlhbmNlTmFtZX0vcmVpbWFnZQ==/V/MjAyNC0wNy0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.networkVirtualApplianceName", "options": ["network-virtual-appliance-name"], "required": true, "idPart": "name", "help": {"short": "The name of Network Virtual Appliance."}, "format": {"pattern": "^[A-Za-z0-9_]+"}}, {"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}]}, {"name": "NetworkVirtualApplianceInstanceIds", "args": [{"type": "array<string>", "var": "$NetworkVirtualApplianceInstanceIds.instanceIds", "options": ["instance-ids"], "group": "NetworkVirtualApplianceInstanceIds", "help": {"short": "The network virtual appliance instance ids. Omitting the network virtual appliance instance ids will result in the operation being performed on all virtual machines belonging to the network virtual appliance."}, "item": {"type": "string"}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "NetworkVirtualAppliances_Reimage", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/reimage", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "networkVirtualApplianceName", "arg": "$Path.networkVirtualApplianceName", "required": true, "format": {"pattern": "^[A-Za-z0-9_]+"}}, {"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2024-07-01"}, "type": "string", "name": "api-version", "required": true}]}, "body": {"json": {"schema": {"type": "object", "name": "NetworkVirtualApplianceInstanceIds", "props": [{"type": "array<string>", "name": "instanceIds", "arg": "$NetworkVirtualApplianceInstanceIds.instanceIds", "item": {"type": "string"}}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "array<string>", "name": "instanceIds", "item": {"type": "string"}}]}}}}, {"statusCode": [202], "header": {"items": [{"name": "Location"}]}}, {"isError": true, "body": {"json": {"schema": {"type": "@ODataV4Format"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}]}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/reimage" version="2024-07-01" swagger="mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrVmlydHVhbEFwcGxpYW5jZXMve25ldHdvcmtWaXJ0dWFsQXBwbGlhbmNlTmFtZX0vcmVpbWFnZQ==/V/MjAyNC0wNy0wMQ=="/>
<commandGroup name="network virtual-appliance">
<command name="reimage" version="2024-07-01">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.network/networkvirtualappliances/{}/reimage" version="2024-07-01" swagger="mgmt-plane/network/ResourceProviders/Microsoft.Network/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9uZXR3b3JrVmlydHVhbEFwcGxpYW5jZXMve25ldHdvcmtWaXJ0dWFsQXBwbGlhbmNlTmFtZX0vcmVpbWFnZQ==/V/MjAyNC0wNy0wMQ=="/>
<argGroup name="">
<arg type="string" var="$Path.networkVirtualApplianceName" options="network-virtual-appliance-name" required="True" idPart="name">
<help short="The name of Network Virtual Appliance."/>
<format pattern="^[A-Za-z0-9_]+"/>
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
</argGroup>
<argGroup name="NetworkVirtualApplianceInstanceIds">
<arg type="array<string>" var="$NetworkVirtualApplianceInstanceIds.instanceIds" options="instance-ids" group="NetworkVirtualApplianceInstanceIds">
<help short="The network virtual appliance instance ids. Omitting the network virtual appliance instance ids will result in the operation being performed on all virtual machines belonging to the network virtual appliance."/>
<item type="string"/>
</arg>
</argGroup>
<operation operationId="NetworkVirtualAppliances_Reimage">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/reimage">
<request method="post">
<path>
<param type="string" name="networkVirtualApplianceName" arg="$Path.networkVirtualApplianceName" required="True">
<format pattern="^[A-Za-z0-9_]+"/>
</param>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True"/>
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True"/>
</path>
<query>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2024-07-01&quot;"/>
</const>
</query>
<body>
<json>
<schema type="object" name="NetworkVirtualApplianceInstanceIds" clientFlatten="True">
<prop type="array<string>" name="instanceIds" arg="$NetworkVirtualApplianceInstanceIds.instanceIds">
<item type="string"/>
</prop>
</schema>
</json>
</body>
</request>
<response statusCode="200">
<body>
<json var="$Instance">
<schema type="object">
<prop type="array<string>" name="instanceIds">
<item type="string"/>
</prop>
</schema>
</json>
</body>
</response>
<response statusCode="202">
<header>
<item name="Location"/>
</header>
</response>
<response isError="True">
<body>
<json>
<schema type="@ODataV4Format"/>
</json>
</body>
</response>
</http>
</operation>
<output type="object" ref="$Instance" clientFlatten="True"/>
</command>
</commandGroup>
</CodeGen>