def update_bootstrap_cli_yaml(): actions = BaseActions() path = "/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml" element = ['repos'] new_repo = {'name': 'auxiliary', 'priority': "1200", 'section': 'main restricted', 'suite': 'auxiliary', 'type': 'deb', 'uri': 'http://127.0.0.1:8080/ubuntu/auxiliary/'} repos = actions.get_value_from_remote_yaml(path, element) repos.append(new_repo) actions.change_remote_yaml(path, element, repos)
def update_bootstrap_cli_yaml(): actions = BaseActions() path = "/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml" element = ['repos'] new_repo = { 'name': 'auxiliary', 'priority': "1200", 'section': 'main restricted', 'suite': 'auxiliary', 'type': 'deb', 'uri': 'http://127.0.0.1:8080/ubuntu/auxiliary/' } repos = actions.get_value_from_remote_yaml(path, element) repos.append(new_repo) actions.change_remote_yaml(path, element, repos)
def __init__(self, config=None): if not hasattr(self, "_virt_env"): self._virt_env = None if not hasattr(self, "_fuel_web"): self._fuel_web = None self._config = config self.ssh_manager = SSHManager() self.ssh_manager.initialize( self.get_admin_node_ip(), login=settings.SSH_CREDENTIALS['login'], password=settings.SSH_CREDENTIALS['password']) self.admin_actions = AdminActions() self.base_actions = BaseActions() self.cobbler_actions = CobblerActions() self.nailgun_actions = NailgunActions() self.postgres_actions = PostgresActions() self.fuel_bootstrap_actions = FuelBootstrapCliActions()
def update_bootstrap_cli_yaml(): actions = BaseActions() path = "/etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml" astute_yaml_path = "/etc/fuel/astute.yaml" with YamlEditor(astute_yaml_path, ip=actions.admin_ip) as editor: repos = editor.content["BOOTSTRAP"]["repos"] repos.append({ 'name': 'auxiliary', 'priority': "1200", 'section': 'main restricted', 'suite': 'auxiliary', 'type': 'deb', 'uri': 'http://127.0.0.1:8080/ubuntu/auxiliary/' }) with YamlEditor(path, ip=actions.admin_ip) as editor: editor.content['repos'] = repos