示例#1
0
 def finish(self, result):
     """ Deploys to the local provider
     """
     self.model.config.update({k: v.value for k, v in result.items()})
     Juju.create_environment(self.common['config']['juju_env'], "local",
                             self.model.to_yaml())
     DeployController(self.common, self.model).render()
示例#2
0
    def finish(self, name):
        """ Finalizes welcome controller

        Arguments:
        name: name of charm/bundle to use
        """
        deploy_key = next((n for n in
                           self.common['config']['bundles']
                           if n["name"] == name), None)

        if deploy_key is None:
            raise Exception(
                "Unable to determine bundle to deploy: {}".format(name))

        CharmModel.bundle = deploy_key

        if Juju.available():
            path = self.common['config']['juju_env']
            env = Juju.current_env(path)
            opts = Juju.env(path)['environments'][env]
            if env == "local":
                model = LocalProviderModel
            elif env == "maas":
                model = MaasProviderModel
            elif env == "openstack":
                model = OpenStackProviderModel
            model.config.update(**opts)
            DeployController(self.common, model).render()

        else:
            ProviderController(self.common).render()
示例#3
0
    def finish(self, name):
        """ Finalizes welcome controller

        Arguments:
        name: name of charm/bundle to use
        """
        deploy_key = next(
            (n for n in self.common['config']['bundles'] if n["name"] == name),
            None)

        if deploy_key is None:
            raise Exception(
                "Unable to determine bundle to deploy: {}".format(name))

        CharmModel.bundle = deploy_key

        if Juju.available():
            path = self.common['config']['juju_env']
            env = Juju.current_env(path)
            opts = Juju.env(path)['environments'][env]
            if env == "local":
                model = LocalProviderModel
            elif env == "maas":
                model = MaasProviderModel
            elif env == "openstack":
                model = OpenStackProviderModel
            model.config.update(**opts)
            DeployController(self.common, model).render()

        else:
            ProviderController(self.common).render()
示例#4
0
 def finish(self, result):
     """ Deploys to the local provider
     """
     self.model.config.update({k: v.value for k, v in result.items()})
     Juju.create_environment(self.common['config']['juju_env'],
                             "local",
                             self.model.to_yaml())
     DeployController(self.common, self.model).render()