本文整理汇总了Python中neutronclient.v2_0.client.Client.create_ext方法的典型用法代码示例。如果您正苦于以下问题:Python Client.create_ext方法的具体用法?Python Client.create_ext怎么用?Python Client.create_ext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neutronclient.v2_0.client.Client
的用法示例。
在下文中一共展示了Client.create_ext方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_bgpvpn_create
# 需要导入模块: from neutronclient.v2_0.client import Client [as 别名]
# 或者: from neutronclient.v2_0.client.Client import create_ext [as 别名]
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)
示例2: test_router_association_create
# 需要导入模块: from neutronclient.v2_0.client import Client [as 别名]
# 或者: from neutronclient.v2_0.client.Client import create_ext [as 别名]
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)
示例3: test_network_association_create
# 需要导入模块: from neutronclient.v2_0.client import Client [as 别名]
# 或者: from neutronclient.v2_0.client.Client import create_ext [as 别名]
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)