Skip to content

Commit

Permalink
NeworkCloud : Azure cli extension updates for Networkcloud Api 2024-1…
Browse files Browse the repository at this point in the history
…0-01-preview (#8415)

* Azure cli extension updates for Networkcloud Api 2024-10-01-preview

* updated cluster/VM paramters to have short name for options

* update unit tests to resolve CI errors

---------

Co-authored-by: priya shet <[email protected]>
  • Loading branch information
priyamshet and priya shet authored Jan 28, 2025
1 parent d08d01d commit 0fb0740
Show file tree
Hide file tree
Showing 200 changed files with 8,756 additions and 2,234 deletions.
15 changes: 15 additions & 0 deletions src/networkcloud/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
Release History
===============

3.0.0b1
++++++++
* This beta version supports NetworkCloud 2024-10-01-preview APIs.
* This version requires a minimum of 2.67 Azure core CLI. See release notes for more details: https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-conceptual/release-notes-azure-cli.md
* This version upgrades the internal generation tool aaz-dev-tools to 3.2.0. Refer to the release notes for more details: https://github.com/Azure/aaz-dev-tools/releases/tag/v3.2.0.
* A bug fix for delete commands returning 204 without content is included in this release.
* New `identity` command group is added to Cluster Manager for handling system-assigned and user-assigned identity updates.
* Breaking change: Cluster create and update commands support new parameter `--analytics-output-settings` for configuring Log Analytics Workspace, which replaces the deprecated `--analytics-workspace-id`.
* Breaking change: Cluster create and update commands support new parameter `--secret-archive-settings` to hold credentials for the cluster, which replaces the deprecated `--secret-archive`.
* Cluster includes `--vulnerability-scanning-settings`, featuring a single field called containerScan, which determines how security vulnerability scanning is applied to the cluster.
* VirtualMachine is updated to display the extended location to use for creation of a VirtualMachine console resource.
* VirtualMachine is updated to support persistent storage for OS disk.
* VirtualMachine's property `--vm-device-model` gets a new option 'T3'. When 'T3' is selected, SecureBoot and vTPM are automatically enabled. This is to support Windows users.
* Eliminated password fields from Infrastructure resources (Cluster, BMM, Storage Appliance)

2.0.0
++++++++
* This is the stable version of the CLI extension that supports NetworkCloud 2024-07-01 APIs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command_group(
"networkcloud baremetalmachine",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage bare metal machine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine cordon",
is_preview=True,
)
class Cordon(AAZCommand):
"""Cordon the provided bare metal machine's Kubernetes node.
Expand All @@ -22,9 +23,9 @@ class Cordon(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/cordon", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/cordon", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -151,7 +152,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine list",
is_preview=True,
)
class List(AAZCommand):
"""List bare metal machines in the provided resource group or subscription.
Expand All @@ -25,10 +26,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.networkcloud/baremetalmachines", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.networkcloud/baremetalmachines", "2024-10-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -115,7 +116,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down Expand Up @@ -544,7 +545,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine power-off",
is_preview=True,
)
class PowerOff(AAZCommand):
"""Power off the provided bare metal machine.
Expand All @@ -22,9 +23,9 @@ class PowerOff(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/poweroff", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/poweroff", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -151,7 +152,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine reimage",
is_preview=True,
)
class Reimage(AAZCommand):
"""Reimage the provided bare metal machine.
Expand All @@ -22,9 +23,9 @@ class Reimage(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/reimage", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/reimage", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -140,7 +141,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine replace",
is_preview=True,
)
class Replace(AAZCommand):
"""Replace the provided bare metal machine.
Expand All @@ -22,9 +23,9 @@ class Replace(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/replace", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/replace", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -64,7 +65,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
_args_schema.bmc_credentials = AAZObjectArg(
options=["--bmc-credentials"],
arg_group="BareMetalMachineReplaceParameters",
help="The credentials of the baseboard management controller on this bare metal machine.",
help="The credentials of the baseboard management controller on this bare metal machine. The password field is expected to be an Azure Key Vault key URL. Until the cluster is converted to utilize managed identity by setting the secret archive settings, the actual password value should be provided instead.",
)
_args_schema.bmc_mac_address = AAZStrArg(
options=["--bmc-mac-address"],
Expand Down Expand Up @@ -203,7 +204,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine restart",
is_preview=True,
)
class Restart(AAZCommand):
"""Restart the provided bare metal machine.
Expand All @@ -22,9 +23,9 @@ class Restart(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/restart", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/restart", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -140,7 +141,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine run-command",
is_preview=True,
)
class RunCommand(AAZCommand):
"""Run the command or the script on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available.
Expand All @@ -22,9 +23,9 @@ class RunCommand(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/runcommand", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/runcommand", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -168,7 +169,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine run-data-extract",
is_preview=True,
)
class RunDataExtract(AAZCommand):
"""Run one or more data extractions on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available.
Expand All @@ -22,9 +23,9 @@ class RunDataExtract(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/rundataextracts", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/rundataextracts", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -180,7 +181,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine run-read-command",
is_preview=True,
)
class RunReadCommand(AAZCommand):
"""Run one or more read-only commands on the provided bare metal machine. The URL to storage account with the command execution results and the command exit code can be retrieved from the operation status API once available.
Expand All @@ -22,9 +23,9 @@ class RunReadCommand(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/runreadcommands", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/runreadcommands", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -180,7 +181,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine show",
is_preview=True,
)
class Show(AAZCommand):
"""Get properties of the provided bare metal machine.
Expand All @@ -22,9 +23,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -123,7 +124,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine start",
is_preview=True,
)
class Start(AAZCommand):
"""Start the provided bare metal machine.
Expand All @@ -22,9 +23,9 @@ class Start(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/start", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/start", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -140,7 +141,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"networkcloud baremetalmachine uncordon",
is_preview=True,
)
class Uncordon(AAZCommand):
"""Uncordon the provided bare metal machine's Kubernetes node.
Expand All @@ -22,9 +23,9 @@ class Uncordon(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2024-10-01-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/uncordon", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.networkcloud/baremetalmachines/{}/uncordon", "2024-10-01-preview"],
]
}

Expand Down Expand Up @@ -140,7 +141,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2024-10-01-preview",
required=True,
),
}
Expand Down
Loading

0 comments on commit 0fb0740

Please sign in to comment.