本文整理汇总了Python中cfgm_common.vnc_cassandra.VncCassandraClient._cassandra_service_template_list方法的典型用法代码示例。如果您正苦于以下问题:Python VncCassandraClient._cassandra_service_template_list方法的具体用法?Python VncCassandraClient._cassandra_service_template_list怎么用?Python VncCassandraClient._cassandra_service_template_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cfgm_common.vnc_cassandra.VncCassandraClient
的用法示例。
在下文中一共展示了VncCassandraClient._cassandra_service_template_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SvcMonitor
# 需要导入模块: from cfgm_common.vnc_cassandra import VncCassandraClient [as 别名]
# 或者: from cfgm_common.vnc_cassandra.VncCassandraClient import _cassandra_service_template_list [as 别名]
#.........这里部分代码省略.........
if lb_pool.virtual_machine_interface:
vmi_set.add(lb_pool.virtual_machine_interface)
ok, lb_pool_member_list = self._cassandra._cassandra_loadbalancer_member_list()
if not ok:
pass
else:
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 si_list:
si = ServiceInstanceSM.locate(uuid)
for vmi_id in vmi_set:
vmi = VirtualMachineInterfaceSM.locate(vmi_id)
if (vmi.instance_ip):
iip_set.add(vmi.instance_ip)
for iip_id in iip_set:
iip = InstanceIpSM.locate(iip_id)
for lb_pool in LoadbalancerPoolSM.values():
lb_pool.add()
self._db_resync_done.set()
# end sync_sm
# create service template
def _create_default_template(self, st_name, svc_type, svc_mode=None,
hypervisor_type='virtual-machine',
image_name=None, flavor=None, scaling=False,
vrouter_instance_type=None,
instance_data=None):
domain_name = 'default-domain'
domain_fq_name = [domain_name]
st_fq_name = [domain_name, st_name]
self.logger.log("Creating %s %s hypervisor %s" %
(domain_name, st_name, hypervisor_type))
示例2: SvcMonitor
# 需要导入模块: from cfgm_common.vnc_cassandra import VncCassandraClient [as 别名]
# 或者: from cfgm_common.vnc_cassandra.VncCassandraClient import _cassandra_service_template_list [as 别名]
#.........这里部分代码省略.........
if lb_pool.virtual_machine_interface:
vmi_set.add(lb_pool.virtual_machine_interface)
ok, lb_pool_member_list = self._cassandra._cassandra_loadbalancer_member_list()
if not ok:
pass
else:
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()