From 5ccaa11e1aca74cfc83e8a5ca8f1fce21249d1b5 Mon Sep 17 00:00:00 2001 From: SHUBHIKA JAIN Date: Wed, 8 Jan 2025 16:31:32 +0530 Subject: [PATCH 1/3] Adding required aaz changes for reimage NVA --- .../network/virtual-appliance/_reimage.md | 16 ++++ Commands/network/virtual-appliance/readme.md | 3 + Commands/tree.json | 30 ++++++++ .../2024-07-01.json | 1 + .../2024-07-01.xml | 75 +++++++++++++++++++ 5 files changed, 125 insertions(+) create mode 100644 Commands/network/virtual-appliance/_reimage.md create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.json create mode 100644 Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.xml diff --git a/Commands/network/virtual-appliance/_reimage.md b/Commands/network/virtual-appliance/_reimage.md new file mode 100644 index 000000000..5c4c1033c --- /dev/null +++ b/Commands/network/virtual-appliance/_reimage.md @@ -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** + + + +#### 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 + ``` diff --git a/Commands/network/virtual-appliance/readme.md b/Commands/network/virtual-appliance/readme.md index 79727486a..a255af852 100644 --- a/Commands/network/virtual-appliance/readme.md +++ b/Commands/network/virtual-appliance/readme.md @@ -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. diff --git a/Commands/tree.json b/Commands/tree.json index 5ab5bd6af..0d93867ca 100644 --- a/Commands/tree.json +++ b/Commands/tree.json @@ -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": [ diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.json b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.json new file mode 100644 index 000000000..28826fb09 --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.json @@ -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", "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", "name": "instanceIds", "arg": "$NetworkVirtualApplianceInstanceIds.instanceIds", "item": {"type": "string"}}], "clientFlatten": true}}}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "array", "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}]}]}]} \ No newline at end of file diff --git a/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.xml b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.xml new file mode 100644 index 000000000..9b4d13a30 --- /dev/null +++ b/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5uZXR3b3JrL25ldHdvcmt2aXJ0dWFsYXBwbGlhbmNlcy97fS9yZWltYWdl/2024-07-01.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + +
+
+ +
+
+
From 8e3825c5ae0efc24c85a4dca324ea58c92963921 Mon Sep 17 00:00:00 2001 From: SHUBHIKA JAIN Date: Fri, 10 Jan 2025 17:00:03 +0530 Subject: [PATCH 2/3] rev:1 --- Commands/tree.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands/tree.json b/Commands/tree.json index 0d93867ca..7ec2289a0 100644 --- a/Commands/tree.json +++ b/Commands/tree.json @@ -18725,7 +18725,7 @@ "commands": { "reimage": { "help": { - "short": "The reimage role instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles." + "short": "The reimage role instance asynchronous operation reinstalls the operating system on instances of web roles or worker role." }, "names": [ "cloud-service", From 2e50111dadf7a5db322bfaf5b5c7eefea6c24f17 Mon Sep 17 00:00:00 2001 From: SHUBHIKA JAIN Date: Fri, 10 Jan 2025 17:07:50 +0530 Subject: [PATCH 3/3] reverting change --- Commands/tree.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands/tree.json b/Commands/tree.json index 7ec2289a0..0d93867ca 100644 --- a/Commands/tree.json +++ b/Commands/tree.json @@ -18725,7 +18725,7 @@ "commands": { "reimage": { "help": { - "short": "The reimage role instance asynchronous operation reinstalls the operating system on instances of web roles or worker role." + "short": "The reimage role instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles." }, "names": [ "cloud-service",