示例#1
0
    def dispose(self):
        """
        Dispose all SICs of a stack deployed.
        """

        LOG.debug('Executing disposal logic')

        # stack_state, stack_id, output = self.state()

        # Dispose Maas, if created
        if self.maas is not None:
            LOG.debug('Disposing MaaS')
            util.dispose_maas(self.token, self.maas)

        # Dispose DNSaaS, if created
        if self.dnsaas is not None:
            LOG.debug('Disposing DNSaaS')
            util.dispose_dnsaas(self.token, self.dnsaas)

        # Dispose heat stack
        if self.stack_id is not None:
            self.deployer.dispose(self.stack_id, self.token)
            self.stack_id = None

            # on disposal, the SOE should notify the SOD to shutdown its thread
            self.stop_event.set()
 def tearDownClass(cls):
     """
     Dispose cut after test
     """
     util.dispose_dnsaas(cls.token, cls.cut)
     # sleep 10s to be gentle on the SM between post/delete
     time.sleep(10)
 def tearDownClass(cls):
     """
     Dispose cut after test
     """
     util.dispose_dnsaas(cls.token, cls.cut)
     # sleep 10s to be gentle on the SM between post/delete
     time.sleep(10)
示例#4
0
    def dispose(self):
        """
        Dispose all SICs of a stack deployed.
        """

        LOG.debug("Executing disposal logic")

        # stack_state, stack_id, output = self.state()

        # Dispose Maas, if created
        if self.maas is not None:
            LOG.debug("Disposing MaaS")
            util.dispose_maas(self.token, self.maas)

        # Dispose DNSaaS, if created
        if self.dnsaas is not None:
            LOG.debug("Disposing DNSaaS")
            util.dispose_dnsaas(self.token, self.dnsaas)

        # Dispose heat stack
        if self.stack_id is not None:
            self.deployer.dispose(self.stack_id, self.token)
            self.stack_id = None

            # on disposal, the SOE should notify the SOD to shutdown its thread
            self.stop_event.set()