Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
def destroy(self, env):
conf = env.get('config')
LOGGER.debug("Building enoslib configuration")
enoslib_conf = _build_enoslib_conf(conf)
conf = Configuration.from_dictionnary(enoslib_conf)
LOGGER.debug("Creating G5K provider")
g5k = provider.G5k(conf)
LOGGER.info("Destroying G5K deployment")
g5k.destroy()