Merge "Auto Generated INFO.yaml file"
[fuel.git] / mcp / salt-formulas / maas / machines / mark_broken_fixed.sls
1 ##############################################################################
2 # Copyright (c) 2017 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- from "maas/map.jinja" import region with context %}
9
10 maas_login_admin:
11   cmd.run:
12   - name: "maas-region apikey --username {{ region.admin.username }} > /var/lib/maas/.maas_credentials"
13   - unless: 'test -e /var/lib/maas/.maas_credentials'
14
15 # TODO: implement mark_broken_fixed_machine via _modules/maas.py
16 mark_broken_fixed_machine:
17   cmd.run:
18   - name: "maas login {{ region.admin.username }} http://{{ region.bind.host }}:5240/MAAS/api/2.0 - < /var/lib/maas/.maas_credentials && maas opnfv machine mark-broken {{ pillar['system_id'] }} && sleep 10 && maas opnfv machine mark-fixed {{ pillar['system_id'] }} && maas opnfv machine test {{ pillar['system_id'] }} testing_scripts=fio"
19   - require:
20     - cmd: maas_login_admin