-
Notifications
You must be signed in to change notification settings - Fork 13
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
Updated Python sample for IoT Central 1.0.0b1 #19
base: master
Are you sure you want to change the base?
Conversation
Updated the Python SDK sample to work with last IoT Central management SDK. Included the same functionality as the previous sample, and added examples of new functionality including - enabling system-assigned identity - regional instead of geographic scope - S1 SKU unavailable
poller = iotc.apps.begin_create_or_update(resourceGroup, appName, app) | ||
result = poller.result() | ||
print("It worked but it shouldn't have!") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add raise Exception here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inside a try who's except is the success condition and prints "OK", so raising here would print "OK".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
poller = iotc.apps.begin_create_or_update(resourceGroup, appNameS1, app) | ||
result = poller.result() | ||
print("It worked but it shouldn't have!") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here add raise Exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exception here means success (we expect exception) so raising exception here would print "OK".
Please also update the requirements.txt with latest deps. And the readme if needed. |
Will do. This is pending a version number update on the mgmt package. |
Updated the Python SDK sample to work with latest IoT Central management SDK. Included the same functionality as the previous sample, and added examples of new functionality including