From 49322bd26d28db690f7f417230bf562ffdde4082 Mon Sep 17 00:00:00 2001 From: Ifat Afek Date: Mon, 11 Jun 2018 11:50:21 +0300 Subject: [PATCH] Updated the API documentation 1. Updated vitrage_id examples to the new UUID format (that was introduced in Pike) 2. Updated the response example of 'vitrage topology show' Change-Id: Ifaef42b2b3916b306460edc8fb1db4771fdf05b0 --- doc/source/contributor/vitrage-api.rst | 531 ++++++------------------- 1 file changed, 122 insertions(+), 409 deletions(-) diff --git a/doc/source/contributor/vitrage-api.rst b/doc/source/contributor/vitrage-api.rst index ba4822eea..f6319a848 100644 --- a/doc/source/contributor/vitrage-api.rst +++ b/doc/source/contributor/vitrage-api.rst @@ -218,430 +218,143 @@ Response Examples "graph": {}, "nodes": [ { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-8", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "20d12a8a-ea9a-89c6-5947-83bea959362e", - "graph_index": 0, - "vitrage_id": "RESOURCE:nova.instance:20d12a8a-ea9a-89c6-5947-83bea959362e" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-2", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "dc35fa2f-4515-1653-ef6b-03b471bb395b", - "graph_index": 1, - "vitrage_id": "RESOURCE:nova.instance:dc35fa2f-4515-1653-ef6b-03b471bb395b" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-13", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "9879cf5a-bdcf-3651-3017-961ed887ec86", - "graph_index": 2, - "vitrage_id": "RESOURCE:nova.instance:9879cf5a-bdcf-3651-3017-961ed887ec86" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-10", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "fe124f4b-9ed7-4591-fcd1-803cf5c33cb1", - "graph_index": 3, - "vitrage_id": "RESOURCE:nova.instance:fe124f4b-9ed7-4591-fcd1-803cf5c33cb1" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-11", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "f2e48a97-7350-061e-12d3-84c6dc3e67c0", - "graph_index": 4, - "vitrage_id": "RESOURCE:nova.instance:f2e48a97-7350-061e-12d3-84c6dc3e67c0" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "host-2", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "available", - "vitrage_type": "nova.host", - "id": "host-2", - "graph_index": 5, - "vitrage_id": "RESOURCE:nova.host:host-2" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "host-3", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "available", - "vitrage_type": "nova.host", - "id": "host-3", - "graph_index": 6, - "vitrage_id": "RESOURCE:nova.host:host-3" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "host-0", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "available", - "vitrage_type": "nova.host", - "id": "host-0", - "graph_index": 7, - "vitrage_id": "RESOURCE:nova.host:host-0" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "host-1", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "available", - "vitrage_type": "nova.host", - "id": "host-1", - "graph_index": 8, - "vitrage_id": "RESOURCE:nova.host:host-1" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-9", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "275097cf-954e-8e24-b185-9514e24b8591", - "graph_index": 9, - "vitrage_id": "RESOURCE:nova.instance:275097cf-954e-8e24-b185-9514e24b8591" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-1", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "a0f0805f-c804-cffe-c25a-1b38f555ed68", - "graph_index": 10, - "vitrage_id": "RESOURCE:nova.instance:a0f0805f-c804-cffe-c25a-1b38f555ed68" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-14", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "56af57d2-34a4-19b1-5106-b613637a11a7", - "graph_index": 11, - "vitrage_id": "RESOURCE:nova.instance:56af57d2-34a4-19b1-5106-b613637a11a7" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "zone-1", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "available", - "vitrage_type": "nova.zone", - "id": "zone-1", - "graph_index": 12, - "vitrage_id": "RESOURCE:nova.zone:zone-1" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-3", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "16e14c58-d254-2bec-53e4-c766e48810aa", - "graph_index": 13, - "vitrage_id": "RESOURCE:nova.instance:16e14c58-d254-2bec-53e4-c766e48810aa" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-7", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "f35a1e10-74ff-7332-8edf-83cd6ffcb2de", - "graph_index": 14, - "vitrage_id": "RESOURCE:nova.instance:f35a1e10-74ff-7332-8edf-83cd6ffcb2de" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-4", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "ea8a450e-cab1-2272-f431-494b40c5c378", - "graph_index": 15, - "vitrage_id": "RESOURCE:nova.instance:ea8a450e-cab1-2272-f431-494b40c5c378" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-6", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "6e42bdc3-b776-1b2c-2c7d-b7a8bb98f721", - "graph_index": 16, - "vitrage_id": "RESOURCE:nova.instance:6e42bdc3-b776-1b2c-2c7d-b7a8bb98f721" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-5", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "8c951613-c660-87c0-c18b-0fa3293ce8d8", - "graph_index": 17, - "vitrage_id": "RESOURCE:nova.instance:8c951613-c660-87c0-c18b-0fa3293ce8d8" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "zone-0", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "available", - "vitrage_type": "nova.zone", - "id": "zone-0", - "graph_index": 18, - "vitrage_id": "RESOURCE:nova.zone:zone-0" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-0", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "78353ce4-2710-49b5-1341-b8cbb6000ebc", - "graph_index": 19, - "vitrage_id": "RESOURCE:nova.instance:78353ce4-2710-49b5-1341-b8cbb6000ebc" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, - "name": "vm-12", - "update_timestamp": "2015-12-01T12:46:41Z", - "state": "ACTIVE", - "project_id": "0683517e1e354d2ba25cba6937f44e79", - "vitrage_type": "nova.instance", - "id": "35bf479a-75d9-80a9-874e-d3b50fb2dd2e", - "graph_index": 20, - "vitrage_id": "RESOURCE:nova.instance:35bf479a-75d9-80a9-874e-d3b50fb2dd2e" - }, - { - "vitrage_category": "RESOURCE", - "vitrage_is_placeholder": false, - "vitrage_is_deleted": false, + "vitrage_id": "96f6a30a-51eb-4e71-ae4a-0703b21ffa98", "name": "openstack.cluster", + "graph_index": 0, + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "OK", + "state": "available", "vitrage_type": "openstack.cluster", - "id": "openstack.cluster", - "graph_index": 21, - "vitrage_id": "RESOURCE:openstack.cluster" + "vitrage_sample_timestamp": "2018-06-11 08:43:33.757864+00:00", + "vitrage_aggregated_state": "AVAILABLE", + "vitrage_is_placeholder": false, + "id": "OpenStack Cluster", + "is_real_vitrage_id": true, + "vitrage_is_deleted": false + }, + { + "vitrage_id": "12b11320-a6de-4ce5-892f-78fb1fa6bfef", + "name": "nova", + "update_timestamp": "2018-06-11 08:43:33.757864+00:00", + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "OK", + "state": "available", + "vitrage_type": "nova.zone", + "vitrage_sample_timestamp": "2018-06-11 08:43:33.757864+00:00", + "graph_index": 1, + "vitrage_aggregated_state": "AVAILABLE", + "vitrage_is_placeholder": false, + "id": "nova", + "is_real_vitrage_id": true, + "vitrage_is_deleted": false + }, + { + "vitrage_id": "c90cc1dd-409c-4354-92f8-79b993e584c0", + "vitrage_is_deleted": false, + "graph_index": 2, + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "N/A", + "vitrage_type": "nova.instance", + "vitrage_sample_timestamp": "2018-06-11 08:33:33.457974+00:00", + "vitrage_aggregated_state": null, + "vitrage_is_placeholder": true, + "id": "ce173654-c70d-4514-a3e9-1f9dd5c09dd8", + "is_real_vitrage_id": true + }, + { + "vitrage_id": "94060508-5fea-4927-9a53-2b66864ab883", + "vitrage_is_deleted": false, + "graph_index": 3, + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "N/A", + "vitrage_type": "nova.instance", + "vitrage_sample_timestamp": "2018-06-11 08:33:33.457992+00:00", + "vitrage_aggregated_state": null, + "vitrage_is_placeholder": true, + "id": "3af9a215-e109-476a-aa55-6868990684e4", + "is_real_vitrage_id": true + }, + { + "vitrage_id": "ae0886d8-ee90-41df-a80a-006fdb80105b", + "graph_index": 4, + "name": "vm-4", + "update_timestamp": "2018-06-11 08:43:34.421455+00:00", + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "OK", + "state": "ACTIVE", + "vitrage_type": "nova.instance", + "vitrage_sample_timestamp": "2018-06-11 08:43:34.421455+00:00", + "host_id": "devstack-rocky-8", + "vitrage_aggregated_state": "ACTIVE", + "vitrage_is_placeholder": false, + "project_id": "aa792cde038b41858a0f1bcf8f9b092d", + "id": "1233e48c-62ee-470e-8d4a-adff30211b5d", + "is_real_vitrage_id": true, + "vitrage_is_deleted": false + }, + { + "vitrage_id": "4d197913-0687-4300-afb7-7fd331d35cff", + "graph_index": 5, + "name": "vm-3", + "update_timestamp": "2018-06-11 08:43:34.421490+00:00", + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "OK", + "state": "ACTIVE", + "vitrage_type": "nova.instance", + "vitrage_sample_timestamp": "2018-06-11 08:47:24.137324+00:00", + "host_id": "devstack-rocky-8", + "vitrage_aggregated_state": "ACTIVE", + "vitrage_is_placeholder": false, + "project_id": "aa792cde038b41858a0f1bcf8f9b092d", + "id": "12cc6d3e-f801-4422-b2a0-43cedacb4eb5", + "is_real_vitrage_id": true, + "vitrage_is_deleted": false + }, + { + "vitrage_id": "5f9893b8-c622-4cb8-912d-534980f4e4f9", + "name": "devstack-rocky-8", + "update_timestamp": "2018-06-11 08:43:33.518059+00:00", + "vitrage_category": "RESOURCE", + "vitrage_operational_state": "OK", + "state": "available", + "vitrage_type": "nova.host", + "vitrage_sample_timestamp": "2018-06-11 08:43:33.757864+00:00", + "graph_index": 6, + "vitrage_aggregated_state": "AVAILABLE", + "vitrage_is_placeholder": false, + "id": "devstack-rocky-8", + "is_real_vitrage_id": true, + "vitrage_is_deleted": false } ], "links": [ { "relationship_type": "contains", + "source": 0, "vitrage_is_deleted": false, - "target": 3, "key": "contains", - "source": 5 + "target": 1 }, { "relationship_type": "contains", + "source": 1, "vitrage_is_deleted": false, - "target": 1, "key": "contains", - "source": 5 + "target": 6 }, { "relationship_type": "contains", + "source": 6, "vitrage_is_deleted": false, - "target": 16, "key": "contains", - "source": 5 + "target": 4 }, { "relationship_type": "contains", + "source": 6, "vitrage_is_deleted": false, - "target": 11, "key": "contains", - "source": 5 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 13, - "key": "contains", - "source": 6 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 4, - "key": "contains", - "source": 6 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 14, - "key": "contains", - "source": 6 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 20, - "key": "contains", - "source": 7 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 0, - "key": "contains", - "source": 7 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 19, - "key": "contains", - "source": 7 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 15, - "key": "contains", - "source": 7 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 9, - "key": "contains", - "source": 8 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 10, - "key": "contains", - "source": 8 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 2, - "key": "contains", - "source": 8 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 17, - "key": "contains", - "source": 8 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 6, - "key": "contains", - "source": 12 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 8, - "key": "contains", - "source": 12 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 5, - "key": "contains", - "source": 18 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 7, - "key": "contains", - "source": 18 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 18, - "key": "contains", - "source": 21 - }, - { - "relationship_type": "contains", - "vitrage_is_deleted": false, - "target": 12, - "key": "contains", - "source": 21 + "target": 5 } ], "multigraph": true @@ -721,7 +434,7 @@ Response Examples "resource_name": "host-0", "resource_id": "host-0", "id": 0, - "vitrage_id": "ALARM:nagios:host0:CPU load" + "vitrage_id": "a2760124-a174-46a1-926f-0d0d12a94a20" }, { "vitrage_category": "ALARM", @@ -734,7 +447,7 @@ Response Examples "resource_name": "vm0", "resource_id": "20d12a8a-ea9a-89c6-5947-83bea959362e", "id": 1, - "vitrage_id": "ALARM:vitrage:vm0:Machine Suboptimal" + "vitrage_id": "4c0a2724-edce-4125-a74c-bf74d4413967" }, { "vitrage_category": "ALARM", @@ -747,7 +460,7 @@ Response Examples "resource_name": "vm1", "resource_id": "275097cf-954e-8e24-b185-9514e24b8591", "id": 2, - "vitrage_id": "ALARM:vitrage:vm1:Machine Suboptimal" + "vitrage_id": "625f2914-cb0e-453a-977a-900aa7756524" } ], "links": [ @@ -835,7 +548,7 @@ Response Examples "resource_name": "host-0", "resource_id": "host-0", "id": 0, - "vitrage_id": "ALARM:nagios:host0:CPU load", + "vitrage_id": "517bf941-0bec-4f7c-9870-8b79fc5086d1", "normalized_severity": "WARNING" }, { @@ -849,7 +562,7 @@ Response Examples "resource_name": "vm0", "resource_id": "20d12a8a-ea9a-89c6-5947-83bea959362e", "id": 1, - "vitrage_id": "ALARM:vitrage:vm0:Machine Suboptimal", + "vitrage_id": "3e9f8ca2-1562-4ff8-be08-93427f5328f6", "normalized_severity": "CRITICAL" }, { @@ -863,7 +576,7 @@ Response Examples "resource_name": "vm1", "resource_id": "275097cf-954e-8e24-b185-9514e24b8591", "id": 2, - "vitrage_id": "ALARM:vitrage:vm1:Machine Suboptimal", + "vitrage_id": "0320ba74-ab51-42e8-b60f-525b0ee63da4", "normalized_severity": "CRITICAL" }, { @@ -878,7 +591,7 @@ Response Examples "resource_name": "host-0", "resource_id": "host-0", "id": 3, - "vitrage_id": "ALARM:aodh:host0:Memory overload", + "vitrage_id": "4ee7916d-f8e7-4364-83b0-a7d1fe6ce8c3", "normalized_severity": "WARNING" } ] @@ -1593,7 +1306,7 @@ Response Examples [ { - "vitrage_id": "RESOURCE:nova.host:cloud", + "vitrage_id": "6b4a4272-0fef-4b35-9c3c-98bc8e71cd38", "vitrage_aggregated_state": "AVAILABLE", "state": "available", "vitrage_type": "nova.host", @@ -1673,7 +1386,7 @@ Response Examples "project_id": "0683517e1e354d2ba25cba6937f44e79", "vitrage_type": "nova.instance", "id": "dc35fa2f-4515-1653-ef6b-03b471bb395b", - "vitrage_id": "RESOURCE:nova.instance:dc35fa2f-4515-1653-ef6b-03b471bb395b" + "vitrage_id": "11680c27-86a2-41a7-89db-863e68b1c2c9" } Webhook List