From cf73b435e65d0bb4403bda3e6f468b4c892ca54d Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Tue, 28 Mar 2017 18:19:35 -0700 Subject: [PATCH] Add HTTP request example for node composition via flavor Current valence support two ways to specify required hardware resource. * Specify every details in "properties" attribution * Specify node flavor via "flavor_id" Added example to show how to compose through flavor. Change-Id: Ieab02fe2f2a46fa8cd28285fb88bc5fba8e5b6ff Closes-Bug: #1677080 --- .../mockup/composed-node-create-via-flavor-request.json | 5 +++++ api-ref/source/valence-api-v1-nodes.inc | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 api-ref/source/mockup/composed-node-create-via-flavor-request.json diff --git a/api-ref/source/mockup/composed-node-create-via-flavor-request.json b/api-ref/source/mockup/composed-node-create-via-flavor-request.json new file mode 100644 index 0000000..4a7d4f1 --- /dev/null +++ b/api-ref/source/mockup/composed-node-create-via-flavor-request.json @@ -0,0 +1,5 @@ +{ + "name": "test_node", + "description": "node1", + "flavor_id": "90dd7dcd-166a-43c9-a6af-bcf3fbe67b66" +} diff --git a/api-ref/source/valence-api-v1-nodes.inc b/api-ref/source/valence-api-v1-nodes.inc index 88cafbe..91f96f0 100644 --- a/api-ref/source/valence-api-v1-nodes.inc +++ b/api-ref/source/valence-api-v1-nodes.inc @@ -37,6 +37,11 @@ Request .. literalinclude:: mockup/composed-node-create-request.json :language: javascript +**Example Node creation via flavor request:** + +.. literalinclude:: mockup/composed-node-create-via-flavor-request.json + :language: javascript + Response --------