def test_router_association_create(self):
     bgpvpn = self.bgpvpns.first()
     router = self.routers.first()
     data = {'router_id': router.id}
     ret_dict = {'router_association': data}
     uri = BGPVPN_ROUTER_ASSOCIATION_PATH % bgpvpn.id
     neutronclient.create_ext(uri, ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.router_association_create(self.request, bgpvpn.id,
                                                    **data)
     self.assertIsInstance(ret_val, api.bgpvpn.RouterAssociation)
 def test_network_association_create(self):
     bgpvpn = self.bgpvpns.first()
     network = self.networks.first()
     data = {'network_id': network.id}
     ret_dict = {'network_association': data}
     uri = BGPVPN_NETWORK_ASSOCIATION_PATH % bgpvpn.id
     neutronclient.create_ext(uri, ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.network_association_create(
         self.request, bgpvpn.id, **data)
     self.assertIsInstance(ret_val, api.bgpvpn.NetworkAssociation)
 def test_bgpvpn_create(self):
     bgpvpn = self.bgpvpns.first()
     data = {'name': bgpvpn.name,
             'route_targets': bgpvpn.route_targets,
             'tenant_id': bgpvpn.tenant_id}
     ret_dict = {'bgpvpn': data}
     neutronclient.create_ext('/bgpvpn/bgpvpns',
                              ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.bgpvpn_create(self.request, **data)
     self.assertIsInstance(ret_val, api.bgpvpn.Bgpvpn)
Пример #4
0
 def test_router_association_create(self):
     bgpvpn = self.bgpvpns.first()
     router = self.routers.first()
     data = {'router_id': router.id}
     ret_dict = {'router_association': data}
     neutronclient.create_ext(
         '/bgpvpn/bgpvpns/%s/router_associations' % bgpvpn.id,
         ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.router_association_create(self.request, bgpvpn.id,
                                                    **data)
     self.assertIsInstance(ret_val, api.bgpvpn.RouterAssociation)
Пример #5
0
 def test_network_association_create(self):
     bgpvpn = self.bgpvpns.first()
     network = self.networks.first()
     data = {'network_id': network.id}
     ret_dict = {'network_association': data}
     neutronclient.create_ext(
         '/bgpvpn/bgpvpns/%s/network_associations' % bgpvpn.id,
         ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.network_association_create(
         self.request, bgpvpn.id, **data)
     self.assertIsInstance(ret_val, api.bgpvpn.NetworkAssociation)
Пример #6
0
 def test_bgpvpn_create(self):
     bgpvpn = self.bgpvpns.first()
     data = {
         'name': bgpvpn.name,
         'route_targets': bgpvpn.route_targets,
         'tenant_id': bgpvpn.tenant_id
     }
     ret_dict = {'bgpvpn': data}
     neutronclient.create_ext('/bgpvpn/bgpvpns',
                              ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.bgpvpn_create(self.request, **data)
     self.assertIsInstance(ret_val, api.bgpvpn.Bgpvpn)
 def test_router_association_create(self):
     bgpvpn = self.bgpvpns.first()
     router = self.routers.first()
     data = {'router_id': router.id}
     ret_dict = {'router_association': data}
     neutronclient.create_ext(
         '/bgpvpn/bgpvpns/%s/router_associations' % bgpvpn.id,
         ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.router_association_create(self.request,
                                                    bgpvpn.id,
                                                    **data)
     self.assertIsInstance(ret_val, api.bgpvpn.RouterAssociation)
 def test_network_association_create(self):
     bgpvpn = self.bgpvpns.first()
     network = self.networks.first()
     data = {'network_id': network.id}
     ret_dict = {'network_association': data}
     neutronclient.create_ext(
         '/bgpvpn/bgpvpns/%s/network_associations' % bgpvpn.id,
         ret_dict).AndReturn(ret_dict)
     self.mox.ReplayAll()
     ret_val = api.bgpvpn.network_association_create(self.request,
                                                     bgpvpn.id,
                                                     **data)
     self.assertIsInstance(ret_val, api.bgpvpn.NetworkAssociation)