diff --git a/src/VMware/Az.VMware.psd1 b/src/VMware/Az.VMware.psd1 index 9c248f8d6f09..1df99bd59c52 100644 --- a/src/VMware/Az.VMware.psd1 +++ b/src/VMware/Az.VMware.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 1/27/2021 +# Generated on: 2/3/2021 # @{ @@ -45,7 +45,7 @@ PowerShellVersion = '5.1' DotNetFrameworkVersion = '4.7.2' # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# CLRVersion = '' +# ClrVersion = '' # Processor architecture (None, X86, Amd64) required by this module # ProcessorArchitecture = '' diff --git a/src/VMware/Changelog.md b/src/VMware/Changelog.md index 04515969fbd4..ea4ef7a71fbf 100644 --- a/src/VMware/Changelog.md +++ b/src/VMware/Changelog.md @@ -20,6 +20,7 @@ ## Upcoming Release * [BreakingChange] Renamed module to Az.VMware * Set confirmation prompt poped by default +* Displayed legal term and added parameter `AcceptEULA` for `New-AzVMwarePrivateCloud` ## Version 0.1.0 * First preview release for module Az.VMWare diff --git a/src/VMware/custom/LegalTerm.txt b/src/VMware/custom/LegalTerm.txt new file mode 100644 index 000000000000..3fa82bdab658 --- /dev/null +++ b/src/VMware/custom/LegalTerm.txt @@ -0,0 +1,6 @@ +LEGAL TERMS +Azure VMware Solution ("AVS") is an Azure Service licensed to you as part of your Azure subscription and subject to the terms and conditions of the agreement under which you obtained your Azure subscription (https://azure.microsoft.com/support/legal/). The following additional terms also apply to your use of AVS: +DATA RETENTION. AVS does not currently support retention or extraction of data stored in AVS Clusters. Once an AVS Cluster is deleted, the data cannot be recovered as it terminates all running workloads, components, and destroys all Cluster data and configuration settings, including public IP addresses. +PROFESSIONAL SERVICES DATA TRANSFER TO VMWARE. In the event that you contact Microsoft for technical support relating to Azure VMware Solution and Microsoft must engage VMware for assistance with the issue, Microsoft will transfer the Professional Services Data and the Personal Data contained in the support case to VMware. The transfer is made subject to the terms of the Support Transfer Agreement between VMware and Microsoft, which establishes Microsoft and VMware as independent processors of the Professional Services Data. Before any transfer of Professional Services Data to VMware will occur, Microsoft will obtain and record consent from you for the transfer. +VMWARE DATA PROCESSING AGREEMENT. Once Professional Services Data is transferred to VMware (pursuant to the above section), the processing of Professional Services Data, including the Personal Data contained the support case, by VMware as an independent processor will be governed by the VMware Data Processing Agreement for Microsoft AVS Customers Transferred for L3 Support (the "VMware Data Processing Agreement") between you and VMware (located at https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/privacy/vmware-data-processing-agreement.pdf). You also give authorization to allow your representative(s) who request technical support for Azure VMware Solution to provide consent on your behalf to Microsoft for the transfer of the Professional Services Data to VMware. +ACCEPTANCE OF LEGAL TERMS. By continuing, you agree to the above additional Legal Terms for AVS. If you are an individual accepting these terms on behalf of an entity, you also represent that you have the legal authority to enter into these additional terms on that entity's behalf. \ No newline at end of file diff --git a/src/VMware/custom/New-AzVMwarePrivateCloud.ps1 b/src/VMware/custom/New-AzVMwarePrivateCloud.ps1 index bf2c3d3f98d8..2451085cf060 100644 --- a/src/VMware/custom/New-AzVMwarePrivateCloud.ps1 +++ b/src/VMware/custom/New-AzVMwarePrivateCloud.ps1 @@ -104,7 +104,7 @@ function New-AzVMwarePrivateCloud { [System.Int32] # The cluster size ${ManagementClusterSize}, - + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] [System.String] @@ -124,6 +124,11 @@ function New-AzVMwarePrivateCloud { # Optionally, set the vCenter admin password when the private cloud is created ${VcenterPassword}, + [Parameter()] + [System.Management.Automation.SwitchParameter] + # Accept EULA of AVS, legal term will pop up without this parameter provided + ${AcceptEULA}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -131,7 +136,7 @@ function New-AzVMwarePrivateCloud { [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, - + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -185,16 +190,37 @@ function New-AzVMwarePrivateCloud { ) process { + if(!$AcceptEULA){ + $legalTermPath = Join-Path $PSScriptRoot -ChildPath "LegalTerm.txt" + try { + $legalTerm = (Get-Content -Path $legalTermPath) -join "`r`n" + } catch { + throw + } + $confirmation = Read-Host $legalTerm"`n[Y] Yes [N] No (default is `"N`")" + switch ($confirmation) { + 'Y' { + Break + } + + Default { + Return + } + } + }else { + $null = $PSBoundParameters.Remove('AcceptEULA') + } + try { if($PSBoundParameters.ContainsKey('Sku')) { $sku = $PSBoundParameters['Sku'] - $PSBoundParameters.Remove('Sku') + $null = $PSBoundParameters.Remove('Sku') $PSBoundParameters.Add('SkuName', $sku) - } + } Az.VMware.internal\New-AzVMwarePrivateCloud @PSBoundParameters } catch { throw } } } - \ No newline at end of file + diff --git a/src/VMware/exports/New-AzVMwarePrivateCloud.ps1 b/src/VMware/exports/New-AzVMwarePrivateCloud.ps1 index 15dc6c4b7d3e..f85c257d8152 100644 --- a/src/VMware/exports/New-AzVMwarePrivateCloud.ps1 +++ b/src/VMware/exports/New-AzVMwarePrivateCloud.ps1 @@ -106,6 +106,12 @@ param( # Optionally, set the vCenter admin password when the private cloud is created ${VcenterPassword}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Accept EULA of AVS, legal term will pop up without this parameter provided + ${AcceptEULA}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/VMware/exports/ProxyCmdletDefinitions.ps1 b/src/VMware/exports/ProxyCmdletDefinitions.ps1 index 4aa66251cff1..426cf61b2663 100644 --- a/src/VMware/exports/ProxyCmdletDefinitions.ps1 +++ b/src/VMware/exports/ProxyCmdletDefinitions.ps1 @@ -2253,6 +2253,12 @@ param( # Optionally, set the vCenter admin password when the private cloud is created ${VcenterPassword}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Accept EULA of AVS, legal term will pop up withoutt this parameter provided + ${AcceptEULA}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/src/VMware/generate-info.json b/src/VMware/generate-info.json index 981cd7cfe60e..470c1cce7b51 100644 --- a/src/VMware/generate-info.json +++ b/src/VMware/generate-info.json @@ -1,8 +1,8 @@ { - "autorest": "3.0.6187", - "swagger_commit": "e5b2bd6a4d8de7a0a30bd6057d5d66a5b96d8737", - "autorest_powershell": "3.0.419", + "autorest_core": "3.0.6369", "autorest_modelerfour": "4.15.414", - "node": "v12.16.1", - "autorest_core": "3.0.6365" + "autorest": "`-- (empty)", + "swagger_commit": "fbd281068937dcf905cb4a87a1c1a40646819bb4", + "node": "v10.16.0", + "autorest_powershell": "3.0.417" } diff --git a/src/VMware/generated/api/Models/Api20200320/PrivateCloud.PowerShell.cs b/src/VMware/generated/api/Models/Api20200320/PrivateCloud.PowerShell.cs index c9058ce6597b..2dc0dbd900b2 100644 --- a/src/VMware/generated/api/Models/Api20200320/PrivateCloud.PowerShell.cs +++ b/src/VMware/generated/api/Models/Api20200320/PrivateCloud.PowerShell.cs @@ -105,25 +105,25 @@ internal PrivateCloud(global::System.Collections.IDictionary content) ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementCluster = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IManagementCluster) content.GetValueForProperty("ManagementCluster",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementCluster, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.ManagementClusterTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Circuit = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.ICircuit) content.GetValueForProperty("Circuit",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Circuit, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.CircuitTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IEndpoints) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Endpoint, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.EndpointsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost = (string[]) content.GetValueForProperty("ManagementClusterHost",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet = (string) content.GetValueForProperty("CircuitSecondarySubnet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork = (string) content.GetValueForProperty("ProvisioningNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Internet = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.InternetEnum?) content.GetValueForProperty("Internet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Internet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.InternetEnum.CreateFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).IdentitySource = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IIdentitySource[]) content.GetValueForProperty("IdentitySource",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).IdentitySource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IdentitySourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa = (string) content.GetValueForProperty("EndpointVcsa",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager = (string) content.GetValueForProperty("EndpointNsxtManager",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.PrivateCloudProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.PrivateCloudProvisioningState.CreateFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NetworkBlock = (string) content.GetValueForProperty("NetworkBlock",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NetworkBlock, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementNetwork = (string) content.GetValueForProperty("ManagementNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementNetwork, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork = (string) content.GetValueForProperty("ProvisioningNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost = (string[]) content.GetValueForProperty("ManagementClusterHost",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VmotionNetwork = (string) content.GetValueForProperty("VmotionNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VmotionNetwork, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterPassword = (string) content.GetValueForProperty("VcenterPassword",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterPassword, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtPassword = (string) content.GetValueForProperty("NsxtPassword",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtPassword, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterCertificateThumbprint = (string) content.GetValueForProperty("VcenterCertificateThumbprint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterCertificateThumbprint, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtCertificateThumbprint = (string) content.GetValueForProperty("NsxtCertificateThumbprint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtCertificateThumbprint, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitPrimarySubnet = (string) content.GetValueForProperty("CircuitPrimarySubnet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitPrimarySubnet, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet = (string) content.GetValueForProperty("CircuitSecondarySubnet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager = (string) content.GetValueForProperty("EndpointNsxtManager",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa = (string) content.GetValueForProperty("EndpointVcsa",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize = (int?) content.GetValueForProperty("ManagementClusterSize",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState?) content.GetValueForProperty("ManagementClusterProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState.CreateFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterId = (int?) content.GetValueForProperty("ManagementClusterId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState?) content.GetValueForProperty("ManagementClusterProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize = (int?) content.GetValueForProperty("ManagementClusterSize",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRouteId = (string) content.GetValueForProperty("CircuitExpressRouteId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRouteId, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRoutePrivatePeeringId = (string) content.GetValueForProperty("CircuitExpressRoutePrivatePeeringId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRoutePrivatePeeringId, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointHcxCloudManager = (string) content.GetValueForProperty("EndpointHcxCloudManager",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointHcxCloudManager, global::System.Convert.ToString); @@ -155,25 +155,25 @@ internal PrivateCloud(global::System.Management.Automation.PSObject content) ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementCluster = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IManagementCluster) content.GetValueForProperty("ManagementCluster",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementCluster, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.ManagementClusterTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Circuit = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.ICircuit) content.GetValueForProperty("Circuit",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Circuit, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.CircuitTypeConverter.ConvertFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IEndpoints) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Endpoint, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.EndpointsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost = (string[]) content.GetValueForProperty("ManagementClusterHost",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet = (string) content.GetValueForProperty("CircuitSecondarySubnet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork = (string) content.GetValueForProperty("ProvisioningNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Internet = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.InternetEnum?) content.GetValueForProperty("Internet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).Internet, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.InternetEnum.CreateFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).IdentitySource = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IIdentitySource[]) content.GetValueForProperty("IdentitySource",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).IdentitySource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IdentitySourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa = (string) content.GetValueForProperty("EndpointVcsa",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager = (string) content.GetValueForProperty("EndpointNsxtManager",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.PrivateCloudProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.PrivateCloudProvisioningState.CreateFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NetworkBlock = (string) content.GetValueForProperty("NetworkBlock",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NetworkBlock, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementNetwork = (string) content.GetValueForProperty("ManagementNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementNetwork, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork = (string) content.GetValueForProperty("ProvisioningNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ProvisioningNetwork, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost = (string[]) content.GetValueForProperty("ManagementClusterHost",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterHost, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VmotionNetwork = (string) content.GetValueForProperty("VmotionNetwork",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VmotionNetwork, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterPassword = (string) content.GetValueForProperty("VcenterPassword",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterPassword, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtPassword = (string) content.GetValueForProperty("NsxtPassword",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtPassword, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterCertificateThumbprint = (string) content.GetValueForProperty("VcenterCertificateThumbprint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).VcenterCertificateThumbprint, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtCertificateThumbprint = (string) content.GetValueForProperty("NsxtCertificateThumbprint",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).NsxtCertificateThumbprint, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitPrimarySubnet = (string) content.GetValueForProperty("CircuitPrimarySubnet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitPrimarySubnet, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet = (string) content.GetValueForProperty("CircuitSecondarySubnet",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitSecondarySubnet, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager = (string) content.GetValueForProperty("EndpointNsxtManager",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointNsxtManager, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa = (string) content.GetValueForProperty("EndpointVcsa",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointVcsa, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize = (int?) content.GetValueForProperty("ManagementClusterSize",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState?) content.GetValueForProperty("ManagementClusterProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState.CreateFrom); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterId = (int?) content.GetValueForProperty("ManagementClusterId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState?) content.GetValueForProperty("ManagementClusterProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.VMware.Support.ClusterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize = (int?) content.GetValueForProperty("ManagementClusterSize",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).ManagementClusterSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRouteId = (string) content.GetValueForProperty("CircuitExpressRouteId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRouteId, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRoutePrivatePeeringId = (string) content.GetValueForProperty("CircuitExpressRoutePrivatePeeringId",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).CircuitExpressRoutePrivatePeeringId, global::System.Convert.ToString); ((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointHcxCloudManager = (string) content.GetValueForProperty("EndpointHcxCloudManager",((Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Api20200320.IPrivateCloudInternal)this).EndpointHcxCloudManager, global::System.Convert.ToString); diff --git a/src/VMware/generated/modules/Pester/4.10.1/PSGetModuleInfo.xml b/src/VMware/generated/modules/Pester/4.10.1/PSGetModuleInfo.xml deleted file mode 100644 index 0c937ea488a5..000000000000 --- a/src/VMware/generated/modules/Pester/4.10.1/PSGetModuleInfo.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - - Microsoft.PowerShell.Commands.PSRepositoryItemInfo - System.Management.Automation.PSCustomObject - System.Object - - - Pester - 4.10.1 - Module - Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of PowerShell code being tested. Pester tests can execute any command or script that is accessible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system. - Pester Team - - - System.Object[] - System.Array - System.Object - - - dlwyatt - nohwnd - - - Copyright (c) 2019 by Pester Team, licensed under Apache 2.0 License. -
2020-02-07T19:57:31+08:00
- - - https://www.apache.org/licenses/LICENSE-2.0.html - https://github.com/Pester/Pester - https://raw.githubusercontent.com/pester/Pester/master/images/pester.PNG - - - - powershell - unit_testing - bdd - tdd - mocking - PSEdition_Core - PSEdition_Desktop - Windows - Linux - MacOS - PSModule - - - - - System.Collections.Hashtable - System.Object - - - - Function - - - - Describe - Context - It - Should - Mock - Assert-MockCalled - Assert-VerifiableMock - Assert-VerifiableMocks - New-Fixture - Get-TestDriveItem - Invoke-Pester - Setup - In - InModuleScope - Invoke-Mock - BeforeEach - AfterEach - BeforeAll - AfterAll - Get-MockDynamicParameter - Set-DynamicParameterVariable - Set-TestInconclusive - Set-ItResult - SafeGetCommand - New-PesterOption - New-MockObject - Add-AssertionOperator - Get-ShouldOperator - Invoke-Gherkin - Find-GherkinStep - GherkinStep - BeforeEachFeature - AfterEachFeature - BeforeEachScenario - AfterEachScenario - - - - - DscResource - - - - - - - Workflow - - - - Cmdlet - - - - Command - - - - Describe - Context - It - Should - Mock - Assert-MockCalled - Assert-VerifiableMock - Assert-VerifiableMocks - New-Fixture - Get-TestDriveItem - Invoke-Pester - Setup - In - InModuleScope - Invoke-Mock - BeforeEach - AfterEach - BeforeAll - AfterAll - Get-MockDynamicParameter - Set-DynamicParameterVariable - Set-TestInconclusive - Set-ItResult - SafeGetCommand - New-PesterOption - New-MockObject - Add-AssertionOperator - Get-ShouldOperator - Invoke-Gherkin - Find-GherkinStep - GherkinStep - BeforeEachFeature - AfterEachFeature - BeforeEachScenario - AfterEachScenario - - - - - RoleCapability - - - - - - https://github.com/pester/Pester/releases/tag/4.10.1 - - - - - https://www.powershellgallery.com/api/v2 - PSGallery - NuGet - - - System.Management.Automation.PSCustomObject - System.Object - - - Copyright (c) 2019 by Pester Team, licensed under Apache 2.0 License. - Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of PowerShell code being tested. Pester tests can execute any command or script that is accessible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system. - False - https://github.com/pester/Pester/releases/tag/4.10.1 - False - False - 1226254 - 4704855 - 887295 - 2/7/2020 7:57:31 PM +08:00 - 2/7/2020 7:57:31 PM +08:00 - 1/26/2021 8:07:08 AM +08:00 - powershell unit_testing bdd tdd mocking PSEdition_Core PSEdition_Desktop Windows Linux MacOS PSModule PSFunction_Describe PSCommand_Describe PSFunction_Context PSCommand_Context PSFunction_It PSCommand_It PSFunction_Should PSCommand_Should PSFunction_Mock PSCommand_Mock PSFunction_Assert-MockCalled PSCommand_Assert-MockCalled PSFunction_Assert-VerifiableMock PSCommand_Assert-VerifiableMock PSFunction_Assert-VerifiableMocks PSCommand_Assert-VerifiableMocks PSFunction_New-Fixture PSCommand_New-Fixture PSFunction_Get-TestDriveItem PSCommand_Get-TestDriveItem PSFunction_Invoke-Pester PSCommand_Invoke-Pester PSFunction_Setup PSCommand_Setup PSFunction_In PSCommand_In PSFunction_InModuleScope PSCommand_InModuleScope PSFunction_Invoke-Mock PSCommand_Invoke-Mock PSFunction_BeforeEach PSCommand_BeforeEach PSFunction_AfterEach PSCommand_AfterEach PSFunction_BeforeAll PSCommand_BeforeAll PSFunction_AfterAll PSCommand_AfterAll PSFunction_Get-MockDynamicParameter PSCommand_Get-MockDynamicParameter PSFunction_Set-DynamicParameterVariable PSCommand_Set-DynamicParameterVariable PSFunction_Set-TestInconclusive PSCommand_Set-TestInconclusive PSFunction_Set-ItResult PSCommand_Set-ItResult PSFunction_SafeGetCommand PSCommand_SafeGetCommand PSFunction_New-PesterOption PSCommand_New-PesterOption PSFunction_New-MockObject PSCommand_New-MockObject PSFunction_Add-AssertionOperator PSCommand_Add-AssertionOperator PSFunction_Get-ShouldOperator PSCommand_Get-ShouldOperator PSFunction_Invoke-Gherkin PSCommand_Invoke-Gherkin PSFunction_Find-GherkinStep PSCommand_Find-GherkinStep PSFunction_GherkinStep PSCommand_GherkinStep PSFunction_BeforeEachFeature PSCommand_BeforeEachFeature PSFunction_AfterEachFeature PSCommand_AfterEachFeature PSFunction_BeforeEachScenario PSCommand_BeforeEachScenario PSFunction_AfterEachScenario PSCommand_AfterEachScenario PSIncludes_Function - False - 2021-01-26T08:07:08Z - 4.10.1 - Pester Team - false - Module - Pester.nuspec|junit_schema_4.xsd|LICENSE|nunit_schema_2.5.xsd|Pester.psd1|Pester.psm1|bin\pester.bat|Dependencies\Axiom\Axiom.psm1|Dependencies\Axiom\Verify-AssertionFailed.ps1|Dependencies\Axiom\Verify-Equal.ps1|Dependencies\Axiom\Verify-False.ps1|Dependencies\Axiom\Verify-NotNull.ps1|Dependencies\Axiom\Verify-NotSame.ps1|Dependencies\Axiom\Verify-Null.ps1|Dependencies\Axiom\Verify-Same.ps1|Dependencies\Axiom\Verify-Throw.ps1|Dependencies\Axiom\Verify-True.ps1|Dependencies\Axiom\Verify-Type.ps1|Dependencies\Format\Format.psm1|Dependencies\TypeClass\TypeClass.psm1|en-US\about_BeforeEach_AfterEach.help.txt|en-US\about_Mocking.help.txt|en-US\about_Pester.help.txt|en-US\about_Should.help.txt|en-US\about_TestDrive.help.txt|en-US\Gherkin.psd1|en-US\RSpec.psd1|Functions\Context.ps1|Functions\Coverage.ps1|Functions\Describe.ps1|Functions\Environment.ps1|Functions\Get-ShouldOperator.ps1|Functions\Gherkin.ps1|Functions\Gherkin.types.ps1xml|Functions\GherkinHook.ps1|Functions\GherkinStep.ps1|Functions\In.ps1|Functions\InModuleScope.ps1|Functions\It.ps1|Functions\Mock.ps1|Functions\New-Fixture.ps1|Functions\New-MockObject.ps1|Functions\Output.ps1|Functions\PesterState.ps1|Functions\Set-ItResult.ps1|Functions\SetupTeardown.ps1|Functions\TestDrive.ps1|Functions\TestRegistry.ps1|Functions\TestResults.ps1|Functions\Assertions\Be.ps1|Functions\Assertions\BeGreaterThan.ps1|Functions\Assertions\BeIn.ps1|Functions\Assertions\BeLessThan.ps1|Functions\Assertions\BeLike.ps1|Functions\Assertions\BeLikeExactly.ps1|Functions\Assertions\BeNullOrEmpty.ps1|Functions\Assertions\BeOfType.ps1|Functions\Assertions\BeTrueOrFalse.ps1|Functions\Assertions\Contain.ps1|Functions\Assertions\Exist.ps1|Functions\Assertions\FileContentMatch.ps1|Functions\Assertions\FileContentMatchExactly.ps1|Functions\Assertions\FileContentMatchMultiline.ps1|Functions\Assertions\HaveCount.ps1|Functions\Assertions\HaveParameter.ps1|Functions\Assertions\Match.ps1|Functions\Assertions\MatchExactly.ps1|Functions\Assertions\PesterThrow.ps1|Functions\Assertions\Set-TestInconclusive.ps1|Functions\Assertions\Should.ps1|lib\Gherkin\gherkin-languages.json|lib\Gherkin\core\Gherkin.dll|lib\Gherkin\legacy\Gherkin.dll|lib\Gherkin\legacy\Newtonsoft.Json.dll|Snippets\Context.snippets.ps1xml|Snippets\Describe.snippets.ps1xml|Snippets\It.snippets.ps1xml|Snippets\ShouldBe.snippets.ps1xml|Snippets\ShouldBeGreaterThan.snippets.ps1xml|Snippets\ShouldBeLessThan.snippets.ps1xml|Snippets\ShouldBeNullOrEmpty.snippets.ps1xml|Snippets\ShouldExist.snippets.ps1xml|Snippets\ShouldFileContentMatch.snippets.ps1xml|Snippets\ShouldMatch.snippets.ps1xml|Snippets\ShouldNotBe.snippets.ps1xml|Snippets\ShouldNotBeNullOrEmpty.snippets.ps1xml|Snippets\ShouldNotExist.snippets.ps1xml|Snippets\ShouldNotFileContentMatch.snippets.ps1xml|Snippets\ShouldNotMatch.snippets.ps1xml|Snippets\ShouldNotThrow.snippets.ps1xml|Snippets\ShouldThrow.snippets.ps1xml - a699dea5-2c73-4616-a270-1f7abb777e71 - 2.0 - Pester - - - C:\workspace\generation\src\VMware\generated\modules\Pester\4.10.1 -
-
-
diff --git a/src/VMware/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/VMware/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 6bef81442028..9c7e367bbfa8 100644 --- a/src/VMware/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/VMware/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -12,180 +12,114 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "Psd1")] - [DoNotExport] - public class ExportPsd1 : PSCmdlet + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + + protected override void ProcessRecord() { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string CustomFolder { get; set; } + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string Psd1Path { get; set; } + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } - [Parameter(Mandatory = true)] - public Guid ModuleGuid { get; set; } + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } - private static readonly bool IsAzure = Convert.ToBoolean(@"true"); - private const string CustomFolderRelative = "./custom"; - private const string Indent = Psd1Indent; - private const string Undefined = "undefined"; - private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } - protected override void ProcessRecord() + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.VMware.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: VMware cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.VMware.private.dll"}'"); + + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.VMware.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } - - if (!Directory.Exists(CustomFolder)) - { - throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); - } - - string version = Convert.ToString(@"0.1.0"); - // Validate the module version should be semantic version - // Following regex is official from https://semver.org/ - Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); - if (rx.Matches(version).Count != 1) - { - throw new ArgumentException("Module-version is not a valid Semantic Version"); - } - - string previewVersion = null; - if (version.Contains('-')) - { - string[] versions = version.Split("-".ToCharArray(), 2); - version = versions[0]; - previewVersion = versions[1]; - } - - var sb = new StringBuilder(); - sb.AppendLine("@{"); - sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); - sb.AppendLine($@"{Indent}RootModule = '{"./Az.VMware.psm1"}'"); - sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); - sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); - sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); - sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); - sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); - sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: VMware cmdlets"}'"); - sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); - sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); - - // RequiredModules - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); - } - - // RequiredAssemblies - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); - } - else - { - sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.VMware.private.dll"}'"); - } - - // NestedModules - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); - } - - // FormatsToProcess - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); - } - else - { - var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) - .Where(f => f.EndsWith(".format.ps1xml")) - .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); - var formatList = customFormatPs1xmlFiles.Prepend("./Az.VMware.format.ps1xml").ToPsList(); - sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); - } - - // TypesToProcess - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); - } - - // ScriptsToProcess - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); - } - - var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); - // FunctionsToExport - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); - } - else - { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); - } - - // AliasesToExport - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); - } - else - { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); - } - - // CmdletsToExport - if (!IsUndefined("undefined")) - { - sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); - } - - sb.AppendLine($@"{Indent}PrivateData = @{{"); - sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); - - if (previewVersion != null) - { - sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); - } - sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule VMware".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); - sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); - sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); - sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); - var profilesList = ""; - if (IsAzure && !String.IsNullOrEmpty(profilesList)) - { - sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); - } - - sb.AppendLine($@"{Indent}{Indent}}}"); - sb.AppendLine($@"{Indent}}}"); - sb.AppendLine(@"}"); - - File.WriteAllText(Psd1Path, sb.ToString()); - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule VMware".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } } + } } diff --git a/src/VMware/help/New-AzVMwarePrivateCloud.md b/src/VMware/help/New-AzVMwarePrivateCloud.md index f21d9310e140..102d2ecd1595 100644 --- a/src/VMware/help/New-AzVMwarePrivateCloud.md +++ b/src/VMware/help/New-AzVMwarePrivateCloud.md @@ -14,7 +14,7 @@ Create or update a private cloud ``` New-AzVMwarePrivateCloud -Name -ResourceGroupName -Location - -ManagementClusterSize -NetworkBlock -Sku [-SubscriptionId ] + -ManagementClusterSize -NetworkBlock -Sku [-SubscriptionId ] [-AcceptEULA] [-Internet ] [-NsxtPassword ] [-Tag ] [-VcenterPassword ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -37,6 +37,21 @@ Create private cloud ## PARAMETERS +### -AcceptEULA +Accept EULA of AVS, legal term will pop up without this parameter provided + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AsJob Run the command as a job