From 2c9f68ac7acec051666d891744deea6236f8770e Mon Sep 17 00:00:00 2001 From: Ryan K Date: Wed, 15 Jul 2020 14:06:11 -0700 Subject: [PATCH] Removed --created-by parameter from search options (#218) --- azext_iot/pnp/_help.py | 4 ++-- azext_iot/pnp/commands_api.py | 2 -- azext_iot/pnp/params.py | 7 +------ azext_iot/tests/pnp/test_iot_pnp_unit.py | 2 -- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/azext_iot/pnp/_help.py b/azext_iot/pnp/_help.py index 2b802af8a..2ef82f2d2 100644 --- a/azext_iot/pnp/_help.py +++ b/azext_iot/pnp/_help.py @@ -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: > diff --git a/azext_iot/pnp/commands_api.py b/azext_iot/pnp/commands_api.py index 271577424..fe9c00870 100644 --- a/azext_iot/pnp/commands_api.py +++ b/azext_iot/pnp/commands_api.py @@ -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, @@ -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)) diff --git a/azext_iot/pnp/params.py b/azext_iot/pnp/params.py index fc204fc8b..aa147e36e 100644 --- a/azext_iot/pnp/params.py +++ b/azext_iot/pnp/params.py @@ -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), @@ -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", diff --git a/azext_iot/tests/pnp/test_iot_pnp_unit.py b/azext_iot/tests/pnp/test_iot_pnp_unit.py index d82872063..67c034ae1 100644 --- a/azext_iot/tests/pnp/test_iot_pnp_unit.py +++ b/azext_iot/tests/pnp/test_iot_pnp_unit.py @@ -285,7 +285,6 @@ def serviceclient_generic_error(self, mocker, fixture_sas, request): "modelType": "type", "modelState": "state", "publisherId": "publisher", - "createdBy": "creator", }, False, ), @@ -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