Skip to content
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

Adding new license type for az sql vm #11570

Merged
merged 7 commits into from
Dec 29, 2019
Merged
Show file tree
Hide file tree
Changes from 5 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: 4 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ Release History
* Remove unrelated exception from error message
* Fix issues with incorrect error message "You do not have the required permissions needed to perform this operation." when blocked by network rules or AuthenticationFailed.

**SQL VM**

* Add new --license-type supporting Disaster Recovery Benefit (DR).

2.0.76
++++++

Expand Down
6 changes: 6 additions & 0 deletions src/azure-cli/azure/cli/command_modules/sqlvm/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
- name: Create a SQL virtual machine with AHUB billing tag.
text: >
az sql vm create -n sqlvm -g myresourcegroup -l eastus --license-type AHUB
- name: Create a SQL virtual machine with DR billing tag.
text: >
az sql vm create -n sqlvm -g myresourcegroup -l eastus --license-type DR
- name: Create a SQL virtual machine with specific sku type and license type.
text: >
az sql vm create -n sqlvm -g myresourcegroup -l eastus --image-sku Enterprise --license-type AHUB
Expand Down Expand Up @@ -143,4 +146,7 @@
- name: Update a SQL virtual machine billing tag to AHUB.
text: >
az sql vm update -n sqlvm -g myresourcegroup --license-type AHUB
- name: Update a SQL virtual machine billing tag to DR.
text: >
az sql vm update -n sqlvm -g myresourcegroup --license-type DR
"""

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,32 @@ def test_sqlvm_update_license_and_sku(self, resource_group, resource_group_locat
JMESPathCheck('sqlServerLicenseType', 'AHUB')
])

# test license change for DR only.
self.cmd('sql vm update -n {} -g {} --license-type {}'
.format(sqlvm1, resource_group, 'DR'),
checks=[
JMESPathCheck('name', sqlvm1),
JMESPathCheck('location', resource_group_location),
JMESPathCheck('provisioningState', "Succeeded"),
JMESPathCheck('sqlImageSku', 'Enterprise'),
JMESPathCheck('sqlServerLicenseType', 'DR')
])

# delete sqlvm
self.cmd('sql vm delete -n {} -g {} --yes'
.format(sqlvm1, resource_group),
checks=NoneCheck())

# test create sqlvm with sql license type DR.
self.cmd('sql vm create -n {} -g {} -l {} --license-type {}'
.format(sqlvm1, resource_group, resource_group_location, 'DR'),
checks=[
JMESPathCheck('name', sqlvm1),
JMESPathCheck('location', resource_group_location),
JMESPathCheck('provisioningState', "Succeeded"),
JMESPathCheck('sqlServerLicenseType', 'DR'),
])


class SqlVmGroupScenarioTest(ScenarioTest):
@ResourceGroupPreparer()
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py2.Darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.15.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==5.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py2.Linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.15.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==5.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py2.windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.15.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==5.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.Darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.15.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==5.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.Linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.15.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==5.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.15.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==5.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
'azure-mgmt-servicefabric~=0.2.0',
'azure-mgmt-signalr~=0.3.0',
'azure-mgmt-sql~=0.15',
'azure-mgmt-sqlvirtualmachine~=0.4.0',
'azure-mgmt-sqlvirtualmachine~=0.5.0',
'azure-mgmt-storage~=5.0.0',
'azure-mgmt-trafficmanager~=0.51.0',
'azure-mgmt-web~=0.42.0',
Expand Down