From 0f7b7e5c90075c82b2b84a02a0d2650716b67069 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Fri, 18 Dec 2020 17:30:26 +0000 Subject: [PATCH] docs: added examples of device responses to api docs --- website/pages/api-docs/client.mdx | 52 ++++++++++++++++++++++++++++++ website/pages/api-docs/nodes.mdx | 53 ++++++++++++++++++++++++++++++- 2 files changed, 104 insertions(+), 1 deletion(-) diff --git a/website/pages/api-docs/client.mdx b/website/pages/api-docs/client.mdx index e90601b6c..04d984095 100644 --- a/website/pages/api-docs/client.mdx +++ b/website/pages/api-docs/client.mdx @@ -125,6 +125,58 @@ $ curl \ } ], "CPUTicksConsumed": 1126.8044804480448, + "DeviceStats": [ + { + "InstanceStats": { + "6a61929e-d572-092d-5921-156a913f8e56": { + "Stats": { + "Attributes": { + "Used Memory": { + "Desc": "Memory in use by the device", + "IntNumeratorVal": 128, + "Unit": "MiB" + } + }, + "Nested": {} + }, + "Summary": { + "Desc": "Memory in use by the device", + "IntNumeratorVal": 128, + "Unit": "MiB" + }, + "Timestamp": "2020-12-18T17:15:08.949806Z" + } + }, + "Name": "modelA", + "Type": "skeleton", + "Vendor": "hashicorp" + }, + { + "InstanceStats": { + "73af5d3e-00f9-0786-9bc1-8f5ffa953f15": { + "Stats": { + "Attributes": { + "Used Memory": { + "Desc": "Memory in use by the device", + "IntNumeratorVal": 128, + "Unit": "MiB" + } + }, + "Nested": {} + }, + "Summary": { + "Desc": "Memory in use by the device", + "IntNumeratorVal": 128, + "Unit": "MiB" + }, + "Timestamp": "2020-12-18T17:15:08.949806Z" + } + }, + "Name": "modelB", + "Type": "skeleton", + "Vendor": "hashicorp" + } + ], "DiskStats": [ { "Available": 142943150080, diff --git a/website/pages/api-docs/nodes.mdx b/website/pages/api-docs/nodes.mdx index ba4c810c9..715979d00 100644 --- a/website/pages/api-docs/nodes.mdx +++ b/website/pages/api-docs/nodes.mdx @@ -297,7 +297,58 @@ $ curl \ "Cpu": { "CpuShares": 32000 }, - "Devices": null, + "Devices": [ + { + "Attributes": { + "attrB": { + "Float": 10.5, + "Unit": "MW" + }, + "attrA": { + "Int": 1024, + "Unit": "MB" + } + }, + "Instances": [ + { + "HealthDescription": "", + "Healthy": true, + "ID": "6a61929e-d572-092d-5921-156a913f8e56", + "Locality": { + "PciBusID": "77cda534-0660-2688-6c2e-ad6c62fc5ff3" + } + } + ], + "Name": "modelA", + "Type": "skeleton", + "Vendor": "hashicorp" + }, + { + "Attributes": { + "attrB": { + "Float": 10.5, + "Unit": "MW" + }, + "attrA": { + "Int": 1024, + "Unit": "MB" + } + }, + "Instances": [ + { + "HealthDescription": "", + "Healthy": true, + "ID": "73af5d3e-00f9-0786-9bc1-8f5ffa953f15", + "Locality": { + "PciBusID": "dbda64d1-ad25-6c7c-d3fb-798bae0581bf" + } + } + ], + "Name": "modelB", + "Type": "skeleton", + "Vendor": "hashicorp" + } + ], "Disk": { "DiskMB": 7890 },