mirror of
https://github.com/gryf/mistral-evacuate.git
synced 2026-02-07 08:45:48 +01:00
Several typos fixed
This commit is contained in:
15
README.rst
15
README.rst
@@ -7,8 +7,8 @@ using Mistral.
|
||||
Installation
|
||||
------------
|
||||
|
||||
#. Copy ``filter_vm.py`` to the place reachable by python interpreter - see
|
||||
``PYTHONPATH`` or ``sys.path`` for reference.
|
||||
#. Copy ``filter_vm_action.py`` to the place reachable by python interpreter -
|
||||
see ``PYTHONPATH`` or ``sys.path`` for reference.
|
||||
#. Append line
|
||||
|
||||
.. code:: ini
|
||||
@@ -16,7 +16,7 @@ Installation
|
||||
[entry_points]
|
||||
mistral.actions =
|
||||
…
|
||||
custom.filter_vms = evac_poc:FilterAndEvacuate
|
||||
custom.filter_vm = filter_vm_action:FilterVmAction
|
||||
|
||||
to ``setup.cfg`` file under Mistral repository
|
||||
#. Reinstall Mistral if it was installed in system (not in virtualenv).
|
||||
@@ -36,7 +36,7 @@ Installation
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ mistral workflow-create evacuate-workflow.yaml
|
||||
$ mistral workflow-create host-evacuate.yaml
|
||||
|
||||
#. Create JSON file with content similar to:
|
||||
|
||||
@@ -49,4 +49,9 @@ Installation
|
||||
}
|
||||
|
||||
#. Trigger the action via:
|
||||
TBD
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
$ mistral execution-create host-evacuate input.json
|
||||
|
||||
where ``input.json`` is a file created in previous step.
|
||||
|
||||
@@ -28,7 +28,7 @@ class FilterVmAction(NovaAction):
|
||||
if str(metadata.get('evacuate')).upper() == 'TRUE':
|
||||
return Result(data={'status': 0, 'uuid': self._uuid})
|
||||
elif str(metadata.get('evacuate')).upper() == 'FALSE':
|
||||
return Result(error='sie nie udalo!!!!1111jeden')
|
||||
return Result(error='evacuate for vm %s is disabled' % self._uuid)
|
||||
|
||||
# ether is no metadata for vm - check flavor
|
||||
flavors = client.flavors.list()
|
||||
@@ -42,4 +42,4 @@ class FilterVmAction(NovaAction):
|
||||
if str(evacuate).upper() == 'TRUE':
|
||||
return Result(data={'status': 0, 'uuid': self._uuid})
|
||||
|
||||
return Result(data='1', error=True)
|
||||
return Result(error='evacuate for vm %s is disabled' % self._uuid)
|
||||
|
||||
@@ -20,7 +20,7 @@ host-evacuate:
|
||||
|
||||
filter_vms:
|
||||
with-items: vm in <% $.vms %>
|
||||
action: custom.filter_vms flavor=<% $.vm.flavor.id %> metadata=<% $.vm.metadata %> uuid=<% $.vm.id %>
|
||||
action: custom.filter_vm flavor=<% $.vm.flavor.id %> metadata=<% $.vm.metadata %> uuid=<% $.vm.id %>
|
||||
publish:
|
||||
filtered_vms: <% $.filter_vms.uuid %>
|
||||
on-success: evacuate_vms
|
||||
|
||||
Reference in New Issue
Block a user