Add HIDDEN status to Neutron::NetworkGateway
Add HIDDEN status and translation rules to NetworkGateway resource. bp deprecating-improvements Change-Id: Ib4a5dfdce2dc8c5f30634bd127761ccd0b2b25e9
This commit is contained in:
@@ -97,9 +97,14 @@ class NetworkGateway(neutron.NeutronResource):
|
||||
NETWORK_ID: properties.Schema(
|
||||
properties.Schema.STRING,
|
||||
support_status=support.SupportStatus(
|
||||
status=support.DEPRECATED,
|
||||
status=support.HIDDEN,
|
||||
message=_('Use property %s.') % NETWORK,
|
||||
version='2014.2'),
|
||||
version='5.0.0',
|
||||
previous_status=support.SupportStatus(
|
||||
status=support.DEPRECATED,
|
||||
version='2014.2'
|
||||
)
|
||||
),
|
||||
constraints=[
|
||||
constraints.CustomConstraint('neutron.network')
|
||||
],
|
||||
@@ -143,6 +148,16 @@ class NetworkGateway(neutron.NeutronResource):
|
||||
),
|
||||
}
|
||||
|
||||
def translation_rules(self):
|
||||
return [
|
||||
properties.TranslationRule(
|
||||
self.properties,
|
||||
properties.TranslationRule.REPLACE,
|
||||
[self.CONNECTIONS, self.NETWORK],
|
||||
value_name=self.NETWORK_ID
|
||||
)
|
||||
]
|
||||
|
||||
def _show_resource(self):
|
||||
return self.neutron().show_network_gateway(
|
||||
self.resource_id)['network_gateway']
|
||||
|
||||
@@ -189,13 +189,12 @@ class NeutronNetworkGatewayTest(common.HeatTestCase):
|
||||
|
||||
def _test_network_gateway_create(self, resolve_neutron=True):
|
||||
rsrc = self.prepare_create_network_gateway(resolve_neutron)
|
||||
if resolve_neutron:
|
||||
neutronV20.find_resourceid_by_name_or_id(
|
||||
mox.IsA(neutronclient.Client),
|
||||
'network',
|
||||
'6af055d3-26f6-48dd-a597-7611d7e58d35'
|
||||
).MultipleTimes().AndReturn(
|
||||
'6af055d3-26f6-48dd-a597-7611d7e58d35')
|
||||
neutronV20.find_resourceid_by_name_or_id(
|
||||
mox.IsA(neutronclient.Client),
|
||||
'network',
|
||||
'6af055d3-26f6-48dd-a597-7611d7e58d35'
|
||||
).MultipleTimes().AndReturn(
|
||||
'6af055d3-26f6-48dd-a597-7611d7e58d35')
|
||||
|
||||
neutronclient.Client.disconnect_network_gateway(
|
||||
'ed4c03b9-8251-4c09-acc4-e59ee9e6aa37', {
|
||||
|
||||
Reference in New Issue
Block a user