def _get_neutron_client(self): while True and (not self.neutron): reply = self.send_request(GetNeutronClientRequest(msg=None)) self.neutron = reply.msg hub.sleep(0.5) self.sync_agents() self.sync_lb_members()
def _sync_hypervisor_instances_loop(self): while True: timestamp = time.time() if self.nova: self.sync_hypervisor_instances() self.LOG.debug("get instance in hypervisor: %s", self.hypervisors.keys()) hub.sleep(self.pull_instance_interval - (time.time() - timestamp))
def _get_lb_members_loop(self): while True: timestamp = time.time() if self.neutron: self.sync_lb_members() self.LOG.debug("get lb members, ovs-agent:%s", self.lb_members.keys()) hub.sleep(self.pull_lb_member_interval - (time.time() - timestamp))
def _get_agents_loop(self): while True: timestamp = time.time() if self.neutron: self.sync_agents() self.LOG.debug( "get neutron agents, ovs-agent:%s, lbaas-agent:%s", self.ovs_agents.keys(), self.lbaas_agents.keys()) hub.sleep(self.pull_agent_interval - (time.time() - timestamp))
def _get_nova_client(self): while True and (not self.nova): reply = self.send_request(GetNovaClientRequest(msg=None)) self.nova = reply.msg hub.sleep(0.5) self.sync_hypervisor_instances()