Merge "make subnets attribute of a network read-only"
This commit is contained in:
commit
203f04ead0
@ -174,7 +174,7 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
'is_visible': True},
|
'is_visible': True},
|
||||||
'name': {'allow_post': True, 'allow_put': True,
|
'name': {'allow_post': True, 'allow_put': True,
|
||||||
'default': '', 'is_visible': True},
|
'default': '', 'is_visible': True},
|
||||||
'subnets': {'allow_post': True, 'allow_put': True,
|
'subnets': {'allow_post': False, 'allow_put': False,
|
||||||
'default': [],
|
'default': [],
|
||||||
'is_visible': True},
|
'is_visible': True},
|
||||||
'admin_state_up': {'allow_post': True, 'allow_put': True,
|
'admin_state_up': {'allow_post': True, 'allow_put': True,
|
||||||
|
@ -361,8 +361,7 @@ class JSONV2TestCase(APIv2TestBase):
|
|||||||
net_id = _uuid()
|
net_id = _uuid()
|
||||||
initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid()}}
|
initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid()}}
|
||||||
full_input = {'network': {'admin_state_up': True,
|
full_input = {'network': {'admin_state_up': True,
|
||||||
'shared': False,
|
'shared': False}}
|
||||||
'subnets': []}}
|
|
||||||
full_input['network'].update(initial_input['network'])
|
full_input['network'].update(initial_input['network'])
|
||||||
|
|
||||||
return_value = {'id': net_id, 'status': "ACTIVE"}
|
return_value = {'id': net_id, 'status': "ACTIVE"}
|
||||||
@ -394,7 +393,7 @@ class JSONV2TestCase(APIv2TestBase):
|
|||||||
env = {'quantum.context': context.Context('', tenant_id)}
|
env = {'quantum.context': context.Context('', tenant_id)}
|
||||||
# tenant_id should be fetched from env
|
# tenant_id should be fetched from env
|
||||||
initial_input = {'network': {'name': 'net1'}}
|
initial_input = {'network': {'name': 'net1'}}
|
||||||
full_input = {'network': {'admin_state_up': True, 'subnets': [],
|
full_input = {'network': {'admin_state_up': True,
|
||||||
'shared': False, 'tenant_id': tenant_id}}
|
'shared': False, 'tenant_id': tenant_id}}
|
||||||
full_input['network'].update(initial_input['network'])
|
full_input['network'].update(initial_input['network'])
|
||||||
|
|
||||||
@ -806,8 +805,7 @@ class ExtensionTestCase(unittest.TestCase):
|
|||||||
net_id = _uuid()
|
net_id = _uuid()
|
||||||
initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid(),
|
initial_input = {'network': {'name': 'net1', 'tenant_id': _uuid(),
|
||||||
'v2attrs:something_else': "abc"}}
|
'v2attrs:something_else': "abc"}}
|
||||||
data = {'network': {'admin_state_up': True, 'subnets': [],
|
data = {'network': {'admin_state_up': True, 'shared': False}}
|
||||||
'shared': False}}
|
|
||||||
data['network'].update(initial_input['network'])
|
data['network'].update(initial_input['network'])
|
||||||
|
|
||||||
return_value = {'subnets': [], 'status': "ACTIVE",
|
return_value = {'subnets': [], 'status': "ACTIVE",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user