예제 #1
0
 def run(self):
     while not self.is_stopped:
         self.update_topology_state()
         if self.topology.state == "DELETED":
             TopologyOrchestrator.delete(self.topology)
             self.is_stopped = True
         for si in self.topology.service_instances:
             if not self.is_stopped:
                 for unit in si.units:
                     if len(unit.ports) == 0:
                         self.set_ips(unit)
         time.sleep(30)
예제 #2
0
 def dispose(self):
     """
     Dispose method
     """
     LOG.info("deleting topology with id %s " % self.stack_id)
     if self.stack_id is not None:
         topology = TopologyOrchestrator.get(self.stack_id)
         LOG.debug("topology to be deleted %s " % topology)
         self.deployer.dispose(topology)
         TopologyOrchestrator.delete(topology)
         self.stack_id = None
         if self.maas is not None:
             util.dispose_maas(self.token, self.maas)
예제 #3
0
 def dispose(self):
     """
     Dispose method
     """
     LOG.info("deleting topology with id %s " % self.stack_id)
     if self.stack_id is not None:
         topology = TopologyOrchestrator.get(self.stack_id)
         LOG.debug("topology to be deleted %s " % topology)
         self.deployer.dispose(topology)
         TopologyOrchestrator.delete(topology)
         self.stack_id = None
         if self.maas is not None:
             util.dispose_maas(self.token, self.maas)
예제 #4
0
 def run(self):
     while not self.is_stopped:
         self.update_topology_state()
         if self.topology.state == 'DELETED':
             TopologyOrchestrator.delete(self.topology)
             self.is_stopped = True
         for si in self.topology.service_instances:
             if not self.is_stopped:
                 for unit in si.units:
                     if len(unit.ports) == 0:
                         self.set_ips(unit)
         if self.topology.state == 'DEPLOYED' and not self.is_dns_configured:
             #self.configure_dns()
             self.configure_topology()
             self.is_dns_configured = True
         time.sleep(30)
예제 #5
0
 def run(self):
     while not self.is_stopped:
         self.update_topology_state()
         if self.topology.state == 'DELETED':
             TopologyOrchestrator.delete(self.topology)
             self.is_stopped = True
         for si in self.topology.service_instances:
             if not self.is_stopped:
                 for unit in si.units:
                     if len(unit.ports) == 0:
                         self.set_ips(unit)
         if self.topology.state == 'DEPLOYED' and not self.is_dns_configured:
             #self.configure_dns()
             self.configure_topology()
             self.is_dns_configured = True
         time.sleep(30)