iotedgedev 3.3.5__zip → 3.3.6__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. s/.git/FETCH_HEAD +2 -1
  2. s/.git/HEAD +1 -1
  3. s/.git/index +0 -0
  4. s/.git/logs/HEAD +1 -1
  5. s/.git/logs/refs/remotes/origin/EO +1 -1
  6. s/.git/logs/refs/remotes/origin/avagraw/security_fix +1 -1
  7. s/.git/logs/refs/remotes/origin/cherry-pick-rename +1 -1
  8. s/.git/logs/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -1
  9. s/.git/logs/refs/remotes/origin/chyuan/update-linux-agent +1 -1
  10. s/.git/logs/refs/remotes/origin/dependabot/pip/cookiecutter-2.1.1 +1 -1
  11. s/.git/logs/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -1
  12. s/.git/logs/refs/remotes/origin/main +1 -1
  13. s/.git/logs/refs/remotes/origin/ray-deps +1 -1
  14. s/.git/logs/refs/remotes/origin/ray-dev-setup +1 -1
  15. s/.git/logs/refs/remotes/origin/ray-tox +1 -1
  16. s/.git/logs/refs/remotes/origin/release-pipeline-automation +1 -1
  17. s/.git/logs/refs/remotes/origin/revert-594-user/vikas_bug-pyopenssl +1 -0
  18. s/.git/logs/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -1
  19. s/.git/logs/refs/remotes/origin/spmcdono/layered-deployments +1 -1
  20. s/.git/logs/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -1
  21. s/.git/logs/refs/remotes/origin/spmcdono/remove-py2 +1 -1
  22. s/.git/logs/refs/remotes/origin/spmcdono/remove-py2-dev +1 -1
  23. s/.git/logs/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -1
  24. s/.git/logs/refs/remotes/origin/spmcdono/update-pipeline +1 -1
  25. s/.git/logs/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -1
  26. s/.git/logs/refs/remotes/origin/user/marine/fixsimver +1 -1
  27. s/.git/logs/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -1
  28. s/.git/logs/refs/remotes/origin/user/marine/master-to-main +1 -1
  29. s/.git/logs/refs/remotes/origin/user/marine/pipeline +1 -1
  30. s/.git/logs/refs/remotes/origin/user/vikas +1 -1
  31. s/.git/logs/refs/remotes/origin/user/vikas-bud-fix +1 -0
  32. s/.git/logs/refs/remotes/origin/user/vikas0212/verify-tests +1 -1
  33. s/.git/logs/refs/remotes/origin/user/vikas2 +1 -1
  34. s/.git/logs/refs/remotes/origin/user/vikas_bug-pyopenssl +1 -0
  35. s/.git/logs/refs/remotes/origin/user/vikas_pypi +1 -1
  36. s/.git/logs/refs/remotes/origin/user/vikas_pypi-1 +1 -1
  37. s/.git/logs/refs/remotes/origin/user/vikas_supplychain-issue1 +1 -1
  38. s/.git/logs/refs/remotes/origin/user/vikas_testing +1 -1
  39. s/.git/logs/refs/remotes/origin/user/vikas_trigger +1 -1
  40. s/.git/logs/refs/remotes/origin/user/vikas_trigger_new +1 -1
  41. s/.git/logs/refs/remotes/origin/user/xinzed/dps_conn_str +1 -1
  42. s/.git/logs/refs/remotes/origin/user/xinzed/update-python-docker +1 -1
  43. s/.git/logs/refs/remotes/origin/vikas/azure +1 -1
  44. s/.git/logs/refs/remotes/origin/vikas/dependebot +1 -1
  45. s/.git/logs/refs/remotes/origin/vikas-triggers +1 -1
  46. s/.git/logs/refs/remotes/origin/xinzed/3_1_0rc1 +1 -1
  47. s/.git/logs/refs/remotes/origin/xinzed/update-runtime +1 -1
  48. s/.git/objects/pack/{pack-7a60b35c219082b6cfceccd45f3712d11b9c0e3b.idx → pack-b6923255c7f7ef51c11dbd2c8db7ce310d4daf99.idx} +0 -0
  49. s/.git/objects/pack/{pack-7a60b35c219082b6cfceccd45f3712d11b9c0e3b.pack → pack-b6923255c7f7ef51c11dbd2c8db7ce310d4daf99.pack} +0 -0
  50. s/.git/refs/remotes/origin/dependabot/pip/cookiecutter-2.1.1 +1 -1
  51. s/.git/refs/remotes/origin/main +1 -1
  52. s/.git/refs/remotes/origin/revert-594-user/vikas_bug-pyopenssl +1 -0
  53. s/.git/refs/remotes/origin/user/vikas-bud-fix +1 -0
  54. s/.git/refs/remotes/origin/user/vikas_bug-pyopenssl +1 -0
  55. s/.git/refs/tags/v3.3.6 +1 -0
  56. s/CHANGELOG.md +5 -0
  57. s/build/lib/iotedgedev/__init__.py +1 -1
  58. s/build/lib/iotedgedev/azurecli.py +33 -0
  59. s/build/lib/iotedgedev/cli.py +75 -40
  60. s/build/lib/iotedgedev/envvars.py +1 -0
  61. s/build/lib/iotedgedev/output.py +4 -0
  62. s/dist/{iotedgedev-3.3.5-py3-none-any.whl → iotedgedev-3.3.6-py3-none-any.whl} +0 -0
  63. s/docs/command-list.md +1 -0
  64. s/docs/environment-setup/manual-dev-machine-setup.md +1 -1
  65. s/docs/quickstart.md +2 -2
  66. s/iotedgedev/__init__.py +1 -1
  67. s/iotedgedev/azurecli.py +33 -0
  68. s/iotedgedev/cli.py +75 -40
  69. s/iotedgedev/envvars.py +1 -0
  70. s/iotedgedev/output.py +4 -0
  71. s/iotedgedev.egg-info/PKG-INFO +1 -1
  72. s/iotedgedev.egg-info/requires.txt +1 -1
  73. s/requirements.txt +1 -1
  74. s/setup.cfg +1 -1
  75. s/setup.py +2 -2
  76. s/tests/__init__.py +1 -1
s/.git/FETCH_HEAD CHANGED
@@ -1,4 +1,4 @@
1
- e4c86fce83e16e621993696889a9e35ad343d053 'e4c86fce83e16e621993696889a9e35ad343d053' of https://github.com/Azure/iotedgedev
1
+ 003878efb6761b1c7ace368130cb4b8a48176552 '003878efb6761b1c7ace368130cb4b8a48176552' of https://github.com/Azure/iotedgedev
2
2
  ecbf26c295b01842d2669a8b1369217b94652210 not-for-merge tag 'v0.49.0' of https://github.com/Azure/iotedgedev
3
3
  8057fa1912603f8de1d3ea5dce945276a188a7a3 not-for-merge tag 'v0.50.0' of https://github.com/Azure/iotedgedev
4
4
  687bb8eae441816dfa427fab86844e24f63eb615 not-for-merge tag 'v0.51.0' of https://github.com/Azure/iotedgedev
@@ -60,3 +60,4 @@ db420607db777f90eb178635bd8c33ad2c21f242 not-for-merge tag 'v3.3.3' of https://g
60
60
  50459b5a8ec73e5629bf5b88136fce95b9083e90 not-for-merge tag 'v3.3.3-rc0' of https://github.com/Azure/iotedgedev
61
61
  f28b9ff2015dc3362461ede5d3633d6ba6ea5750 not-for-merge tag 'v3.3.4' of https://github.com/Azure/iotedgedev
62
62
  b774407faf29a5caa2c02c712de222b765f1bb9a not-for-merge tag 'v3.3.5' of https://github.com/Azure/iotedgedev
63
+ 3102dcc34b170418305f3c6e16322709f3543ffe not-for-merge tag 'v3.3.6' of https://github.com/Azure/iotedgedev
s/.git/HEAD CHANGED
@@ -1 +1 @@
1
- e4c86fce83e16e621993696889a9e35ad343d053
1
+ 003878efb6761b1c7ace368130cb4b8a48176552
s/.git/index CHANGED
Binary file
s/.git/logs/HEAD CHANGED
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 e4c86fce83e16e621993696889a9e35ad343d053 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714746 +0000 checkout: moving from master to e4c86fce83e16e621993696889a9e35ad343d053
1
+ 0000000000000000000000000000000000000000 003878efb6761b1c7ace368130cb4b8a48176552 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 checkout: moving from master to 003878efb6761b1c7ace368130cb4b8a48176552
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 ae2afcb52cd0a0d5f26cbf8b8c00d0b123be4a74 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 ae2afcb52cd0a0d5f26cbf8b8c00d0b123be4a74 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 42629e5169b74ad10aa6528f527a183237b0580f Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 42629e5169b74ad10aa6528f527a183237b0580f Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 d49164bcf55d16f95546cfbbe7a9e07cfd4aee89 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 d49164bcf55d16f95546cfbbe7a9e07cfd4aee89 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 7f5b10cafb983f2cc4fe7a0c6a407e69d7b84985 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 7f5b10cafb983f2cc4fe7a0c6a407e69d7b84985 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 06e9bf5fcd3a93ad0667c53547eceb5868589126 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 06e9bf5fcd3a93ad0667c53547eceb5868589126 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 deaf5a34cae3bd84c9fa9112b76310f2409ecf27 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 3c5f9acff20d5ef82054abb10997c1658f841f4e Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 25714178067a61e39438ccffe7eff396f7f7e9e3 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 25714178067a61e39438ccffe7eff396f7f7e9e3 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 e4c86fce83e16e621993696889a9e35ad343d053 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 003878efb6761b1c7ace368130cb4b8a48176552 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 74c6f90a1e3751abd06d487625b07e84d11e6c6e Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 74c6f90a1e3751abd06d487625b07e84d11e6c6e Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 599bb7ff9c026d612c77ec700b116a867e3757c2 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 599bb7ff9c026d612c77ec700b116a867e3757c2 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 0cc926ef18ebe085789a09357be605998f195edf Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 0cc926ef18ebe085789a09357be605998f195edf Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 58a1182e8e7eac276e902d2d321382494b4846a1 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 58a1182e8e7eac276e902d2d321382494b4846a1 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 268d2e835ee5d136610b226237743378e8458030 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 77c1694bbf19df945c567a2657073f2dfa1dccdc Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 77c1694bbf19df945c567a2657073f2dfa1dccdc Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 54fc80ff8534bdca14f570715e28e56fb8f453da Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 54fc80ff8534bdca14f570715e28e56fb8f453da Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 83e7c844ae3c81058605fe34e75b8b139b3d8fa7 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 83e7c844ae3c81058605fe34e75b8b139b3d8fa7 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 2f7f0d7fdef55d3b005e0b0697f407e2657b5d6e Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 2f7f0d7fdef55d3b005e0b0697f407e2657b5d6e Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 789db9ef514814f371a52388684635b457c47f1c Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 789db9ef514814f371a52388684635b457c47f1c Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 2f30776bc2c8cf3a83659414d6c440f10a8ba70d Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 2f30776bc2c8cf3a83659414d6c440f10a8ba70d Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 77c1694bbf19df945c567a2657073f2dfa1dccdc Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 77c1694bbf19df945c567a2657073f2dfa1dccdc Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 47c809726263d1b6e613e531042746c84fb5e0ea Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 47c809726263d1b6e613e531042746c84fb5e0ea Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 42a529627aa48e0dee2f012be438103e412f90bd Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 42a529627aa48e0dee2f012be438103e412f90bd Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 7bb5ac6dec5c8e1f47049bfc2bf3581375735fc5 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 7bb5ac6dec5c8e1f47049bfc2bf3581375735fc5 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 9b15bce20be08b338e1c621665502a2cc671a881 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 9b15bce20be08b338e1c621665502a2cc671a881 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 9045e71344f0abe3c5c73d5b4d860e65685c9bdf Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 9045e71344f0abe3c5c73d5b4d860e65685c9bdf Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 9b33a26cb9f8c93317abed806db14dae840e6ae5 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 9b33a26cb9f8c93317abed806db14dae840e6ae5 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 003878efb6761b1c7ace368130cb4b8a48176552 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 27d2d12430daa953360f6e68184c08492f1deade Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 27d2d12430daa953360f6e68184c08492f1deade Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 e9d71febca54f94ec6a072d0d8902e28750279e3 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 e9d71febca54f94ec6a072d0d8902e28750279e3 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -0,0 +1 @@
1
+ 0000000000000000000000000000000000000000 8437e682ba06376bae90685c4ab185a806aecdd0 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 7ef7125fcd10b835b540f6f66666b464662a7f7d Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 7ef7125fcd10b835b540f6f66666b464662a7f7d Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 480af5dab0cd3a8cbcba6f12a303ffbe77896064 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 480af5dab0cd3a8cbcba6f12a303ffbe77896064 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 370a437a2c3a13fecb80151734f38690af1fa488 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 370a437a2c3a13fecb80151734f38690af1fa488 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 b775a2f82cb4786214e580a3806adeeb9cb853a9 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 b775a2f82cb4786214e580a3806adeeb9cb853a9 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 d388eea15656fdfc728538854c47d0cddee51412 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 d388eea15656fdfc728538854c47d0cddee51412 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 85746efe2c7945c625f3e6503f818187daef0955 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 85746efe2c7945c625f3e6503f818187daef0955 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 33aa231e90673514290e4e44c94a8d643f1dc293 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 33aa231e90673514290e4e44c94a8d643f1dc293 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 0340a4328d1a13e83c03fc72a768d221b57413ab Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 0340a4328d1a13e83c03fc72a768d221b57413ab Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 a1ed75eedffe48a0f119ddd857d1d293c759fb8b Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 a1ed75eedffe48a0f119ddd857d1d293c759fb8b Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 5891e66b0f46b9e0ea2129c9e4fae2ca4ee3576c Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 5891e66b0f46b9e0ea2129c9e4fae2ca4ee3576c Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 60d9b8e55ad841d9a582b9c71f04f9ddb1bfdca3 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 60d9b8e55ad841d9a582b9c71f04f9ddb1bfdca3 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 a0cef647a0e626d4df6e40932e95e580906de333 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 a0cef647a0e626d4df6e40932e95e580906de333 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- 0000000000000000000000000000000000000000 8d57e913bd2e57d2343eb7f74b2df8939170f166 Ubuntu <cloudtest@51fd0ce1c000000.(none)> 1663714745 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
1
+ 0000000000000000000000000000000000000000 8d57e913bd2e57d2343eb7f74b2df8939170f166 Ubuntu <cloudtest@6dd90968c000000.(none)> 1665453369 +0000 fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin: storing head
@@ -1 +1 @@
1
- deaf5a34cae3bd84c9fa9112b76310f2409ecf27
1
+ 3c5f9acff20d5ef82054abb10997c1658f841f4e
@@ -1 +1 @@
1
- e4c86fce83e16e621993696889a9e35ad343d053
1
+ 003878efb6761b1c7ace368130cb4b8a48176552
@@ -0,0 +1 @@
1
+ 268d2e835ee5d136610b226237743378e8458030
@@ -0,0 +1 @@
1
+ 003878efb6761b1c7ace368130cb4b8a48176552
@@ -0,0 +1 @@
1
+ 8437e682ba06376bae90685c4ab185a806aecdd0
@@ -0,0 +1 @@
1
+ 3102dcc34b170418305f3c6e16322709f3543ffe
s/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project since 0.82.0 will be documented in this file.
4
4
 
5
+ ## [3.3.6] - 2022-10-10
6
+
7
+ - Update docker compose
8
+ - Update simulator version
9
+
5
10
  ## [3.3.5] - 2022-05-17
6
11
 
7
12
  - Update azure-cli-core
@@ -2,5 +2,5 @@
2
2
 
3
3
  __author__ = 'Microsoft Corporation'
4
4
  __email__ = 'opencode@microsoft.com'
5
- __version__ = '3.3.5'
5
+ __version__ = '3.3.6'
6
6
  __AIkey__ = 'fed7fc65-5b4a-4e66-9d46-c5f016d4e2b4'
@@ -6,6 +6,7 @@ import subprocess
6
6
  import sys
7
7
  from io import StringIO
8
8
  from threading import Thread, Timer
9
+ from pathlib import Path
9
10
 
10
11
  from azure.cli.core import get_default_cli
11
12
  from fstrings import f
@@ -550,3 +551,35 @@ class AzureCli:
550
551
  return data["connectionString"]
551
552
 
552
553
  return ''
554
+
555
+ def get_ssh_key(self, ssh_key_file):
556
+ file_path = Path.home().joinpath(".ssh", ssh_key_file + ".pub")
557
+ if not os.path.exists(file_path):
558
+ self.output.status(f("No SSH key found at ~/.ssh/{ssh_key_file}.pub. Generating a new one..."))
559
+ os.system(f("ssh-keygen -t rsa -b 4096 -C \"iotedgedev-autogenerated\" -f ~/.ssh/{ssh_key_file} -q -N \"\""))
560
+
561
+ with open(file_path, 'r') as file:
562
+ ssh_key = file.read()
563
+ return ssh_key
564
+
565
+ def create_edge_vm(self, ssh_key_file, edge_device_id, iothub, resource_group):
566
+ self.output.status(f("\nCreating a new Virtual Machine in '{resource_group}' with ssh key file '{ssh_key_file}'..."))
567
+
568
+ connectionString = self.get_device_connection_string(edge_device_id, iothub, resource_group)
569
+ # Use IoTHub name for deployment - in this case it will create a new
570
+ # template if a new IoT Hub is created.
571
+ deploymentTemplateName = "edgeVM-" + iothub
572
+
573
+ ssh_key = self.get_ssh_key(ssh_key_file)
574
+
575
+ self.output.status(f("Creating Virtual Machine in '{resource_group}' with an incremental deployment template '{deploymentTemplateName}', this can take some time..."))
576
+ return self.invoke_az_cli_outproc(["deployment", "group", "create", "--name", deploymentTemplateName,
577
+ "--resource-group", resource_group,
578
+ "--template-uri", "https://raw.githubusercontent.com/Azure/iotedge-vm-deploy/master/edgeDeploy.json",
579
+ "--parameters", "dnsLabelPrefix=iotedgedev-vm",
580
+ "--parameters", "adminUsername=azureuser",
581
+ "--parameters", "authenticationType=sshPublicKey",
582
+ "--parameters", "adminPasswordOrKey=" + ssh_key,
583
+ "--parameters", "deviceConnectionString=" + connectionString,
584
+ "--output", "table"],
585
+ f("Failed to create the VM with deployment template '{deploymentTemplateName}'."))
@@ -25,11 +25,17 @@ from .solution import Solution
25
25
  from .utility import Utility
26
26
 
27
27
  # Extend click.Group#add_command(cmd, name) to take deprecated=bool flag by monkey patching.
28
- def add_command_with_deprecation(self, cmd: Command, name: t.Optional[str] = None, deprecated = False):
28
+ def add_command_with_deprecation(self, cmd: Command, name: t.Optional[str] = None, deprecated = False, alt: t.Optional[str] = None):
29
29
  # Directly changing the deprecated flag of the cmd has side-effects on the reference source.
30
30
  # To avoid this, copy the cmd object with deepcopy.
31
31
  copied_command = copy.deepcopy(cmd)
32
32
  copied_command.deprecated = deprecated
33
+ if copied_command.short_help is None:
34
+ copied_command.short_help = copied_command.help
35
+ if alt is not None:
36
+ alt_cmd = "[Use `iotedgedev " + alt + "` instead]"
37
+ copied_command.short_help += " " + alt_cmd # use space for formatting short_help in `iotedgedev --help`
38
+ copied_command.help += "\n\n" + alt_cmd # use newline for formatting help in `iotedgedev <command> --help`
33
39
  self.add_command(copied_command, name)
34
40
 
35
41
  Group.add_command_with_deprecation = add_command_with_deprecation
@@ -99,7 +105,7 @@ def new(name, module, template, edge_runtime_version, group_id):
99
105
  sol = Solution(output, utility)
100
106
  sol.create(name, module, template, edge_runtime_version, group_id)
101
107
 
102
- main.add_command_with_deprecation(new, deprecated=True)
108
+ main.add_command_with_deprecation(new, deprecated=True, alt="solution new")
103
109
 
104
110
 
105
111
  @solution.command(context_settings=CONTEXT_SETTINGS,
@@ -132,7 +138,7 @@ def init(name, module, template, group_id, edge_runtime_version):
132
138
  utility.call_proc(azsetupcmd.split())
133
139
 
134
140
 
135
- main.add_command_with_deprecation(init, deprecated=True)
141
+ main.add_command_with_deprecation(init, deprecated=True, alt="solution init")
136
142
 
137
143
 
138
144
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Push, deploy, start, monitor")
@@ -155,7 +161,7 @@ def add(name, template, group_id):
155
161
  mod.add(name, template, group_id)
156
162
 
157
163
 
158
- main.add_command_with_deprecation(add, deprecated=True)
164
+ main.add_command_with_deprecation(add, deprecated=True, alt="solution add")
159
165
 
160
166
 
161
167
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Build the solution")
@@ -197,7 +203,7 @@ def build(ctx, push, do_deploy, template_file, platform):
197
203
  ctx.invoke(deploy)
198
204
 
199
205
 
200
- main.add_command_with_deprecation(build, deprecated=True)
206
+ main.add_command_with_deprecation(build, deprecated=True, alt="solution build")
201
207
 
202
208
 
203
209
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Push module images to container registry")
@@ -238,7 +244,7 @@ def push(ctx, do_deploy, no_build, template_file, platform):
238
244
  ctx.invoke(deploy)
239
245
 
240
246
 
241
- main.add_command_with_deprecation(push, deprecated=True)
247
+ main.add_command_with_deprecation(push, deprecated=True, alt="solution push")
242
248
 
243
249
 
244
250
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Deploy solution to IoT Edge device")
@@ -256,7 +262,7 @@ def deploy(manifest_file):
256
262
  edge.deploy(manifest_file)
257
263
 
258
264
 
259
- main.add_command_with_deprecation(deploy, deprecated=True)
265
+ main.add_command_with_deprecation(deploy, deprecated=True, alt="solution deploy")
260
266
 
261
267
 
262
268
  @iothub.command(
@@ -351,7 +357,7 @@ def genconfig(template_file, platform, fail_on_validation_error):
351
357
  mod.build_push(template_file, platform, no_build=True, no_push=True, fail_on_validation_error=fail_on_validation_error)
352
358
 
353
359
 
354
- main.add_command_with_deprecation(genconfig, deprecated=True)
360
+ main.add_command_with_deprecation(genconfig, deprecated=True, alt="solution genconfig")
355
361
 
356
362
 
357
363
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -374,7 +380,7 @@ def setup_simulator(gateway_host, iothub_connection_string):
374
380
  sim.setup(gateway_host, iothub_connection_string)
375
381
 
376
382
 
377
- main.add_command_with_deprecation(setup_simulator, deprecated=True)
383
+ main.add_command_with_deprecation(setup_simulator, deprecated=True, alt="simulator setup")
378
384
 
379
385
 
380
386
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -449,7 +455,7 @@ def start_simulator(setup, solution, build, manifest_file, platform, verbose, in
449
455
  sim.start_single(inputs, port)
450
456
 
451
457
 
452
- main.add_command_with_deprecation(start_simulator, deprecated=True)
458
+ main.add_command_with_deprecation(start_simulator, deprecated=True, alt="simulator start")
453
459
 
454
460
 
455
461
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -461,7 +467,7 @@ def stop_simulator():
461
467
  sim.stop()
462
468
 
463
469
 
464
- main.add_command_with_deprecation(stop_simulator, deprecated=True)
470
+ main.add_command_with_deprecation(stop_simulator, deprecated=True, alt="simulator stop")
465
471
 
466
472
 
467
473
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -501,7 +507,7 @@ def monitor(timeout):
501
507
  ih.monitor_events(timeout)
502
508
 
503
509
 
504
- main.add_command_with_deprecation(monitor, deprecated=True)
510
+ main.add_command_with_deprecation(monitor, deprecated=True, alt="iothub monitor")
505
511
 
506
512
 
507
513
  def ensure_azure_cli_iot_ext():
@@ -622,25 +628,31 @@ def validate_option(ctx, param, value):
622
628
  def list_edge_devices_and_set_default():
623
629
  if not azure_cli.list_edge_devices(envvars.IOTHUB_NAME):
624
630
  sys.exit()
625
- return "iotedgedev-edgedevice"
631
+ output.info("Enter the IoT Edge Device Id (Creates a new Edge Device if not found) [iotedgedev-edgedevice]:")
632
+ return input() or "iotedgedev-edgedevice"
626
633
 
627
634
 
628
635
  def list_iot_hubs_and_set_default():
629
636
  if not azure_cli.list_iot_hubs(envvars.RESOURCE_GROUP_NAME):
630
637
  sys.exit()
631
638
 
639
+ subscription_rg_hash = hashlib.sha1((default_subscriptionId + envvars.RESOURCE_GROUP_NAME).encode('utf-8')).hexdigest()[:6]
640
+ iothub_name = "iotedgedev-iothub-" + subscription_rg_hash
641
+
632
642
  first_iothub = azure_cli.get_first_iothub(envvars.RESOURCE_GROUP_NAME)
633
643
  if first_iothub:
634
- return first_iothub
635
- else:
636
- subscription_rg_hash = hashlib.sha1((default_subscriptionId + envvars.RESOURCE_GROUP_NAME).encode('utf-8')).hexdigest()[:6]
637
- return "iotedgedev-iothub-" + subscription_rg_hash
644
+ iothub_name = first_iothub
645
+
646
+ output.info(f"Enter the IoT Hub Name (Creates a new IoT Hub if not found) [{iothub_name}]:")
647
+ return input() or iothub_name
638
648
 
639
649
 
640
650
  def list_resource_groups_and_set_default():
641
651
  if not azure_cli.list_resource_groups():
642
652
  sys.exit()
643
- return "iotedgedev-rg"
653
+
654
+ output.info("Enter Resource Group Name (Creates a new Resource Group if not found) [iotedgedev-rg]:")
655
+ return input() or "iotedgedev-rg"
644
656
 
645
657
 
646
658
  def list_subscriptions_and_set_default():
@@ -657,14 +669,30 @@ def list_subscriptions_and_set_default():
657
669
  if not azure_cli.list_subscriptions():
658
670
  sys.exit()
659
671
  default_subscriptionId = azure_cli.get_default_subscription()
660
- return default_subscriptionId
672
+ output.info(f"Select an Azure Subscription Name or Id [{default_subscriptionId}]:")
673
+ return input() or default_subscriptionId
661
674
 
662
675
 
663
- def header_and_default(header, default, default2=None):
676
+ def header_and_default(header, prompt, default, options=None):
664
677
  output.header(header)
665
- if default == '' and default2 is not None:
666
- return default2
667
- return default
678
+ output.info(f"{prompt} [{default}]:")
679
+ output.info(f"Available options: {options}")
680
+ return input() or default
681
+
682
+
683
+ def handle_vm_create():
684
+ output.header("CREATE VIRTUAL MACHINE")
685
+ output.info("The virtual machine will be created with the IoT Edge runtime installed.\n"
686
+ "The deployment template can be found at: https://aka.ms/iotedge-vm-deploy \n"
687
+ "The name of the virtual machine will be a unique string generated by the template.\n"
688
+ "Details: os=ubuntu20_04-lts, size=Standard_DS1_v2, username=azureuser, allowSsh=true")
689
+ ssh_key_file = output.prompt_question("SSH Key file (must be located in ~/.ssh and will be created if it doesn't exist)", "id_rsa_iotedgedev")
690
+ if not azure_cli.create_edge_vm(ssh_key_file, envvars.EDGE_DEVICE_ID, envvars.IOTHUB_NAME, envvars.RESOURCE_GROUP_NAME):
691
+ raise click.BadParameter(f('Could not create Virtual Machine in {envvars.RESOURCE_GROUP_NAME}'))
692
+ else:
693
+ output.info("Virtual Machine created successfully. Check Azure Portal for details on how to connect.\n"
694
+ "WARNING: Check the details of the Network Security Group, it is setup to allow SSH from all addresses.\n"
695
+ "You will be able to connect using the SSH Key file: ~/.ssh/" + ssh_key_file)
668
696
 
669
697
 
670
698
  @iothub.command(context_settings=CONTEXT_SETTINGS,
@@ -688,51 +716,46 @@ def header_and_default(header, default, default2=None):
688
716
  help="Enter Azure Service Principal Credentials (username password tenant).")
689
717
  @click.option('--subscription',
690
718
  envvar=envvars.get_envvar_key_if_val("SUBSCRIPTION_ID"),
691
- default=lambda: list_subscriptions_and_set_default(),
719
+ default=list_subscriptions_and_set_default,
692
720
  required=True,
693
721
  callback=validate_option,
694
- prompt="Select an Azure Subscription Name or Id:",
695
722
  help="The Azure Subscription Name or Id.")
696
723
  @click.option('--resource-group-location',
697
724
  envvar=envvars.get_envvar_key_if_val("RESOURCE_GROUP_LOCATION"),
698
725
  required=True,
699
- default=lambda: header_and_default('RESOURCE GROUP LOCATION', envvars.RESOURCE_GROUP_LOCATION, 'westus'),
700
- type=click.Choice(['australiaeast', 'australiasoutheast', 'brazilsouth', 'canadacentral', 'canadaeast', 'centralindia', 'centralus', 'eastasia', 'eastus', 'eastus2',
701
- 'japanwest', 'japaneast', 'northeurope', 'northcentralus', 'southindia', 'uksouth', 'ukwest', 'westus', 'westeurope', 'southcentralus', 'westcentralus', 'westus2']),
726
+ default=lambda: header_and_default('RESOURCE GROUP LOCATION', 'Enter a Resource Group Location', envvars.RESOURCE_GROUP_LOCATION or 'westus',
727
+ ['australiaeast', 'australiasoutheast', 'brazilsouth', 'canadacentral', 'canadaeast', 'centralindia', 'centralus', 'eastasia', 'eastus', 'eastus2',
728
+ 'japanwest', 'japaneast', 'northeurope', 'northcentralus', 'southindia', 'uksouth', 'ukwest', 'westus', 'westeurope', 'southcentralus', 'westcentralus', 'westus2']),
729
+ type=str,
702
730
  callback=validate_option,
703
- prompt="Enter a Resource Group Location:",
704
731
  help="The Resource Group Location.")
705
732
  @click.option('--resource-group-name',
706
733
  envvar=envvars.get_envvar_key_if_val("RESOURCE_GROUP_NAME"),
707
734
  required=True,
708
- default=lambda: list_resource_groups_and_set_default(),
735
+ default=list_resource_groups_and_set_default,
709
736
  type=str,
710
737
  callback=validate_option,
711
- prompt="Enter Resource Group Name (Creates a new Resource Group if not found):",
712
738
  help="The Resource Group Name (Creates a new Resource Group if not found).")
713
739
  @click.option('--iothub-sku',
714
740
  envvar=envvars.get_envvar_key_if_val("IOTHUB_SKU"),
715
741
  required=True,
716
- default=lambda: header_and_default('IOTHUB SKU', 'F1'),
717
- type=click.Choice(['F1', 'S1', 'S2', 'S3']),
742
+ default=lambda: header_and_default('IOTHUB SKU', 'Enter IoT Hub SKU', 'F1', ['F1', 'S1', 'S2', 'S3']),
743
+ type=str,
718
744
  callback=validate_option,
719
- prompt="Enter IoT Hub SKU (F1|S1|S2|S3):",
720
745
  help="The IoT Hub SKU.")
721
746
  @click.option('--iothub-name',
722
747
  envvar=envvars.get_envvar_key_if_val("IOTHUB_NAME"),
723
748
  required=True,
724
- default=lambda: list_iot_hubs_and_set_default(),
749
+ default=list_iot_hubs_and_set_default,
725
750
  type=str,
726
751
  callback=validate_option,
727
- prompt='Enter the IoT Hub Name (Creates a new IoT Hub if not found):',
728
752
  help='The IoT Hub Name (Creates a new IoT Hub if not found).')
729
753
  @click.option('--edge-device-id',
730
754
  envvar=envvars.get_envvar_key_if_val("EDGE_DEVICE_ID"),
731
755
  required=True,
732
- default=lambda: list_edge_devices_and_set_default(),
756
+ default=list_edge_devices_and_set_default,
733
757
  type=str,
734
758
  callback=validate_option,
735
- prompt='Enter the IoT Edge Device Id (Creates a new Edge Device if not found):',
736
759
  help='The IoT Edge Device Id (Creates a new Edge Device if not found).')
737
760
  @click.option('--update-dotenv',
738
761
  "-u",
@@ -743,6 +766,14 @@ def header_and_default(header, default, default2=None):
743
766
  is_flag=True,
744
767
  prompt='Update the .env file with connection strings?',
745
768
  help='If True, the current .env will be updated with the IoT Hub and Device connection strings.')
769
+ @click.option('--create-edge-vm',
770
+ envvar=envvars.get_envvar_key_if_val("CREATE_EDGE_VM"),
771
+ required=True,
772
+ default=False,
773
+ show_default=True,
774
+ is_flag=True,
775
+ prompt='Create a new Virtual Machine with IoTEdge?',
776
+ help='If true, creates a new Virtual Machine with IoTEdge.')
746
777
  @with_telemetry
747
778
  def setup_iothub(credentials,
748
779
  service_principal,
@@ -752,13 +783,17 @@ def setup_iothub(credentials,
752
783
  iothub_sku,
753
784
  iothub_name,
754
785
  edge_device_id,
755
- update_dotenv):
786
+ update_dotenv,
787
+ create_edge_vm):
756
788
  if update_dotenv:
757
789
  if envvars.backup_dotenv():
758
790
  envvars.save_envvar("IOTHUB_CONNECTION_STRING", envvars.IOTHUB_CONNECTION_STRING)
759
791
  envvars.save_envvar("DEVICE_CONNECTION_STRING", envvars.DEVICE_CONNECTION_STRING)
760
792
  output.info("Updated current .env file")
761
793
 
794
+ if create_edge_vm:
795
+ handle_vm_create()
796
+
762
797
 
763
798
  @docker.command(context_settings=CONTEXT_SETTINGS,
764
799
  help="Pull Edge runtime images from Microsoft Container Registry and push to your specified container registry. "
@@ -835,7 +870,7 @@ def log(show, save):
835
870
  dock.handle_logs_cmd(show, save)
836
871
 
837
872
 
838
- main.add_command_with_deprecation(log, deprecated=True)
873
+ main.add_command_with_deprecation(log, deprecated=True, alt="docker log")
839
874
 
840
875
  if __name__ == "__main__":
841
876
  main()
@@ -119,6 +119,7 @@ class EnvVars:
119
119
  self.IOTHUB_NAME = self.get_envvar("IOTHUB_NAME")
120
120
  self.IOTHUB_SKU = self.get_envvar("IOTHUB_SKU")
121
121
  self.EDGE_DEVICE_ID = self.get_envvar("EDGE_DEVICE_ID")
122
+ self.CREATE_EDGE_VM = self.get_envvar("CREATE_EDGE_VM")
122
123
  self.CREDENTIALS = self.get_envvar("CREDENTIALS")
123
124
  self.UPDATE_DOTENV = self.get_envvar("UPDATE_DOTENV")
124
125
 
@@ -55,3 +55,7 @@ class Output:
55
55
 
56
56
  def confirm(self, text, default=False, abort=True):
57
57
  return click.confirm(text, default=default, abort=abort)
58
+
59
+ def prompt_question(self, text, default=""):
60
+ self.line()
61
+ return click.prompt(text, default=default)
s/docs/command-list.md CHANGED
@@ -335,6 +335,7 @@ Options:
335
335
  --iothub-name TEXT The IoT Hub Name (Creates a new IoT Hub if not found). [required]
336
336
  --edge-device-id TEXT The IoT Edge Device Id (Creates a new Edge Device if not found). [required]
337
337
  -u, --update-dotenv If True, the current .env will be updated with the IoT Hub and Device connection strings. [default: False; required]
338
+ --create-edge-vm Create an Edge-enabled Virtual Machine by using <https://aka.ms/iotedge-vm-deploy>. [default: False; required]
338
339
  -h, --help Show this message and exit.
339
340
  ```
340
341
 
@@ -76,4 +76,4 @@ If you are using a separate Edge device, like a Raspberry Pi, you do not need to
76
76
  1. Install **[JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html)**
77
77
  2. Install **[Maven](https://maven.apache.org/)**
78
78
 
79
- 9. Follow the [Usage Wiki](usage) to learn the usage of IoT Edge Dev Tool
79
+ 9. Follow the [Usage Wiki](../usage.md) to learn the usage of IoT Edge Dev Tool
s/docs/quickstart.md CHANGED
@@ -22,9 +22,9 @@ At the end of this quickstart, you should have the following:
22
22
 
23
23
  There are three options to setup your environment:
24
24
 
25
- - Setup the development environment manually. Please follow the [Manual Development Machine Setup Wiki](environment-setup/manual-dev-machine-setup).
25
+ - Setup the development environment manually. Please follow the [Manual Development Machine Setup Wiki](environment-setup/manual-dev-machine-setup.md).
26
26
  - Starting the devcontainer in VS Code (see [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers) for steps on how to do so).
27
- - Starting the devcontainer with Docker. Please follow the [Run the IoT Edge Dev Container with Docker docs](environment-setup/run-devcontainer-docker).
27
+ - Starting the devcontainer with Docker. Please follow the [Run the IoT Edge Dev Container with Docker docs](environment-setup/run-devcontainer-docker.md).
28
28
 
29
29
  1. Initialize IoT Edge solution and setup Azure resources.
30
30
 
s/iotedgedev/__init__.py CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  __author__ = 'Microsoft Corporation'
4
4
  __email__ = 'opencode@microsoft.com'
5
- __version__ = '3.3.5'
5
+ __version__ = '3.3.6'
6
6
  __AIkey__ = 'fed7fc65-5b4a-4e66-9d46-c5f016d4e2b4'
s/iotedgedev/azurecli.py CHANGED
@@ -6,6 +6,7 @@ import subprocess
6
6
  import sys
7
7
  from io import StringIO
8
8
  from threading import Thread, Timer
9
+ from pathlib import Path
9
10
 
10
11
  from azure.cli.core import get_default_cli
11
12
  from fstrings import f
@@ -550,3 +551,35 @@ class AzureCli:
550
551
  return data["connectionString"]
551
552
 
552
553
  return ''
554
+
555
+ def get_ssh_key(self, ssh_key_file):
556
+ file_path = Path.home().joinpath(".ssh", ssh_key_file + ".pub")
557
+ if not os.path.exists(file_path):
558
+ self.output.status(f("No SSH key found at ~/.ssh/{ssh_key_file}.pub. Generating a new one..."))
559
+ os.system(f("ssh-keygen -t rsa -b 4096 -C \"iotedgedev-autogenerated\" -f ~/.ssh/{ssh_key_file} -q -N \"\""))
560
+
561
+ with open(file_path, 'r') as file:
562
+ ssh_key = file.read()
563
+ return ssh_key
564
+
565
+ def create_edge_vm(self, ssh_key_file, edge_device_id, iothub, resource_group):
566
+ self.output.status(f("\nCreating a new Virtual Machine in '{resource_group}' with ssh key file '{ssh_key_file}'..."))
567
+
568
+ connectionString = self.get_device_connection_string(edge_device_id, iothub, resource_group)
569
+ # Use IoTHub name for deployment - in this case it will create a new
570
+ # template if a new IoT Hub is created.
571
+ deploymentTemplateName = "edgeVM-" + iothub
572
+
573
+ ssh_key = self.get_ssh_key(ssh_key_file)
574
+
575
+ self.output.status(f("Creating Virtual Machine in '{resource_group}' with an incremental deployment template '{deploymentTemplateName}', this can take some time..."))
576
+ return self.invoke_az_cli_outproc(["deployment", "group", "create", "--name", deploymentTemplateName,
577
+ "--resource-group", resource_group,
578
+ "--template-uri", "https://raw.githubusercontent.com/Azure/iotedge-vm-deploy/master/edgeDeploy.json",
579
+ "--parameters", "dnsLabelPrefix=iotedgedev-vm",
580
+ "--parameters", "adminUsername=azureuser",
581
+ "--parameters", "authenticationType=sshPublicKey",
582
+ "--parameters", "adminPasswordOrKey=" + ssh_key,
583
+ "--parameters", "deviceConnectionString=" + connectionString,
584
+ "--output", "table"],
585
+ f("Failed to create the VM with deployment template '{deploymentTemplateName}'."))
s/iotedgedev/cli.py CHANGED
@@ -25,11 +25,17 @@ from .solution import Solution
25
25
  from .utility import Utility
26
26
 
27
27
  # Extend click.Group#add_command(cmd, name) to take deprecated=bool flag by monkey patching.
28
- def add_command_with_deprecation(self, cmd: Command, name: t.Optional[str] = None, deprecated = False):
28
+ def add_command_with_deprecation(self, cmd: Command, name: t.Optional[str] = None, deprecated = False, alt: t.Optional[str] = None):
29
29
  # Directly changing the deprecated flag of the cmd has side-effects on the reference source.
30
30
  # To avoid this, copy the cmd object with deepcopy.
31
31
  copied_command = copy.deepcopy(cmd)
32
32
  copied_command.deprecated = deprecated
33
+ if copied_command.short_help is None:
34
+ copied_command.short_help = copied_command.help
35
+ if alt is not None:
36
+ alt_cmd = "[Use `iotedgedev " + alt + "` instead]"
37
+ copied_command.short_help += " " + alt_cmd # use space for formatting short_help in `iotedgedev --help`
38
+ copied_command.help += "\n\n" + alt_cmd # use newline for formatting help in `iotedgedev <command> --help`
33
39
  self.add_command(copied_command, name)
34
40
 
35
41
  Group.add_command_with_deprecation = add_command_with_deprecation
@@ -99,7 +105,7 @@ def new(name, module, template, edge_runtime_version, group_id):
99
105
  sol = Solution(output, utility)
100
106
  sol.create(name, module, template, edge_runtime_version, group_id)
101
107
 
102
- main.add_command_with_deprecation(new, deprecated=True)
108
+ main.add_command_with_deprecation(new, deprecated=True, alt="solution new")
103
109
 
104
110
 
105
111
  @solution.command(context_settings=CONTEXT_SETTINGS,
@@ -132,7 +138,7 @@ def init(name, module, template, group_id, edge_runtime_version):
132
138
  utility.call_proc(azsetupcmd.split())
133
139
 
134
140
 
135
- main.add_command_with_deprecation(init, deprecated=True)
141
+ main.add_command_with_deprecation(init, deprecated=True, alt="solution init")
136
142
 
137
143
 
138
144
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Push, deploy, start, monitor")
@@ -155,7 +161,7 @@ def add(name, template, group_id):
155
161
  mod.add(name, template, group_id)
156
162
 
157
163
 
158
- main.add_command_with_deprecation(add, deprecated=True)
164
+ main.add_command_with_deprecation(add, deprecated=True, alt="solution add")
159
165
 
160
166
 
161
167
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Build the solution")
@@ -197,7 +203,7 @@ def build(ctx, push, do_deploy, template_file, platform):
197
203
  ctx.invoke(deploy)
198
204
 
199
205
 
200
- main.add_command_with_deprecation(build, deprecated=True)
206
+ main.add_command_with_deprecation(build, deprecated=True, alt="solution build")
201
207
 
202
208
 
203
209
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Push module images to container registry")
@@ -238,7 +244,7 @@ def push(ctx, do_deploy, no_build, template_file, platform):
238
244
  ctx.invoke(deploy)
239
245
 
240
246
 
241
- main.add_command_with_deprecation(push, deprecated=True)
247
+ main.add_command_with_deprecation(push, deprecated=True, alt="solution push")
242
248
 
243
249
 
244
250
  @solution.command(context_settings=CONTEXT_SETTINGS, help="Deploy solution to IoT Edge device")
@@ -256,7 +262,7 @@ def deploy(manifest_file):
256
262
  edge.deploy(manifest_file)
257
263
 
258
264
 
259
- main.add_command_with_deprecation(deploy, deprecated=True)
265
+ main.add_command_with_deprecation(deploy, deprecated=True, alt="solution deploy")
260
266
 
261
267
 
262
268
  @iothub.command(
@@ -351,7 +357,7 @@ def genconfig(template_file, platform, fail_on_validation_error):
351
357
  mod.build_push(template_file, platform, no_build=True, no_push=True, fail_on_validation_error=fail_on_validation_error)
352
358
 
353
359
 
354
- main.add_command_with_deprecation(genconfig, deprecated=True)
360
+ main.add_command_with_deprecation(genconfig, deprecated=True, alt="solution genconfig")
355
361
 
356
362
 
357
363
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -374,7 +380,7 @@ def setup_simulator(gateway_host, iothub_connection_string):
374
380
  sim.setup(gateway_host, iothub_connection_string)
375
381
 
376
382
 
377
- main.add_command_with_deprecation(setup_simulator, deprecated=True)
383
+ main.add_command_with_deprecation(setup_simulator, deprecated=True, alt="simulator setup")
378
384
 
379
385
 
380
386
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -449,7 +455,7 @@ def start_simulator(setup, solution, build, manifest_file, platform, verbose, in
449
455
  sim.start_single(inputs, port)
450
456
 
451
457
 
452
- main.add_command_with_deprecation(start_simulator, deprecated=True)
458
+ main.add_command_with_deprecation(start_simulator, deprecated=True, alt="simulator start")
453
459
 
454
460
 
455
461
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -461,7 +467,7 @@ def stop_simulator():
461
467
  sim.stop()
462
468
 
463
469
 
464
- main.add_command_with_deprecation(stop_simulator, deprecated=True)
470
+ main.add_command_with_deprecation(stop_simulator, deprecated=True, alt="simulator stop")
465
471
 
466
472
 
467
473
  @simulator.command(context_settings=CONTEXT_SETTINGS,
@@ -501,7 +507,7 @@ def monitor(timeout):
501
507
  ih.monitor_events(timeout)
502
508
 
503
509
 
504
- main.add_command_with_deprecation(monitor, deprecated=True)
510
+ main.add_command_with_deprecation(monitor, deprecated=True, alt="iothub monitor")
505
511
 
506
512
 
507
513
  def ensure_azure_cli_iot_ext():
@@ -622,25 +628,31 @@ def validate_option(ctx, param, value):
622
628
  def list_edge_devices_and_set_default():
623
629
  if not azure_cli.list_edge_devices(envvars.IOTHUB_NAME):
624
630
  sys.exit()
625
- return "iotedgedev-edgedevice"
631
+ output.info("Enter the IoT Edge Device Id (Creates a new Edge Device if not found) [iotedgedev-edgedevice]:")
632
+ return input() or "iotedgedev-edgedevice"
626
633
 
627
634
 
628
635
  def list_iot_hubs_and_set_default():
629
636
  if not azure_cli.list_iot_hubs(envvars.RESOURCE_GROUP_NAME):
630
637
  sys.exit()
631
638
 
639
+ subscription_rg_hash = hashlib.sha1((default_subscriptionId + envvars.RESOURCE_GROUP_NAME).encode('utf-8')).hexdigest()[:6]
640
+ iothub_name = "iotedgedev-iothub-" + subscription_rg_hash
641
+
632
642
  first_iothub = azure_cli.get_first_iothub(envvars.RESOURCE_GROUP_NAME)
633
643
  if first_iothub:
634
- return first_iothub
635
- else:
636
- subscription_rg_hash = hashlib.sha1((default_subscriptionId + envvars.RESOURCE_GROUP_NAME).encode('utf-8')).hexdigest()[:6]
637
- return "iotedgedev-iothub-" + subscription_rg_hash
644
+ iothub_name = first_iothub
645
+
646
+ output.info(f"Enter the IoT Hub Name (Creates a new IoT Hub if not found) [{iothub_name}]:")
647
+ return input() or iothub_name
638
648
 
639
649
 
640
650
  def list_resource_groups_and_set_default():
641
651
  if not azure_cli.list_resource_groups():
642
652
  sys.exit()
643
- return "iotedgedev-rg"
653
+
654
+ output.info("Enter Resource Group Name (Creates a new Resource Group if not found) [iotedgedev-rg]:")
655
+ return input() or "iotedgedev-rg"
644
656
 
645
657
 
646
658
  def list_subscriptions_and_set_default():
@@ -657,14 +669,30 @@ def list_subscriptions_and_set_default():
657
669
  if not azure_cli.list_subscriptions():
658
670
  sys.exit()
659
671
  default_subscriptionId = azure_cli.get_default_subscription()
660
- return default_subscriptionId
672
+ output.info(f"Select an Azure Subscription Name or Id [{default_subscriptionId}]:")
673
+ return input() or default_subscriptionId
661
674
 
662
675
 
663
- def header_and_default(header, default, default2=None):
676
+ def header_and_default(header, prompt, default, options=None):
664
677
  output.header(header)
665
- if default == '' and default2 is not None:
666
- return default2
667
- return default
678
+ output.info(f"{prompt} [{default}]:")
679
+ output.info(f"Available options: {options}")
680
+ return input() or default
681
+
682
+
683
+ def handle_vm_create():
684
+ output.header("CREATE VIRTUAL MACHINE")
685
+ output.info("The virtual machine will be created with the IoT Edge runtime installed.\n"
686
+ "The deployment template can be found at: https://aka.ms/iotedge-vm-deploy \n"
687
+ "The name of the virtual machine will be a unique string generated by the template.\n"
688
+ "Details: os=ubuntu20_04-lts, size=Standard_DS1_v2, username=azureuser, allowSsh=true")
689
+ ssh_key_file = output.prompt_question("SSH Key file (must be located in ~/.ssh and will be created if it doesn't exist)", "id_rsa_iotedgedev")
690
+ if not azure_cli.create_edge_vm(ssh_key_file, envvars.EDGE_DEVICE_ID, envvars.IOTHUB_NAME, envvars.RESOURCE_GROUP_NAME):
691
+ raise click.BadParameter(f('Could not create Virtual Machine in {envvars.RESOURCE_GROUP_NAME}'))
692
+ else:
693
+ output.info("Virtual Machine created successfully. Check Azure Portal for details on how to connect.\n"
694
+ "WARNING: Check the details of the Network Security Group, it is setup to allow SSH from all addresses.\n"
695
+ "You will be able to connect using the SSH Key file: ~/.ssh/" + ssh_key_file)
668
696
 
669
697
 
670
698
  @iothub.command(context_settings=CONTEXT_SETTINGS,
@@ -688,51 +716,46 @@ def header_and_default(header, default, default2=None):
688
716
  help="Enter Azure Service Principal Credentials (username password tenant).")
689
717
  @click.option('--subscription',
690
718
  envvar=envvars.get_envvar_key_if_val("SUBSCRIPTION_ID"),
691
- default=lambda: list_subscriptions_and_set_default(),
719
+ default=list_subscriptions_and_set_default,
692
720
  required=True,
693
721
  callback=validate_option,
694
- prompt="Select an Azure Subscription Name or Id:",
695
722
  help="The Azure Subscription Name or Id.")
696
723
  @click.option('--resource-group-location',
697
724
  envvar=envvars.get_envvar_key_if_val("RESOURCE_GROUP_LOCATION"),
698
725
  required=True,
699
- default=lambda: header_and_default('RESOURCE GROUP LOCATION', envvars.RESOURCE_GROUP_LOCATION, 'westus'),
700
- type=click.Choice(['australiaeast', 'australiasoutheast', 'brazilsouth', 'canadacentral', 'canadaeast', 'centralindia', 'centralus', 'eastasia', 'eastus', 'eastus2',
701
- 'japanwest', 'japaneast', 'northeurope', 'northcentralus', 'southindia', 'uksouth', 'ukwest', 'westus', 'westeurope', 'southcentralus', 'westcentralus', 'westus2']),
726
+ default=lambda: header_and_default('RESOURCE GROUP LOCATION', 'Enter a Resource Group Location', envvars.RESOURCE_GROUP_LOCATION or 'westus',
727
+ ['australiaeast', 'australiasoutheast', 'brazilsouth', 'canadacentral', 'canadaeast', 'centralindia', 'centralus', 'eastasia', 'eastus', 'eastus2',
728
+ 'japanwest', 'japaneast', 'northeurope', 'northcentralus', 'southindia', 'uksouth', 'ukwest', 'westus', 'westeurope', 'southcentralus', 'westcentralus', 'westus2']),
729
+ type=str,
702
730
  callback=validate_option,
703
- prompt="Enter a Resource Group Location:",
704
731
  help="The Resource Group Location.")
705
732
  @click.option('--resource-group-name',
706
733
  envvar=envvars.get_envvar_key_if_val("RESOURCE_GROUP_NAME"),
707
734
  required=True,
708
- default=lambda: list_resource_groups_and_set_default(),
735
+ default=list_resource_groups_and_set_default,
709
736
  type=str,
710
737
  callback=validate_option,
711
- prompt="Enter Resource Group Name (Creates a new Resource Group if not found):",
712
738
  help="The Resource Group Name (Creates a new Resource Group if not found).")
713
739
  @click.option('--iothub-sku',
714
740
  envvar=envvars.get_envvar_key_if_val("IOTHUB_SKU"),
715
741
  required=True,
716
- default=lambda: header_and_default('IOTHUB SKU', 'F1'),
717
- type=click.Choice(['F1', 'S1', 'S2', 'S3']),
742
+ default=lambda: header_and_default('IOTHUB SKU', 'Enter IoT Hub SKU', 'F1', ['F1', 'S1', 'S2', 'S3']),
743
+ type=str,
718
744
  callback=validate_option,
719
- prompt="Enter IoT Hub SKU (F1|S1|S2|S3):",
720
745
  help="The IoT Hub SKU.")
721
746
  @click.option('--iothub-name',
722
747
  envvar=envvars.get_envvar_key_if_val("IOTHUB_NAME"),
723
748
  required=True,
724
- default=lambda: list_iot_hubs_and_set_default(),
749
+ default=list_iot_hubs_and_set_default,
725
750
  type=str,
726
751
  callback=validate_option,
727
- prompt='Enter the IoT Hub Name (Creates a new IoT Hub if not found):',
728
752
  help='The IoT Hub Name (Creates a new IoT Hub if not found).')
729
753
  @click.option('--edge-device-id',
730
754
  envvar=envvars.get_envvar_key_if_val("EDGE_DEVICE_ID"),
731
755
  required=True,
732
- default=lambda: list_edge_devices_and_set_default(),
756
+ default=list_edge_devices_and_set_default,
733
757
  type=str,
734
758
  callback=validate_option,
735
- prompt='Enter the IoT Edge Device Id (Creates a new Edge Device if not found):',
736
759
  help='The IoT Edge Device Id (Creates a new Edge Device if not found).')
737
760
  @click.option('--update-dotenv',
738
761
  "-u",
@@ -743,6 +766,14 @@ def header_and_default(header, default, default2=None):
743
766
  is_flag=True,
744
767
  prompt='Update the .env file with connection strings?',
745
768
  help='If True, the current .env will be updated with the IoT Hub and Device connection strings.')
769
+ @click.option('--create-edge-vm',
770
+ envvar=envvars.get_envvar_key_if_val("CREATE_EDGE_VM"),
771
+ required=True,
772
+ default=False,
773
+ show_default=True,
774
+ is_flag=True,
775
+ prompt='Create a new Virtual Machine with IoTEdge?',
776
+ help='If true, creates a new Virtual Machine with IoTEdge.')
746
777
  @with_telemetry
747
778
  def setup_iothub(credentials,
748
779
  service_principal,
@@ -752,13 +783,17 @@ def setup_iothub(credentials,
752
783
  iothub_sku,
753
784
  iothub_name,
754
785
  edge_device_id,
755
- update_dotenv):
786
+ update_dotenv,
787
+ create_edge_vm):
756
788
  if update_dotenv:
757
789
  if envvars.backup_dotenv():
758
790
  envvars.save_envvar("IOTHUB_CONNECTION_STRING", envvars.IOTHUB_CONNECTION_STRING)
759
791
  envvars.save_envvar("DEVICE_CONNECTION_STRING", envvars.DEVICE_CONNECTION_STRING)
760
792
  output.info("Updated current .env file")
761
793
 
794
+ if create_edge_vm:
795
+ handle_vm_create()
796
+
762
797
 
763
798
  @docker.command(context_settings=CONTEXT_SETTINGS,
764
799
  help="Pull Edge runtime images from Microsoft Container Registry and push to your specified container registry. "
@@ -835,7 +870,7 @@ def log(show, save):
835
870
  dock.handle_logs_cmd(show, save)
836
871
 
837
872
 
838
- main.add_command_with_deprecation(log, deprecated=True)
873
+ main.add_command_with_deprecation(log, deprecated=True, alt="docker log")
839
874
 
840
875
  if __name__ == "__main__":
841
876
  main()
s/iotedgedev/envvars.py CHANGED
@@ -119,6 +119,7 @@ class EnvVars:
119
119
  self.IOTHUB_NAME = self.get_envvar("IOTHUB_NAME")
120
120
  self.IOTHUB_SKU = self.get_envvar("IOTHUB_SKU")
121
121
  self.EDGE_DEVICE_ID = self.get_envvar("EDGE_DEVICE_ID")
122
+ self.CREATE_EDGE_VM = self.get_envvar("CREATE_EDGE_VM")
122
123
  self.CREDENTIALS = self.get_envvar("CREDENTIALS")
123
124
  self.UPDATE_DOTENV = self.get_envvar("UPDATE_DOTENV")
124
125
 
s/iotedgedev/output.py CHANGED
@@ -55,3 +55,7 @@ class Output:
55
55
 
56
56
  def confirm(self, text, default=False, abort=True):
57
57
  return click.confirm(text, default=default, abort=abort)
58
+
59
+ def prompt_question(self, text, default=""):
60
+ self.line()
61
+ return click.prompt(text, default=default)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: iotedgedev
3
- Version: 3.3.5
3
+ Version: 3.3.6
4
4
  Summary: The Azure IoT Edge Dev Tool greatly simplifies the IoT Edge development process by automating many routine manual tasks, such as building, deploying, pushing modules and configuring the IoT Edge Runtime.
5
5
  Home-page: https://github.com/azure/iotedgedev
6
6
  Author: Microsoft Corporation
@@ -5,7 +5,7 @@ python-dotenv
5
5
  requests<=2.25.1,>=2.20.0
6
6
  fstrings
7
7
  azure-cli-core<2.35.0,>=2.34.1
8
- iotedgehubdev==0.14.14
8
+ iotedgehubdev==0.14.16
9
9
  applicationinsights==0.11.9
10
10
  commentjson==0.9.0
11
11
  pyyaml>=5.4
s/requirements.txt CHANGED
@@ -4,7 +4,7 @@ python-dotenv==0.19.0
4
4
  requests==2.25.1
5
5
  fstrings==0.1.0
6
6
  msrestazure==0.6.4
7
- iotedgehubdev==0.14.14
7
+ iotedgehubdev==0.14.16
8
8
  applicationinsights==0.11.9
9
9
  commentjson==0.9.0
10
10
  azure-cli-core==2.34.1
s/setup.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.3.5
2
+ current_version = 3.3.6
3
3
  commit = True
4
4
  tag = True
5
5
 
s/setup.py CHANGED
@@ -15,7 +15,7 @@ requirements = [
15
15
  # Note >=2.35.0 cannot be used as is not compatible with the docker dependency;
16
16
  # docker requires websocket-client==0.56.0 and azure-cli-core>=2.35.0 requires websocket-client==1.31.1.
17
17
  'azure-cli-core >= 2.34.1, < 2.35.0',
18
- 'iotedgehubdev == 0.14.14',
18
+ 'iotedgehubdev == 0.14.16',
19
19
  'applicationinsights == 0.11.9',
20
20
  'commentjson == 0.9.0',
21
21
  'pyyaml>=5.4',
@@ -33,7 +33,7 @@ test_requirements = [
33
33
 
34
34
  setup(
35
35
  name='iotedgedev',
36
- version='3.3.5',
36
+ version='3.3.6',
37
37
  description='The Azure IoT Edge Dev Tool greatly simplifies the IoT Edge development process by automating many routine manual tasks, such as building, deploying, pushing modules and configuring the IoT Edge Runtime.',
38
38
  long_description='See https://github.com/azure/iotedgedev for usage instructions.',
39
39
  author='Microsoft Corporation',
s/tests/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  __author__ = 'Microsoft Corporation'
4
4
  __email__ = 'opencode@microsoft.com'
5
- __version__ = '3.3.5'
5
+ __version__ = '3.3.6'