def _activate_image(image_uuid): symlink = CONF.active_bootstrap_symlink dir_path = full_path(image_uuid) _make_symlink(symlink, dir_path) # FIXME: Add pre-activate verify flavor = 'ubuntu' _activate_flavor(flavor) notifier.notify_webui("") return image_uuid
def _activate(image_uuid): symlink = CONF.active_bootstrap_symlink if os.path.lexists(symlink): os.unlink(symlink) LOG.debug("Symlink %s was deleted", symlink) dir_path = full_path(image_uuid) os.symlink(dir_path, symlink) LOG.debug("Symlink %s to %s directory has been created", symlink, dir_path) # FIXME: Add pre-activate verify flavor = 'ubuntu' _activate_flavor(flavor) notifier.notify_webui("") return image_uuid
def _activate(image_uuid): is_centos = image_uuid.lower() == 'centos' symlink = CONF.active_bootstrap_symlink if os.path.lexists(symlink): os.unlink(symlink) LOG.debug("Symlink %s was deleted", symlink) if not is_centos: dir_path = full_path(image_uuid) os.symlink(dir_path, symlink) LOG.debug("Symlink %s to %s directory has been created", symlink, dir_path) else: LOG.warning("WARNING: switching to depracated centos-bootstrap") # FIXME: Add pre-activate verify flavor = 'centos' if is_centos else 'ubuntu' _activate_flavor(flavor) notifier.notify_webui("") return image_uuid