本文整理汇总了Python中cfgm_common.vnc_cassandra.VncCassandraClient._cassandra_virtual_network_list方法的典型用法代码示例。如果您正苦于以下问题:Python VncCassandraClient._cassandra_virtual_network_list方法的具体用法?Python VncCassandraClient._cassandra_virtual_network_list怎么用?Python VncCassandraClient._cassandra_virtual_network_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cfgm_common.vnc_cassandra.VncCassandraClient
的用法示例。
在下文中一共展示了VncCassandraClient._cassandra_virtual_network_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SvcMonitor
# 需要导入模块: from cfgm_common.vnc_cassandra import VncCassandraClient [as 别名]
# 或者: from cfgm_common.vnc_cassandra.VncCassandraClient import _cassandra_virtual_network_list [as 别名]
#.........这里部分代码省略.........
for fq_name, uuid in lb_pool_member_list:
lb_pool_member = LoadbalancerMemberSM.locate(uuid)
ok, lb_vip_list = self._cassandra._cassandra_virtual_ip_list()
if not ok:
pass
else:
for fq_name, uuid in lb_vip_list:
virtual_ip = VirtualIpSM.locate(uuid)
if virtual_ip.virtual_machine_interface:
vmi_set.add(virtual_ip.virtual_machine_interface)
ok, lb_hm_list = self._cassandra._cassandra_loadbalancer_healthmonitor_list()
if not ok:
pass
else:
for fq_name, uuid in lb_hm_list:
lb_hm = HealthMonitorSM.locate(uuid)
ok, si_list = self._cassandra._cassandra_service_instance_list()
if not ok:
pass
else:
for fq_name, uuid in si_list:
si = ServiceInstanceSM.locate(uuid)
ok, st_list = self._cassandra._cassandra_service_template_list()
if not ok:
pass
else:
for fq_name, uuid in st_list:
st = ServiceTemplateSM.locate(uuid)
ok, vn_list = self._cassandra._cassandra_virtual_network_list()
if not ok:
pass
else:
for fq_name, uuid in vn_list:
vn = VirtualNetworkSM.locate(uuid)
vmi_set |= vn.virtual_machine_interfaces
ok, ifd_list = self._cassandra._cassandra_physical_interface_list()
if not ok:
pass
else:
for fq_name, uuid in ifd_list:
ifd = PhysicalInterfaceSM.locate(uuid)
ok, ifl_list = self._cassandra._cassandra_logical_interface_list()
if not ok:
pass
else:
for fq_name, uuid in ifl_list:
ifl = LogicalInterfaceSM.locate(uuid)
if ifl.virtual_machine_interface:
vmi_set.add(ifl.virtual_machine_interface)
ok, pr_list = self._cassandra._cassandra_physical_router_list()
if not ok:
pass
else:
for fq_name, uuid in pr_list:
pr = PhysicalRouterSM.locate(uuid)
ok, vr_list = self._cassandra._cassandra_virtual_router_list()
示例2: DeviceManager
# 需要导入模块: from cfgm_common.vnc_cassandra import VncCassandraClient [as 别名]
# 或者: from cfgm_common.vnc_cassandra.VncCassandraClient import _cassandra_virtual_network_list [as 别名]
#.........这里部分代码省略.........
self._db_resync_done = gevent.event.Event()
q_name = 'device_manager.%s' % (socket.gethostname())
self._vnc_kombu = VncKombuClient(rabbit_servers, rabbit_port,
rabbit_user, rabbit_password,
rabbit_vhost, rabbit_ha_mode,
q_name, self._vnc_subscribe_callback,
self.config_log)
cass_server_list = self._args.cassandra_server_list
self._cassandra = VncCassandraClient(cass_server_list,
self._args.cluster_id,
None,
self.config_log)
DBBaseDM.init(self, self._sandesh.logger(), self._cassandra)
ok, global_system_config_list = self._cassandra._cassandra_global_system_config_list()
if not ok:
self.config_log('global system config list returned error: %s' %
global_system_config_list)
else:
for fq_name, uuid in global_system_config_list:
GlobalSystemConfigDM.locate(uuid)
ok, global_vrouter_config_list = self._cassandra._cassandra_global_vrouter_config_list()
if not ok:
self.config_log('global vrouter config list returned error: %s' %
global_vrouter_config_list)
else:
for fq_name, uuid in global_vrouter_config_list:
GlobalVRouterConfigDM.locate(uuid)
ok, vn_list = self._cassandra._cassandra_virtual_network_list()
if not ok:
self.config_log('virtual network list returned error: %s' %
vn_list)
else:
for fq_name, uuid in vn_list:
vn = VirtualNetworkDM.locate(uuid)
if vn is not None and vn.routing_instances is not None:
for ri_id in vn.routing_instances:
ri_obj = RoutingInstanceDM.locate(ri_id)
ok, bgp_list = self._cassandra._cassandra_bgp_router_list()
if not ok:
self.config_log('bgp router list returned error: %s' %
bgp_list)
else:
for fq_name, uuid in bgp_list:
BgpRouterDM.locate(uuid)
ok, pr_list = self._cassandra._cassandra_physical_router_list()
if not ok:
self.config_log('physical router list returned error: %s' %
pr_list)
else:
for fq_name, uuid in pr_list:
pr = PhysicalRouterDM.locate(uuid)
if pr.bgp_router:
BgpRouterDM.locate(pr.bgp_router)
li_set = pr.logical_interfaces
for pi_id in pr.physical_interfaces:
pi = PhysicalInterfaceDM.locate(pi_id)
if pi:
li_set |= pi.logical_interfaces