def test_create_subnet_precommit_default(self, init_vsd_client): self.set_config_fixture() nmd = NuageMechanismDriver() nmd.initialize() network = { 'id': '1', 'provider:network_type': 'vxlan', 'router:external': False } subnet = {'id': '10', 'network_id': '1', 'ip_version': 4} nmd.create_subnet_precommit(Context(network, subnet))
def test_create_v6_subnet_precommit(self, init_vsd_client): self.set_config_fixture() nmd = NuageMechanismDriver() nmd.initialize() network = { 'id': '1', 'provider:network_type': 'vxlan', 'router:external': False } subnet = {'id': '10', 'network_id': '1', 'ip_version': 6} try: nmd.create_subnet_precommit(Context(network, subnet)) self.fail() # should not get here except NuageBadRequest as e: self.assertEqual( 'Bad request: Subnet with ip_version 6 is ' 'currently not supported ' 'for OpenStack managed subnets.', str(e))