Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions archivist/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ def __init__(self, archivist: "type_helper.Archivist"):
"keywords": ("confirm",),
"set_location_label": True,
}
self["LOCATIONS_LIST"] = {
"action": archivist.locations.list,
"keywords": (
"props",
"attrs",
),
}
self["LOCATIONS_READ"] = {
"action": archivist.locations.read,
"use_location_label": "add_arg_identity",
Expand Down
1 change: 1 addition & 0 deletions docs/runner/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ For further reading:
events_list
locations_count
locations_create
locations_list
subjects_count.rst
subjects_create.rst
subjects_create_b64.rst
Expand Down
19 changes: 19 additions & 0 deletions docs/runner/locations_list.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _locations_list_yamlref:

Locations List Story Runner YAML
.........................................

List all locations that match criteria..

Setting :code:`print_response: true` is necessary to print the full result.

.. code-block:: yaml

---
steps:
- step:
action: LOCATIONS_LIST
description: List locations for which John Smith is director
print_response: true
attrs:
director: John Smith
3 changes: 0 additions & 3 deletions functests/test_resources/synsation_story.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ locations:
facility_type: Satellite Office
reception_email: reception_CT@synsation_io
reception_phone: +27 (21) 123-456
action: LOCATIONS_CREATE_IF_NOT_EXISTS
description: Create Asia Location
location_label: Asia Regional Sales Office
- display_name: Asia Regional Sales Office
description: Asia Regional Sales Headquarters
latitude: 18.52027778
Expand Down
13 changes: 13 additions & 0 deletions functests/test_resources/synsation_story.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ steps:
reception_email: {{ location.attributes.reception_email }}
reception_phone: {{ location.attributes.reception_phone }}
{% endfor %}
- step:
action: LOCATIONS_COUNT
description: Count locations in namespace
print_response: true
attrs:
namespace: "{{ env['ARCHIVIST_NAMESPACE'] or 'namespace' }}"

- step:
action: LOCATIONS_LIST
description: List locations in namespace
print_response: true
attrs:
namespace: "{{ env['ARCHIVIST_NAMESPACE'] or 'namespace' }}"

{% for asset in assets %}
- step:
Expand Down