Skip to content

Commit 99ade36

Browse files
VeryEarlyazurepowershelldingmeng-xue
authored
Add legal term and parameter -AcceptEULA to 'New-AzVMwarePrivateCloud' (#14111)
* Move VMware to master * update changelog * Update Changelog.md * Update New-AzVMwarePrivateCloud.ps1 * Update New-AzVMwarePrivateCloud.md * Update New-AzVMwarePrivateCloud.ps1 Co-authored-by: azurepowershell <[email protected]> Co-authored-by: Dingmeng Xue <[email protected]>
1 parent 028993b commit 99ade36

File tree

11 files changed

+189
-399
lines changed

11 files changed

+189
-399
lines changed

src/VMware/Az.VMware.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 1/27/2021
6+
# Generated on: 2/3/2021
77
#
88

99
@{
@@ -45,7 +45,7 @@ PowerShellVersion = '5.1'
4545
DotNetFrameworkVersion = '4.7.2'
4646

4747
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# CLRVersion = ''
48+
# ClrVersion = ''
4949

5050
# Processor architecture (None, X86, Amd64) required by this module
5151
# ProcessorArchitecture = ''

src/VMware/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
## Upcoming Release
2121
* [BreakingChange] Renamed module to Az.VMware
2222
* Set confirmation prompt poped by default
23+
* Displayed legal term and added parameter `AcceptEULA` for `New-AzVMwarePrivateCloud`
2324

2425
## Version 0.1.0
2526
* First preview release for module Az.VMWare

src/VMware/custom/LegalTerm.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
LEGAL TERMS
2+
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:
3+
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.
4+
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.
5+
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.
6+
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.

src/VMware/custom/New-AzVMwarePrivateCloud.ps1

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function New-AzVMwarePrivateCloud {
104104
[System.Int32]
105105
# The cluster size
106106
${ManagementClusterSize},
107-
107+
108108
[Parameter()]
109109
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
110110
[System.String]
@@ -124,14 +124,19 @@ function New-AzVMwarePrivateCloud {
124124
# Optionally, set the vCenter admin password when the private cloud is created
125125
${VcenterPassword},
126126

127+
[Parameter()]
128+
[System.Management.Automation.SwitchParameter]
129+
# Accept EULA of AVS, legal term will pop up without this parameter provided
130+
${AcceptEULA},
131+
127132
[Parameter()]
128133
[Alias('AzureRMContext', 'AzureCredential')]
129134
[ValidateNotNull()]
130135
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')]
131136
[System.Management.Automation.PSObject]
132137
# The credentials, account, tenant, and subscription used for communication with Azure.
133138
${DefaultProfile},
134-
139+
135140
[Parameter()]
136141
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Runtime')]
137142
[System.Management.Automation.SwitchParameter]
@@ -185,16 +190,37 @@ function New-AzVMwarePrivateCloud {
185190
)
186191

187192
process {
193+
if(!$AcceptEULA){
194+
$legalTermPath = Join-Path $PSScriptRoot -ChildPath "LegalTerm.txt"
195+
try {
196+
$legalTerm = (Get-Content -Path $legalTermPath) -join "`r`n"
197+
} catch {
198+
throw
199+
}
200+
$confirmation = Read-Host $legalTerm"`n[Y] Yes [N] No (default is `"N`")"
201+
switch ($confirmation) {
202+
'Y' {
203+
Break
204+
}
205+
206+
Default {
207+
Return
208+
}
209+
}
210+
}else {
211+
$null = $PSBoundParameters.Remove('AcceptEULA')
212+
}
213+
188214
try {
189215
if($PSBoundParameters.ContainsKey('Sku')) {
190216
$sku = $PSBoundParameters['Sku']
191-
$PSBoundParameters.Remove('Sku')
217+
$null = $PSBoundParameters.Remove('Sku')
192218
$PSBoundParameters.Add('SkuName', $sku)
193-
}
219+
}
194220
Az.VMware.internal\New-AzVMwarePrivateCloud @PSBoundParameters
195221
} catch {
196222
throw
197223
}
198224
}
199225
}
200-
226+

src/VMware/exports/New-AzVMwarePrivateCloud.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ param(
106106
# Optionally, set the vCenter admin password when the private cloud is created
107107
${VcenterPassword},
108108

109+
[Parameter()]
110+
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
111+
[System.Management.Automation.SwitchParameter]
112+
# Accept EULA of AVS, legal term will pop up without this parameter provided
113+
${AcceptEULA},
114+
109115
[Parameter()]
110116
[Alias('AzureRMContext', 'AzureCredential')]
111117
[ValidateNotNull()]

src/VMware/exports/ProxyCmdletDefinitions.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,6 +2253,12 @@ param(
22532253
# Optionally, set the vCenter admin password when the private cloud is created
22542254
${VcenterPassword},
22552255

2256+
[Parameter()]
2257+
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
2258+
[System.Management.Automation.SwitchParameter]
2259+
# Accept EULA of AVS, legal term will pop up withoutt this parameter provided
2260+
${AcceptEULA},
2261+
22562262
[Parameter()]
22572263
[Alias('AzureRMContext', 'AzureCredential')]
22582264
[ValidateNotNull()]

src/VMware/generate-info.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"autorest": "3.0.6187",
3-
"swagger_commit": "e5b2bd6a4d8de7a0a30bd6057d5d66a5b96d8737",
4-
"autorest_powershell": "3.0.419",
2+
"autorest_core": "3.0.6369",
53
"autorest_modelerfour": "4.15.414",
6-
"node": "v12.16.1",
7-
"autorest_core": "3.0.6365"
4+
"autorest": "`-- (empty)",
5+
"swagger_commit": "fbd281068937dcf905cb4a87a1c1a40646819bb4",
6+
"node": "v10.16.0",
7+
"autorest_powershell": "3.0.417"
88
}

0 commit comments

Comments
 (0)