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

Add warning for qos deprecation and update contributing guide #342

Merged
merged 5 commits into from
May 18, 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
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ pip install -r path/to/source/dev_requirements
```

_Hub:_
`pytest azext_iot/tests/test_iot_ext_unit.py`
`pytest azext_iot/tests/iothub/test_iot_ext_unit.py`

_DPS:_
`pytest azext_iot/tests/test_iot_dps_unit.py`
`pytest azext_iot/tests/dps/test_iot_dps_unit.py`

### Integration Tests

Expand All @@ -127,7 +127,6 @@ You can either manually set the environment variables or use the `pytest.ini.exa
AZURE_TEST_RUN_LIVE=True
azext_iot_testrg="Resource Group that contains your IoT Hub"
azext_iot_testhub="IoT Hub Name"
azext_iot_testhub_cs="IoT Hub Connection String"
azext_iot_testdps="IoT Hub DPS Name"
azext_iot_teststorageuri="Blob Container SAS Uri"
azext_iot_identity_teststorageid="Storage Account ID"
Expand All @@ -141,13 +140,13 @@ You can either manually set the environment variables or use the `pytest.ini.exa

Execute the following command to run the IoT Hub integration tests:

`pytest azext_iot/tests/test_iot_ext_int.py`
`pytest azext_iot/tests/iothub/ -k "_int"`

##### Device Provisioning Service

Execute the following command to run the IoT Hub DPS integration tests:

`pytest azext_iot/tests/test_iot_dps_int.py`
`pytest azext_iot/tests/dps/ -k "_int"`

#### Unit and Integration Tests Single Command

Expand Down Expand Up @@ -264,7 +263,7 @@ https://medium.com/@marcobelo/setting-up-python-black-on-visual-studio-code-5318

https://docs.python.org/3/library/pdb.html

1. `pip install pdb`
1. `pip install pdbpp`
2. If you need a breakpoint, put `import pdb; pdb.set_trace()` in your code
3. Run your command, it should break execution wherever you put the breakpoint.

Expand Down
5 changes: 3 additions & 2 deletions azext_iot/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
type=str,
nargs="?",
choices=["0", "1"],
help="Quality of Service. 0 = At most once, 1 = At least once. 2 (Exactly once) is not supported.",
help="Quality of Service. 0 = At most once, 1 = At least once. 2 (Exactly once) is not supported."
"This command parameter has been deprecated and will be removed in the next release."
)

event_timeout_type = CLIArgumentType(
Expand Down Expand Up @@ -557,7 +558,7 @@ def load_arguments(self, _):
arg_type=get_enum_type(ProtocolType),
help="Indicates device-to-cloud message protocol",
)
context.argument("qos", arg_type=qos_type)
context.argument("qos", arg_type=qos_type, deprecate_info=context.deprecate())

with self.argument_context("iot device simulate") as context:
context.argument(
Expand Down