Support for epg subnet in gbp client.
Change-Id: Ibdd1274559ef3680a6d5866ed6ec905c4bc44d92
This commit is contained in:
parent
bda6d4ce78
commit
b0b8267ced
@ -42,6 +42,9 @@ def _get_attrs_subnet_extension(client_manager, parsed_args, is_create=True):
|
|||||||
attrs['apic:snat_subnet_only'] = True
|
attrs['apic:snat_subnet_only'] = True
|
||||||
if parsed_args.apic_snat_subnet_only_disable:
|
if parsed_args.apic_snat_subnet_only_disable:
|
||||||
attrs['apic:snat_subnet_only'] = False
|
attrs['apic:snat_subnet_only'] = False
|
||||||
|
if ('apic_epg_subnet' in parsed_args and
|
||||||
|
parsed_args.apic_epg_subnet):
|
||||||
|
attrs['apic:epg_subnet'] = True
|
||||||
|
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
@ -58,6 +61,8 @@ subnet_sdk.Subnet.apic_active_active_aap = resource.Body(
|
|||||||
'apic:active_active_aap')
|
'apic:active_active_aap')
|
||||||
subnet_sdk.Subnet.apic_snat_subnet_only = resource.Body(
|
subnet_sdk.Subnet.apic_snat_subnet_only = resource.Body(
|
||||||
'apic:snat_subnet_only')
|
'apic:snat_subnet_only')
|
||||||
|
subnet_sdk.Subnet.apic_epg_subnet = resource.Body(
|
||||||
|
'apic:epg_subnet')
|
||||||
|
|
||||||
|
|
||||||
class CreateSubnetExtension(hooks.CommandHook):
|
class CreateSubnetExtension(hooks.CommandHook):
|
||||||
@ -108,6 +113,14 @@ class CreateSubnetExtension(hooks.CommandHook):
|
|||||||
help=_("Set APIC snat subnet only to false\n"
|
help=_("Set APIC snat subnet only to false\n"
|
||||||
"Default value for apic_snat_subnet_only is False ")
|
"Default value for apic_snat_subnet_only is False ")
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--apic-epg-subnet',
|
||||||
|
action='store_true',
|
||||||
|
default=False,
|
||||||
|
dest='apic_epg_subnet',
|
||||||
|
help=_("Set APIC epg subnet to true\n"
|
||||||
|
"Default value for apic_epg_subnet is False ")
|
||||||
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def get_epilog(self):
|
def get_epilog(self):
|
||||||
|
@ -52,6 +52,7 @@ class TestSubnetCreate(test_subnet.TestSubnet, test_cli20.CLITestV20Base):
|
|||||||
('apic_snat_host_pool_enable', None),
|
('apic_snat_host_pool_enable', None),
|
||||||
('apic_active_active_aap_enable', None),
|
('apic_active_active_aap_enable', None),
|
||||||
('apic_snat_subnet_only_enable', None),
|
('apic_snat_subnet_only_enable', None),
|
||||||
|
('apic_epg_subnet', False)
|
||||||
]
|
]
|
||||||
create_ext = subnet_ext.CreateSubnetExtension(self.app)
|
create_ext = subnet_ext.CreateSubnetExtension(self.app)
|
||||||
parsed_args = self.check_parser_ext(
|
parsed_args = self.check_parser_ext(
|
||||||
@ -73,6 +74,7 @@ class TestSubnetCreate(test_subnet.TestSubnet, test_cli20.CLITestV20Base):
|
|||||||
"--apic-snat-host-pool-enable",
|
"--apic-snat-host-pool-enable",
|
||||||
"--apic-active-active-aap-enable",
|
"--apic-active-active-aap-enable",
|
||||||
"--apic-snat-subnet-only-enable",
|
"--apic-snat-subnet-only-enable",
|
||||||
|
"--apic-epg-subnet"
|
||||||
]
|
]
|
||||||
verifylist = [
|
verifylist = [
|
||||||
('name', self._subnet.name),
|
('name', self._subnet.name),
|
||||||
@ -80,6 +82,7 @@ class TestSubnetCreate(test_subnet.TestSubnet, test_cli20.CLITestV20Base):
|
|||||||
('apic_snat_host_pool_enable', True),
|
('apic_snat_host_pool_enable', True),
|
||||||
('apic_active_active_aap_enable', True),
|
('apic_active_active_aap_enable', True),
|
||||||
('apic_snat_subnet_only_enable', True),
|
('apic_snat_subnet_only_enable', True),
|
||||||
|
('apic_epg_subnet', True)
|
||||||
]
|
]
|
||||||
create_ext = subnet_ext.CreateSubnetExtension(self.app)
|
create_ext = subnet_ext.CreateSubnetExtension(self.app)
|
||||||
parsed_args = self.check_parser_ext(
|
parsed_args = self.check_parser_ext(
|
||||||
@ -94,6 +97,7 @@ class TestSubnetCreate(test_subnet.TestSubnet, test_cli20.CLITestV20Base):
|
|||||||
'apic:active_active_aap': True,
|
'apic:active_active_aap': True,
|
||||||
'apic:snat_host_pool': True,
|
'apic:snat_host_pool': True,
|
||||||
'apic:snat_subnet_only': True,
|
'apic:snat_subnet_only': True,
|
||||||
|
'apic:epg_subnet': True
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user