Skip to content
Open

Pr 28903 #28988

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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - NetworkCloud")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.2.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.0.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
80 changes: 6 additions & 74 deletions src/NetworkCloud/NetworkCloud.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ For information on how to develop for `Az.NetworkCloud`, see [how-to.md](how-to.

```yaml
# pin the swagger version by using the commit id instead of branch name : https://github.com/Azure/azure-rest-api-specs/
# the 2025-02-01 stable in a commit: 08973141b0d31a7e75d4dc43a5224a1814a0994f
commit: 08973141b0d31a7e75d4dc43a5224a1814a0994f
# the 2025-09-01 stable in a commit: ccd751d5bf9d1457426de7fe6d857a4cfe890cd5
commit: ccd751d5bf9d1457426de7fe6d857a4cfe890cd5
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/networkcloud/resource-manager/readme.md
input-file:
# You need to specify your swagger files here.
- $(repo)/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-02-01/networkcloud.json
- $(repo)/specification/networkcloud/resource-manager/Microsoft.NetworkCloud/stable/2025-09-01/networkcloud.json

# For new RP, the version is 0.1.0
module-version: 0.1.0
Expand All @@ -46,31 +46,15 @@ service-name: NetworkCloud
subject-prefix: NetworkCloud

directive:
# Fix model definition line break replacement issue
- from: swagger-document
where: $.definitions.L3NetworkProperties.properties.ipv4ConnectedPrefix
transform: $['description'] = 'The IPV4 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV4 or DualStack.'
- from: swagger-document
where: $.definitions.L3NetworkProperties.properties.ipv6ConnectedPrefix
transform: $['description'] = 'The IPV6 prefix (CIDR) assigned to this L3 network. Required when the IP allocation type is IPV6 or DualStack.'
- from: swagger-document
where: $.definitions.BareMetalMachinePatchProperties.properties.machineDetails
transform: $['description'] = 'The details provided by the customer during the creation of rack manifests that allows for custom data to be associated with this machine.'
- from: swagger-document
where: $.definitions.ClusterProperties.properties.computeRackDefinitions
transform: $['description'] = 'The list of rack definitions for the compute racks in a multi-rack cluster, or an empty list in a single-rack cluster.'
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^(Create|Update|Cordon|Deploy|Enable|Replace|Run|PowerOff)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentityExpanded$
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Cordon$|^CordonViaIdentity$|^DeployViaIdentity$|^Deploy$|^Enable$|^EnableViaIdentity$|^Replace$|^ReplaceViaIdentity$|^Run$|^RunViaIdentity$|^PowerOff$|^PowerOffViaIdentity$
remove: true
- where:
subject: KuberneteClusterNode
variant: ^(Restart)(?!.*?(Expanded|JsonFilePath|JsonString))
variant: ^Restart$|^RestartViaIdentity$
remove: true
# Remove the set-* cmdlet
- where:
Expand Down Expand Up @@ -293,59 +277,7 @@ directive:
- from: swagger-document
where: $.definitions.ServicePrincipalInformation.properties.password
transform: $.format = "password"
# Fix required property missing mutability
- from: swagger-document
where: $.definitions.BgpAdvertisement.properties.ipAddressPools
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.ControlPlaneNodeConfiguration.properties.vmSkuName
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.InitialAgentPoolConfiguration.properties.count
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.InitialAgentPoolConfiguration.properties.mode
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.InitialAgentPoolConfiguration.properties.vmSkuName
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.InitialAgentPoolConfiguration.properties.name
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.IpAddressPool.properties.name
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.L3NetworkAttachmentConfiguration.properties.networkId
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.NetworkAttachment.properties.attachedNetworkId
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.NetworkAttachment.properties.ipAllocationMethod
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.ServiceLoadBalancerBgpPeer.properties.name
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.ServiceLoadBalancerBgpPeer.properties.peerAddress
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.ServiceLoadBalancerBgpPeer.properties.peerAsn
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.VirtualMachinePlacementHint.properties.hintType
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.VirtualMachinePlacementHint.properties.schedulingExecution
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.VirtualMachinePlacementHint.properties.resourceId
transform: $['x-ms-mutability'] = ["read", "update", "create"]
- from: swagger-document
where: $.definitions.VirtualMachinePlacementHint.properties.scope
transform: $['x-ms-mutability'] = ["read", "update", "create"]


# Add model-cmdlet for any properties/sub-properties of complex type
- model-cmdlet:
- model-name: BareMetalMachineConfigurationData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "bareMetalMachines",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "cloudServicesNetworks",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusterManagers",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusters/bareMetalMachineKeySets",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusters/bmcKeySets",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusters/metricsConfigurations",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "clusters",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "kubernetesClusters/agentPools",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "kubernetesClusters/features",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "kubernetesClusters",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "l2Networks",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "l3Networks",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "rackSkus",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "racks",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "storageAppliances",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "trunkedNetworks",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "virtualMachines/consoles",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "virtualMachines",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "volumes",
"apiVersion": "2025-02-01",
"apiVersion": "2025-09-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.networkcloud"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ function New-AzNetworkCloudBareMetalMachineConfigurationDataObject {
[Parameter(HelpMessage="The free-form additional information about the machine, e.g. an asset tag.")]
[string]
$MachineDetail,
[Parameter(HelpMessage="The user-provided name for the bare metal machine created from this specification.
If not provided, the machine name will be generated programmatically.")]
[Parameter(HelpMessage="The user-provided name for the bare metal machine created from this specification. If not provided, the machine name will be generated programmatically.")]
[string]
$MachineName,
[Parameter(Mandatory, HelpMessage="The slot the physical machine is in the rack based on the BOM configuration.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function New-AzNetworkCloudBgpAdvertisementObject {
[Parameter(HelpMessage="The names of the BGP communities to be associated with the announcement, utilizing a BGP community string in 1234:1234 format.")]
[string[]]
$Community,
[Parameter(Mandatory, HelpMessage="The names of the IP address pools associated with this announcement.")]
[Parameter(HelpMessage="The names of the IP address pools associated with this announcement.")]
[string[]]
$IPAddressPool,
[Parameter(HelpMessage="The names of the BGP peers to limit this advertisement to. If no values are specified, all BGP peers will receive this advertisement.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function New-AzNetworkCloudControlPlaneNodeConfigurationObject {
[Parameter(Mandatory, HelpMessage="The number of virtual machines that use this configuration.")]
[long]
$Count,
[Parameter(Mandatory, HelpMessage="The name of the VM SKU supplied during creation.")]
[Parameter(HelpMessage="The name of the VM SKU supplied during creation.")]
[string]
$VMSkuName
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ function New-AzNetworkCloudInitialAgentPoolConfigurationObject {
[Parameter(HelpMessage="The list of availability zones of the Network Cloud cluster used for the provisioning of nodes in this agent pool. If not specified, all availability zones will be used.")]
[string[]]
$AvailabilityZone,
[Parameter(Mandatory, HelpMessage="The number of virtual machines that use this configuration.")]
[Parameter(HelpMessage="The number of virtual machines that use this configuration.")]
[long]
$Count,
[Parameter(HelpMessage="The labels applied to the nodes in this agent pool.")]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.Models.IKubernetesLabel[]]
$Label,
[Parameter(Mandatory, HelpMessage="The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node.")]
[Parameter(HelpMessage="The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node.")]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.PSArgumentCompleterAttribute("System", "User", "NotApplicable")]
[string]
$Mode,
[Parameter(Mandatory, HelpMessage="The name that will be used for the agent pool resource representing this agent pool.")]
[Parameter(HelpMessage="The name that will be used for the agent pool resource representing this agent pool.")]
[string]
$Name,
[Parameter(HelpMessage="The taints applied to the nodes in this agent pool.")]
Expand All @@ -81,7 +81,7 @@ function New-AzNetworkCloudInitialAgentPoolConfigurationObject {
[Parameter(HelpMessage="The maximum number or percentage of nodes that can be unavailable during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified during creation, a value of 0 is used. One of MaxSurge and MaxUnavailable must be greater than 0.")]
[string]
$UpgradeSettingMaxUnavailable,
[Parameter(Mandatory, HelpMessage="The name of the VM SKU that determines the size of resources allocated for node VMs.")]
[Parameter(HelpMessage="The name of the VM SKU that determines the size of resources allocated for node VMs.")]
[string]
$VMSkuName
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function New-AzNetworkCloudIpAddressPoolObject {
[Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.PSArgumentCompleterAttribute("True", "False")]
[string]
$AutoAssign,
[Parameter(Mandatory, HelpMessage="The name used to identify this IP address pool for association with a BGP advertisement.")]
[Parameter(HelpMessage="The name used to identify this IP address pool for association with a BGP advertisement.")]
[string]
$Name,
[Parameter(HelpMessage="The indicator to prevent the use of IP addresses ending with .0 and .255 for this pool. Enabling this option will only use IP addresses between .1 and .254 inclusive.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function New-AzNetworkCloudL3NetworkAttachmentConfigurationObject {
[Microsoft.Azure.PowerShell.Cmdlets.NetworkCloud.PSArgumentCompleterAttribute("True", "False")]
[string]
$IpamEnabled,
[Parameter(Mandatory, HelpMessage="The resource ID of the network that is being configured for attachment.")]
[Parameter(HelpMessage="The resource ID of the network that is being configured for attachment.")]
[string]
$NetworkId,
[Parameter(HelpMessage="The indicator of how this network will be utilized by the Kubernetes cluster.")]
Expand Down
Loading
Loading