Skip to content

Commit

Permalink
Removed --created-by parameter from search options (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-ryan-k authored Jul 15, 2020
1 parent 3422aaa commit 2c9f68a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
4 changes: 2 additions & 2 deletions azext_iot/pnp/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ def load_pnp_help():
text: >
az iot pnp model list
- name: Search for all 'Listed' models created by a specific user or spn
- name: Search for all 'Listed' models published by a specific tenant
text: >
az iot pnp model list --state Listed --created-by {user_or_spn_id}
az iot pnp model list --state Listed --publisher-id {tenant_id}
- name: Search for shared interfaces with name or description matching `{keyword}`
text: >
Expand Down
2 changes: 0 additions & 2 deletions azext_iot/pnp/commands_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def iot_pnp_model_list(
model_type=None,
model_state=None,
publisher_id=None,
created_by=None,
shared=False,
top=None,
pnp_dns_suffix=None,
Expand All @@ -35,7 +34,6 @@ def iot_pnp_model_list(
model_type=model_type,
model_state=model_state,
publisher_id=publisher_id,
created_by=created_by,
)

return ap.search_models(search_options, shared, _process_top(top))
Expand Down
7 changes: 1 addition & 6 deletions azext_iot/pnp/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ def load_pnp_arguments(self, _):
options_list=["--keyword", "-q"],
help="Restrict model list to those matching a provided keyword",
)
context.argument(
"created_by",
options_list=["--created-by"],
help="Restrict model list to models created by a specific user or service principal",
)
context.argument(
"model_state",
arg_type=get_enum_type(ModelState),
Expand All @@ -105,7 +100,7 @@ def load_pnp_arguments(self, _):
context.argument(
"publisher_id",
options_list=["--publisher-id", "--pub"],
help="Restrict model list to models published by a specific user or service principal",
help="Restrict model list to models published by a specific tenant",
)
context.argument(
"shared",
Expand Down
2 changes: 0 additions & 2 deletions azext_iot/tests/pnp/test_iot_pnp_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def serviceclient_generic_error(self, mocker, fixture_sas, request):
"modelType": "type",
"modelState": "state",
"publisherId": "publisher",
"createdBy": "creator",
},
False,
),
Expand All @@ -300,7 +299,6 @@ def test_model_list(self, fixture_cmd, service_client, search_content, shared):
model_type=search_content.get("modelType"),
model_state=search_content.get("modelState"),
publisher_id=search_content.get("publisherId"),
created_by=search_content.get("createdBy"),
shared=shared,
)
args = service_client.call_args
Expand Down

0 comments on commit 2c9f68a

Please sign in to comment.