"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
This commit is contained in:
@@ -332,7 +332,8 @@ class ShellTests(utils.TestCase):
|
|||||||
'password': 'newpass'}})
|
'password': 'newpass'}})
|
||||||
|
|
||||||
def test_endpoint_create(self):
|
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(
|
self.fake_client.assert_called_anytime(
|
||||||
'POST', '/endpoints',
|
'POST', '/endpoints',
|
||||||
{'endpoint':
|
{'endpoint':
|
||||||
@@ -340,7 +341,7 @@ class ShellTests(utils.TestCase):
|
|||||||
'service_id': '1',
|
'service_id': '1',
|
||||||
'region': 'regionOne',
|
'region': 'regionOne',
|
||||||
'internalurl': None,
|
'internalurl': None,
|
||||||
'publicurl': None}})
|
'publicurl': "http://example.com:1234/go"}})
|
||||||
|
|
||||||
def test_endpoint_list(self):
|
def test_endpoint_list(self):
|
||||||
self.run_command('endpoint-list')
|
self.run_command('endpoint-list')
|
||||||
|
@@ -490,7 +490,7 @@ def do_endpoint_list(kc, args):
|
|||||||
@utils.arg('--service', '--service-id', '--service_id',
|
@utils.arg('--service', '--service-id', '--service_id',
|
||||||
metavar='<service>', required=True,
|
metavar='<service>', required=True,
|
||||||
help='Name or ID of service associated with Endpoint')
|
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')
|
help='Public URL endpoint')
|
||||||
@utils.arg('--adminurl', metavar='<admin-url>',
|
@utils.arg('--adminurl', metavar='<admin-url>',
|
||||||
help='Admin URL endpoint')
|
help='Admin URL endpoint')
|
||||||
|
Reference in New Issue
Block a user