Skip to content

Commit

Permalink
"publicurl" should be required on endpoint-create
Browse files Browse the repository at this point in the history
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
  • Loading branch information
huangtianhua committed Nov 20, 2013
1 parent 8a0732e commit f01a38c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions keystoneclient/tests/v2_0/test_shell.py
Expand Up @@ -332,15 +332,16 @@ def test_password_update(self):
'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':
{'adminurl': None,
'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')
Expand Down
2 changes: 1 addition & 1 deletion keystoneclient/v2_0/shell.py
Expand Up @@ -490,7 +490,7 @@ def do_endpoint_list(kc, args):
@utils.arg('--service', '--service-id', '--service_id',
metavar='<service>', required=True,
help='Name or ID of service associated with Endpoint')
@utils.arg('--publicurl', metavar='<public-url>',
@utils.arg('--publicurl', metavar='<public-url>', required=True,
help='Public URL endpoint')
@utils.arg('--adminurl', metavar='<admin-url>',
help='Admin URL endpoint')
Expand Down

0 comments on commit f01a38c

Please sign in to comment.