From f01a38ced8bd82f08f58fba171e12c7b344f0e38 Mon Sep 17 00:00:00 2001 From: huangtianhua Date: Tue, 19 Nov 2013 16:03:11 +0800 Subject: [PATCH] "publicurl" should be required on endpoint-create publicurl field is required and cannot be empty when create a endpoint in keystone server.So the "--publicurl " also should set as mandatory in keystoneclient. Change-Id: Ia397c79a28dd3a6ddef141df0f7df30cc0bf7b6c Closes-Bug: #1246335 --- keystoneclient/tests/v2_0/test_shell.py | 5 +++-- keystoneclient/v2_0/shell.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keystoneclient/tests/v2_0/test_shell.py b/keystoneclient/tests/v2_0/test_shell.py index 1b6db200b..9eae6e111 100644 --- a/keystoneclient/tests/v2_0/test_shell.py +++ b/keystoneclient/tests/v2_0/test_shell.py @@ -332,7 +332,8 @@ class ShellTests(utils.TestCase): 'password': 'newpass'}}) def test_endpoint_create(self): - self.run_command('endpoint-create --service-id 1') + self.run_command('endpoint-create --service-id 1 ' + '--publicurl=http://example.com:1234/go') self.fake_client.assert_called_anytime( 'POST', '/endpoints', {'endpoint': @@ -340,7 +341,7 @@ class ShellTests(utils.TestCase): 'service_id': '1', 'region': 'regionOne', 'internalurl': None, - 'publicurl': None}}) + 'publicurl': "http://example.com:1234/go"}}) def test_endpoint_list(self): self.run_command('endpoint-list') diff --git a/keystoneclient/v2_0/shell.py b/keystoneclient/v2_0/shell.py index d241571fe..cd315fb15 100644 --- a/keystoneclient/v2_0/shell.py +++ b/keystoneclient/v2_0/shell.py @@ -490,7 +490,7 @@ def do_endpoint_list(kc, args): @utils.arg('--service', '--service-id', '--service_id', metavar='', required=True, help='Name or ID of service associated with Endpoint') -@utils.arg('--publicurl', metavar='', +@utils.arg('--publicurl', metavar='', required=True, help='Public URL endpoint') @utils.arg('--adminurl', metavar='', help='Admin URL endpoint')