Skip to content

Add legal term and parameter -AcceptEULA to 'New-AzVMwarePrivateCloud' #14111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 4, 2021
Merged
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
4 changes: 2 additions & 2 deletions src/VMware/Az.VMware.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 1/27/2021
# Generated on: 2/3/2021
#

@{
Expand Down Expand Up @@ -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 = ''
Expand Down
1 change: 1 addition & 0 deletions src/VMware/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/VMware/custom/LegalTerm.txt
Original file line number Diff line number Diff line change
@@ -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.
36 changes: 31 additions & 5 deletions src/VMware/custom/New-AzVMwarePrivateCloud.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function New-AzVMwarePrivateCloud {
[System.Int32]
# The cluster size
${ManagementClusterSize},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.String]
Expand All @@ -124,14 +124,19 @@ 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()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Azure')]
[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]
Expand Down Expand Up @@ -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
}
}
}


6 changes: 6 additions & 0 deletions src/VMware/exports/New-AzVMwarePrivateCloud.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down
6 changes: 6 additions & 0 deletions src/VMware/exports/ProxyCmdletDefinitions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down
10 changes: 5 additions & 5 deletions src/VMware/generate-info.json
Original file line number Diff line number Diff line change
@@ -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"
}
Loading