예제 #1
0
 def destroy(self, env):
     conf = env.get('config')
     LOGGER.debug("Building enoslib configuration")
     enoslib_conf = _build_enoslib_conf(conf)
     LOGGER.debug("Creating G5K provider")
     g5k = provider.G5k(enoslib_conf)
     LOGGER.info("Destroying G5K deployment")
     g5k.destroy()
예제 #2
0
 def init(self, config, force=False):
     LOGGER.debug("Building enoslib configuration")
     enoslib_conf = _build_enoslib_conf(config)
     conf = Configuration.from_dictionnary(enoslib_conf)
     LOGGER.debug("Creating G5K provider")
     g5k = provider.G5k(conf)
     LOGGER.info("Initializing G5K provider")
     roles, networks = g5k.init(force)
     _provision(roles)
     return roles, networks
예제 #3
0
    def init(self, force_deploy=False):
        g5k_conf = _build_g5k_conf(self.provider_conf)
        g5k_provider = g5kprovider.G5k(g5k_conf)
        g5k_roles, g5k_networks = g5k_provider.init()
        g5k_subnet = [n for n in g5k_networks if "__subnet__" in n["roles"]][0]
        vmong5k_roles = _distribute(self.provider_conf.machines, g5k_roles,
                                    g5k_subnet)

        start_virtualmachines(self.provider_conf, g5k_roles, vmong5k_roles)

        return vmong5k_roles, [g5k_subnet]
예제 #4
0
파일: provider.py 프로젝트: Prygan/enoslib
    def init(self, force_deploy=False):
        g5k_conf = _build_g5k_conf(self.provider_conf)
        g5k_provider = g5kprovider.G5k(g5k_conf)
        g5k_roles, g5k_networks = g5k_provider.init()
        g5k_subnets = [n for n in g5k_networks if "__subnet__" in n["roles"]]

        # we concretize the virtualmachines
        for machine in self.provider_conf.machines:
            pms = g5k_roles[machine.cookie]
            machine.undercloud = pms

        roles, networks = start_containers(g5k_roles, self.provider_conf,
                                           g5k_subnets)
        return roles, networks