Esempio n. 1
0
def add_nodes(name, compute_nodes=0, controller_nodes=0, cinder_nodes=0,
              request=None):
    """Add a node (or nodes) to an existing deployment."""
    data.load_config(name)
    deployment = data.load_deployment(name)
    node_request = request or list([['compute']] * compute_nodes +
                                   [['controller']] * controller_nodes +
                                   [['cinder']] * cinder_nodes)
    deployment.add_nodes(node_request)
    database.store(deployment)
Esempio n. 2
0
    def build(self):
        """Runs build steps for node's features."""
        logger.info("Building deployment object for {}".format(self.name))
        logger.debug("Deployment step: update environment")
        self.update_environment()
        logger.debug("Deployment step: pre-configure")
        self.pre_configure()
        logger.debug("Deployment step: build nodes")
        self.build_nodes()
        logger.debug("Deployment step: post-configure")
        self.post_configure()
        self.status = "post-build"

        logger.info(self)
        database.store(self)