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

[IoT Central] Add new sku name to iotcentral #11810

Merged
merged 7 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -3,6 +3,10 @@
Release History
===============

**IoT Central**

* Support app creation/update with the new sku name ST0, ST1, ST2.

2.0.79
++++++

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,58 @@

class IoTCentralTest(ScenarioTest):

@ResourceGroupPreparer() # name_prefix not required, but can be useful
@ResourceGroupPreparer(location='eastus') # name_prefix not required, but can be useful
def test_iotcentral_app(self, resource_group, resource_group_location):
app_name = self.create_random_name(prefix='iotc-cli-test', length=24)
template_app_name = app_name + '-template'
template_app_display_name = "My Custom App Display Name"
rg = resource_group
location = resource_group_location
template = 'iotc-devkit-sample@1.0.0'
template = 'iotc-default@1.0.0'
updatedName = app_name + 'update'

# Test 'az iotcentral app create'
self.cmd('iotcentral app create -n {0} -g {1} --sku S1 --subdomain {2}'.format(app_name, rg, app_name), checks=[
self.cmd('iotcentral app create -n {0} -g {1} --subdomain {2} --sku {3}'.format(app_name, rg, app_name, 'ST2'), checks=[
self.check('resourceGroup', rg),
self.check('location', location),
self.check('subdomain', app_name),
self.check('displayName', app_name),
self.check('sku.name', 'S1')])
self.check('sku.name', 'ST2')])

# Test 'az iotcentral app create with template and display name'
self.cmd('iotcentral app create -n {0} -g {1} --sku S1 --subdomain {2} --template {3} --display-name \"{4}\"'
.format(template_app_name, rg, template_app_name, template, template_app_display_name), checks=[
self.cmd('iotcentral app create -n {0} -g {1} --subdomain {2} --template {3} --display-name \"{4}\" --sku {5}'
.format(template_app_name, rg, template_app_name, template, template_app_display_name, 'ST1'), checks=[
self.check('resourceGroup', rg),
self.check('location', location),
self.check('subdomain', template_app_name),
self.check('displayName', template_app_display_name),
self.check('sku.name', 'S1'),
self.check('sku.name', 'ST1'),
self.check('template', template)])

# Test 'az iotcentral app update'
self.cmd('iotcentral app update -n {0} -g {1} --set displayName={2} subdomain={3}'
.format(template_app_name, rg, updatedName, updatedName), checks=[
self.cmd('iotcentral app update -n {0} -g {1} --set displayName={2} subdomain={3} sku.name={4}'
.format(template_app_name, rg, updatedName, updatedName, 'ST2'), checks=[
self.check('resourceGroup', rg),
self.check('location', location),
self.check('subdomain', updatedName),
self.check('displayName', updatedName)])
self.check('displayName', updatedName),
self.check('sku.name', 'ST2')])

# Test 'az iotcentral app show'
self.cmd('iotcentral app show -n {0} -g {1}'.format(app_name, rg), checks=[
self.check('resourceGroup', rg),
self.check('location', location),
self.check('subdomain', app_name),
self.check('displayName', app_name),
self.check('sku.name', 'S1')])
self.check('sku.name', 'ST2')])

# Test 'az iotcentral app show with template and display name'
self.cmd('iotcentral app show -n {0} -g {1}'.format(template_app_name, rg), checks=[
self.check('resourceGroup', rg),
self.check('location', location),
self.check('subdomain', updatedName),
self.check('displayName', updatedName),
self.check('sku.name', 'S1'),
self.check('sku.name', 'ST2'),
self.check('template', template)])

# Test 'az iotcentral app delete with template and display name'
Expand All @@ -72,7 +73,7 @@ def test_iotcentral_app(self, resource_group, resource_group_location):
self.check('[0].location', location),
self.check('[0].subdomain', app_name),
self.check('[0].displayName', app_name),
self.check('[0].sku.name', 'S1')])
self.check('[0].sku.name', 'ST2')])

# Test 'az iotcentral app delete'
self.cmd('iotcentral app delete -n {0} -g {1}'.format(app_name, rg), checks=[
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 @@ -44,7 +44,7 @@ azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.3.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.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 @@ -44,7 +44,7 @@ azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.3.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.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 @@ -43,7 +43,7 @@ azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.3.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.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 @@ -44,7 +44,7 @@ azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.3.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.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 @@ -44,7 +44,7 @@ azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.3.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.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 @@ -43,7 +43,7 @@ azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.3.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.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 @@ -90,7 +90,7 @@
'azure-mgmt-eventhub~=2.6',
'azure-mgmt-hdinsight~=1.3.0',
'azure-mgmt-imagebuilder~=0.2.1',
'azure-mgmt-iotcentral~=1.0',
'azure-mgmt-iotcentral~=2.0.0',
poanchen marked this conversation as resolved.
Show resolved Hide resolved
'azure-mgmt-iothub~=0.8.2',
'azure-mgmt-iothubprovisioningservices~=0.2.0',
'azure-mgmt-keyvault~=1.1',
Expand Down