Exemplo n.º 1
0
    def destroy(self):

        """Insure only destroyable nodes are destroyed"""

        node = self.node
        if not config.is_node_destroyable(node.name):
            logger.error('node %s has non-destroyable prefix' % node.name)
            return False
        logger.info('destroying node %s' % node)
        return node.destroy()
Exemplo n.º 2
0
 def test_destroyable(self):
     assert config.is_node_destroyable('deploy-test-123', self.destroyable_prefixes)
     assert config.is_node_destroyable('demo-123', self.destroyable_prefixes)
Exemplo n.º 3
0
 def test_not_destroyable(self):
     assert not config.is_node_destroyable('trac-server', self.destroyable_prefixes)
     assert not config.is_node_destroyable('demo', self.destroyable_prefixes)