本文整理汇总了Python中cfgm_common.vnc_cassandra.VncCassandraClient._cassandra_floating_ip_list方法的典型用法代码示例。如果您正苦于以下问题:Python VncCassandraClient._cassandra_floating_ip_list方法的具体用法?Python VncCassandraClient._cassandra_floating_ip_list怎么用?Python VncCassandraClient._cassandra_floating_ip_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cfgm_common.vnc_cassandra.VncCassandraClient
的用法示例。
在下文中一共展示了VncCassandraClient._cassandra_floating_ip_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SvcMonitor
# 需要导入模块: from cfgm_common.vnc_cassandra import VncCassandraClient [as 别名]
# 或者: from cfgm_common.vnc_cassandra.VncCassandraClient import _cassandra_floating_ip_list [as 别名]
#.........这里部分代码省略.........
pass
else:
for fq_name, uuid in project_list:
prj = ProjectSM.locate(uuid)
ok, sas_list = self._cassandra._cassandra_service_appliance_set_list()
if not ok:
pass
else:
for fq_name, uuid in sas_list:
sas = ServiceApplianceSetSM.locate(uuid)
ok, sa_list = self._cassandra._cassandra_service_appliance_list()
if not ok:
pass
else:
for fq_name, uuid in sa_list:
sa = ServiceApplianceSM.locate(uuid)
ok, domain_list = self._cassandra._cassandra_domain_list()
if not ok:
pass
else:
for fq_name, uuid in domain_list:
DomainSM.locate(uuid)
ok, iip_list = self._cassandra._cassandra_instance_ip_list()
if not ok:
pass
else:
for fq_name, uuid in iip_list:
InstanceIpSM.locate(uuid)
ok, fip_list = self._cassandra._cassandra_floating_ip_list()
if not ok:
pass
else:
for fq_name, uuid in fip_list:
FloatingIpSM.locate(uuid)
ok, sg_list = self._cassandra._cassandra_security_group_list()
if not ok:
pass
else:
for fq_name, uuid in sg_list:
SecurityGroupSM.locate(uuid)
ok, vm_list = self._cassandra._cassandra_virtual_machine_list()
if not ok:
pass
else:
for fq_name, uuid in vm_list:
vm = VirtualMachineSM.locate(uuid)
if vm.service_instance:
continue
for vmi_id in vm.virtual_machine_interfaces:
vmi = VirtualMachineInterfaceSM.get(vmi_id)
if not vmi:
continue
self.check_link_si_to_vm(vm, vmi)
# Load the loadbalancer driver
self.loadbalancer_agent.load_drivers()
for lb_pool in LoadbalancerPoolSM.values():
lb_pool.add()
示例2: DeviceManager
# 需要导入模块: from cfgm_common.vnc_cassandra import VncCassandraClient [as 别名]
# 或者: from cfgm_common.vnc_cassandra.VncCassandraClient import _cassandra_floating_ip_list [as 别名]
#.........这里部分代码省略.........
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
vmi_set = set()
for li_id in li_set:
li = LogicalInterfaceDM.locate(li_id)
if li and li.virtual_machine_interface:
vmi_set |= set([li.virtual_machine_interface])
for vmi_id in vmi_set:
vmi = VirtualMachineInterfaceDM.locate(vmi_id)
ok, ip_list = self._cassandra._cassandra_instance_ip_list()
if not ok:
self.config_log('instance ip list returned error: %s' %
ip_list)
else:
for fq_name, uuid in ip_list:
InstanceIpDM.locate(uuid)
ok, fip_list = self._cassandra._cassandra_floating_ip_list()
if not ok:
self.config_log('floating ip list returned error: %s' %
fip_list)
else:
for fq_name, uuid in fip_list:
FloatingIpDM.locate(uuid)
for fq_name, uuid in vn_list:
vn = VirtualNetworkDM.locate(uuid)
if vn is not None:
vn.update_instance_ip_map()
for pr in PhysicalRouterDM.values():
pr.set_config_state()
self._db_resync_done.set()
while 1:
# Just wait indefinitely
time.sleep(5)
# end __init__
def connection_state_update(self, status, message=None):
ConnectionState.update(
conn_type=ConnectionType.APISERVER, name='ApiServer',
status=status, message=message or '',
server_addrs=['%s:%s' % (self._args.api_server_ip,
self._args.api_server_port)])
# end connection_state_update
def config_log(self, msg, level):
self._sandesh.logger().log(SandeshLogger.get_py_logger_level(level),
msg)