当前位置: 首页>>代码示例>>Python>>正文


Python Client.create_ext方法代码示例

本文整理汇总了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)
开发者ID:rasta-rocket,项目名称:networking-bgpvpn,代码行数:13,代码来源:bgpvpn_tests.py

示例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)
开发者ID:rasta-rocket,项目名称:networking-bgpvpn,代码行数:15,代码来源:bgpvpn_tests.py

示例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)
开发者ID:rasta-rocket,项目名称:networking-bgpvpn,代码行数:15,代码来源:bgpvpn_tests.py


注:本文中的neutronclient.v2_0.client.Client.create_ext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。