Vitrage Get Template List API

https://blueprints.launchpad.net/vitrage/+spec/template-list-api

An API for list all templates loaded from templates lib, both those that passed validation and those that did not

Problem description

We would like to be able to list all templates loaded from /etc/vitrage/templates, both those that passed validation and those that did not before uploading it to Vitrage.

Proposed change

Create API to list all Vitrage loaded templates.

  1. Valid template - template that passed validation and loaded into Scenario Repository.

  2. Invalid template = template that did not pass validation.

The template list API returns a table with the following columns:

  1. uuid - a unique id generated by Vitrage

  2. name - template’s name

  3. status - pass validation or not

  4. status details

  5. date - when template validation occurred (before template loading is executed)

Alternatives

None

Data model impact

None

REST API impact

Template List

Returns template list

GET /

Headers

  • X-Auth-Token (string, required) - Keystone auth token

  • Accept (string) - application/json

  • User-Agent (String)

Path Parameters

None.

Query Parameters

None

Request Body

None.

Request Examples

GET /v1/template/
Host: 135.248.18.122:8999
User-Agent: keystoneauth1/2.3.0 python-requests/2.9.1 CPython/2.7.6
Accept: application/json
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
Response

Status code

  • 200 - OK

  • 400 - Bad request

Response Body

Returns a table that is a list of all templates. Each row describes a template and its status.

Response Examples

::

uuid

name

status

status details

date

67bebcb4-53b1-4240-ad05-451f34db2438 4cc899e6-f6cb-43d8-94a0-6fa937e41ae2 0548367e-711a-4c08-9bdb-cb61f96fed04 33cb4400-f846-4c64-b168-530824d38f3e a04cd155-0fcf-4409-a27c-c83ba8b20a3c

vm_down_causes_suboptimal_application host_cpu_load_causes_vm_problem switch_connectivity_issues host_nic_down disconnected_storage_problems

failed pass pass pass pass

Entity definition must contain template_id field Template validation is OK Template validation is OK Template validation is OK Template validation is OK

2016-06-29T12:24:16Z 2016-06-29T12:24:16Z 2016-06-29T12:24:16Z 2016-06-29T12:24:16Z 2016-06-29T12:24:16Z

Security impact

None

Pipeline impact

None

Other end user impact

None

Performance/Scalability Impacts

None

Other deployer impact

None

Developer impact

None

Implementation

Assignee(s)

liat har-tal <liat.har-tal@nokia.com>

Work Items

None

Future lifecycle

None

Dependencies

None

Testing

Tempest tests also need to be added in order to test:

  1. Get template list

Documentation Impact

The new api should be documented

References

None