aboutsummaryrefslogtreecommitdiffstats
path: root/products/onap-dublin
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2019-03-27 11:22:29 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-27 11:22:29 +0000
commitd965f129d73766bd201f6226d14b1193a693c35a (patch)
tree3301b6dcc6b8226cc64f6f34941ba5e1692f1d95 /products/onap-dublin
parent221c183badd87fd0f49bbe788980ca4d64244719 (diff)
parent5393a7d5603825997da17ef086d28d7c318718fd (diff)
Merge "Cloud Flavor list command for dublin CLI"
Diffstat (limited to 'products/onap-dublin')
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-moco.json378
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-sample.yaml32
-rw-r--r--products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-flavor-list-schema-dublin.yaml81
3 files changed, 491 insertions, 0 deletions
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-moco.json
new file mode 100644
index 00000000..15ac5393
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-moco.json
@@ -0,0 +1,378 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/ONAP-POD-01-Rail-05/flavors",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-7bfa57a0-e098-4865-992b-5c0edfac75d1",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "flavor" : [ {
+ "flavor-id" : "30",
+ "flavor-name" : "m1.large",
+ "flavor-vcpus" : 4,
+ "flavor-ram" : 4096,
+ "flavor-disk" : 30,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/30",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857642890"
+ }, {
+ "flavor-id" : "221",
+ "flavor-name" : "onap.hpa.flavor21",
+ "flavor-vcpus" : 2,
+ "flavor-ram" : 512,
+ "flavor-disk" : 20,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/221",
+ "flavor-disabled" : false,
+ "hpa-capabilities" : {
+ "hpa-capability" : [ {
+ "hpa-capability-id" : "3201b939-6fd3-4185-b36c-b9e2b89e699c",
+ "hpa-feature" : "hugePages",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857634013",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "memoryPageSize",
+ "hpa-attribute-value" : "{\"value\":\"2048\",\"unit\":\"KB\"}",
+ "resource-version" : "1547857634077"
+ } ]
+ }, {
+ "hpa-capability-id" : "d6d28707-88af-48e0-9f72-2669dd47879e",
+ "hpa-feature" : "localStorage",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857634122",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "swapMemSize",
+ "hpa-attribute-value" : "{\"value\":\"0\",\"unit\":\"MB\"}",
+ "resource-version" : "1547857634266"
+ }, {
+ "hpa-attribute-key" : "diskSize",
+ "hpa-attribute-value" : "{\"value\":\"20\",\"unit\":\"GB\"}",
+ "resource-version" : "1547857634208"
+ }, {
+ "hpa-attribute-key" : "ephemeralDiskSize",
+ "hpa-attribute-value" : "{\"value\":\"0\",\"unit\":\"GB\"}",
+ "resource-version" : "1547857634287"
+ } ]
+ }, {
+ "hpa-capability-id" : "d4911790-fe3d-468c-9f14-3243720ceecf",
+ "hpa-feature" : "cpuPinning",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857633656",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "logicalCpuPinningPolicy",
+ "hpa-attribute-value" : "{\"value\":\"dedicated\"}",
+ "resource-version" : "1547857633850"
+ }, {
+ "hpa-attribute-key" : "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value" : "{\"value\":\"isolate\"}",
+ "resource-version" : "1547857633702"
+ } ]
+ }, {
+ "hpa-capability-id" : "debc454e-ea09-4a80-ba26-2097d2edd398",
+ "hpa-feature" : "ovsDpdk",
+ "hpa-version" : "v1",
+ "architecture" : "Intel64",
+ "resource-version" : "1547857634393",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value" : "{\"value\":\"v17.02\"}",
+ "resource-version" : "1547857634418"
+ } ]
+ }, {
+ "hpa-capability-id" : "62c138b5-290b-40fa-99cb-d58d8a76a93c",
+ "hpa-feature" : "basicCapabilities",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857633289",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "virtualMemSize",
+ "hpa-attribute-value" : "{\"value\":\"512\",\"unit\":\"MB\"}",
+ "resource-version" : "1547857633571"
+ }, {
+ "hpa-attribute-key" : "numVirtualCpu",
+ "hpa-attribute-value" : "{\"value\":\"2\"}",
+ "resource-version" : "1547857633401"
+ } ]
+ } ]
+ },
+ "resource-version" : "1547857633230"
+ }, {
+ "flavor-id" : "10",
+ "flavor-name" : "m1.small",
+ "flavor-vcpus" : 1,
+ "flavor-ram" : 1024,
+ "flavor-disk" : 10,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/10",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857628647"
+ }, {
+ "flavor-id" : "222",
+ "flavor-name" : "onap.hpa.flavor22",
+ "flavor-vcpus" : 2,
+ "flavor-ram" : 2048,
+ "flavor-disk" : 20,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/222",
+ "flavor-disabled" : false,
+ "hpa-capabilities" : {
+ "hpa-capability" : [ {
+ "hpa-capability-id" : "737e7791-af11-4b82-8b0c-2834f3315134",
+ "hpa-feature" : "hugePages",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857636101",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "memoryPageSize",
+ "hpa-attribute-value" : "{\"value\":\"2048\",\"unit\":\"KB\"}",
+ "resource-version" : "1547857636231"
+ } ]
+ }, {
+ "hpa-capability-id" : "0e96b6f2-2080-4537-8af7-07ca2e51c740",
+ "hpa-feature" : "ovsDpdk",
+ "hpa-version" : "v1",
+ "architecture" : "Intel64",
+ "resource-version" : "1547857636818",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value" : "{\"value\":\"v17.02\"}",
+ "resource-version" : "1547857636856"
+ } ]
+ }, {
+ "hpa-capability-id" : "8a7e4141-e192-487b-b31a-da886899c5cb",
+ "hpa-feature" : "localStorage",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857636258",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "swapMemSize",
+ "hpa-attribute-value" : "{\"value\":\"0\",\"unit\":\"MB\"}",
+ "resource-version" : "1547857636439"
+ }, {
+ "hpa-attribute-key" : "diskSize",
+ "hpa-attribute-value" : "{\"value\":\"20\",\"unit\":\"GB\"}",
+ "resource-version" : "1547857636336"
+ }, {
+ "hpa-attribute-key" : "ephemeralDiskSize",
+ "hpa-attribute-value" : "{\"value\":\"0\",\"unit\":\"GB\"}",
+ "resource-version" : "1547857636542"
+ } ]
+ }, {
+ "hpa-capability-id" : "20811e74-fc45-42a5-a1eb-f1a45bfa0833",
+ "hpa-feature" : "basicCapabilities",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857635842",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "numVirtualCpu",
+ "hpa-attribute-value" : "{\"value\":\"2\"}",
+ "resource-version" : "1547857635908"
+ }, {
+ "hpa-attribute-key" : "virtualMemSize",
+ "hpa-attribute-value" : "{\"value\":\"2048\",\"unit\":\"MB\"}",
+ "resource-version" : "1547857635970"
+ } ]
+ }, {
+ "hpa-capability-id" : "8a52f119-0143-4e00-b726-c28ba370d0d1",
+ "hpa-feature" : "sriovNICNetwork",
+ "hpa-version" : "v1",
+ "architecture" : "intel",
+ "resource-version" : "1547857636622",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "pciCount",
+ "hpa-attribute-value" : "{\"value\":\"2\"}",
+ "resource-version" : "1547857636655"
+ }, {
+ "hpa-attribute-key" : "physicalNetwork",
+ "hpa-attribute-value" : "{\"value\":\"private-1\"}",
+ "resource-version" : "1547857636803"
+ }, {
+ "hpa-attribute-key" : "pciVendorId",
+ "hpa-attribute-value" : "{\"value\":\"8086\"}",
+ "resource-version" : "1547857636690"
+ }, {
+ "hpa-attribute-key" : "pciDeviceId",
+ "hpa-attribute-value" : "{\"value\":\"154C\"}",
+ "resource-version" : "1547857636789"
+ } ]
+ } ]
+ },
+ "resource-version" : "1547857635807"
+ }, {
+ "flavor-id" : "0",
+ "flavor-name" : "m1.tiny",
+ "flavor-vcpus" : 1,
+ "flavor-ram" : 512,
+ "flavor-disk" : 1,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/0",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857626877"
+ }, {
+ "flavor-id" : "50",
+ "flavor-name" : "m1.xxlarge",
+ "flavor-vcpus" : 12,
+ "flavor-ram" : 24567,
+ "flavor-disk" : 50,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/50",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857647065"
+ }, {
+ "flavor-id" : "40",
+ "flavor-name" : "m1.xlarge",
+ "flavor-vcpus" : 8,
+ "flavor-ram" : 8192,
+ "flavor-disk" : 40,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/40",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857645715"
+ }, {
+ "flavor-id" : "20",
+ "flavor-name" : "m1.medium",
+ "flavor-vcpus" : 2,
+ "flavor-ram" : 2048,
+ "flavor-disk" : 20,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/20",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857630702"
+ }, {
+ "flavor-id" : "223",
+ "flavor-name" : "onap.hpa.flavor23",
+ "flavor-vcpus" : 2,
+ "flavor-ram" : 2048,
+ "flavor-disk" : 20,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/223",
+ "flavor-disabled" : false,
+ "hpa-capabilities" : {
+ "hpa-capability" : [ {
+ "hpa-capability-id" : "d7c40459-b36d-4910-a07f-ff67b8ef2b0c",
+ "hpa-feature" : "sriovNICNetwork",
+ "hpa-version" : "v1",
+ "architecture" : "intel",
+ "resource-version" : "1547857640758",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "pciCount",
+ "hpa-attribute-value" : "{\"value\":\"2\"}",
+ "resource-version" : "1547857640835"
+ }, {
+ "hpa-attribute-key" : "pciDeviceId",
+ "hpa-attribute-value" : "{\"value\":\"154C\"}",
+ "resource-version" : "1547857640944"
+ }, {
+ "hpa-attribute-key" : "pciVendorId",
+ "hpa-attribute-value" : "{\"value\":\"8086\"}",
+ "resource-version" : "1547857640890"
+ }, {
+ "hpa-attribute-key" : "physicalNetwork",
+ "hpa-attribute-value" : "{\"value\":\"shared-1\"}",
+ "resource-version" : "1547857641061"
+ } ]
+ }, {
+ "hpa-capability-id" : "f46537e2-48c1-4b19-8cd2-568bde2673a7",
+ "hpa-feature" : "ovsDpdk",
+ "hpa-version" : "v1",
+ "architecture" : "Intel64",
+ "resource-version" : "1547857641290",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value" : "{\"value\":\"v17.02\"}",
+ "resource-version" : "1547857641373"
+ } ]
+ }, {
+ "hpa-capability-id" : "3dccccdc-7d0a-45e0-b474-3c942abb10dd",
+ "hpa-feature" : "basicCapabilities",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857639564",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "numVirtualCpu",
+ "hpa-attribute-value" : "{\"value\":\"2\"}",
+ "resource-version" : "1547857639774"
+ }, {
+ "hpa-attribute-key" : "virtualMemSize",
+ "hpa-attribute-value" : "{\"value\":\"2048\",\"unit\":\"MB\"}",
+ "resource-version" : "1547857639913"
+ } ]
+ }, {
+ "hpa-capability-id" : "61470e69-c1c1-41be-9877-f82737ec5acd",
+ "hpa-feature" : "hugePages",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857640048",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "memoryPageSize",
+ "hpa-attribute-value" : "{\"value\":\"2048\",\"unit\":\"KB\"}",
+ "resource-version" : "1547857640117"
+ } ]
+ }, {
+ "hpa-capability-id" : "7b009f9c-7e99-4420-b756-b7d448d53633",
+ "hpa-feature" : "localStorage",
+ "hpa-version" : "v1",
+ "architecture" : "generic",
+ "resource-version" : "1547857640407",
+ "hpa-feature-attributes" : [ {
+ "hpa-attribute-key" : "ephemeralDiskSize",
+ "hpa-attribute-value" : "{\"value\":\"0\",\"unit\":\"GB\"}",
+ "resource-version" : "1547857640694"
+ }, {
+ "hpa-attribute-key" : "diskSize",
+ "hpa-attribute-value" : "{\"value\":\"20\",\"unit\":\"GB\"}",
+ "resource-version" : "1547857640550"
+ }, {
+ "hpa-attribute-key" : "swapMemSize",
+ "hpa-attribute-value" : "{\"value\":\"0\",\"unit\":\"MB\"}",
+ "resource-version" : "1547857640652"
+ } ]
+ } ]
+ },
+ "resource-version" : "1547857639343"
+ }, {
+ "flavor-id" : "309",
+ "flavor-name" : "rt",
+ "flavor-vcpus" : 4,
+ "flavor-ram" : 1024,
+ "flavor-disk" : 2,
+ "flavor-ephemeral" : 0,
+ "flavor-swap" : "",
+ "flavor-is-public" : true,
+ "flavor-selflink" : "http://10.12.11.5:8774/v2.1/709ba629fe194f8699b12f9d6ffd86a0/flavors/309",
+ "flavor-disabled" : false,
+ "resource-version" : "1547857644692"
+ } ]
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-sample.yaml
new file mode 100644
index 00000000..6cd31243
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/cloud/cloud-flavor-list-schema-dublin-sample.yaml
@@ -0,0 +1,32 @@
+open_cli_sample_version: 1.0
+name: -y
+version: onap-dublin
+samples:
+ sample1:
+ name: -y
+ input: CloudOwner -x ONAP-POD-01-Rail-05 -s
+ moco: cloud-flavor-list-schema-dublin-moco.json
+ output: |
+ +--------------------+------------------+--------+----------+------------+------+
+ |flavor |resource-version |vcpus |ram-size |disk-size |ID |
+ +--------------------+------------------+--------+----------+------------+------+
+ |m1.large |1547857642890 |4 |4096 |30 |30 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |onap.hpa.flavor21 |1547857633230 |2 |512 |20 |221 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |m1.small |1547857628647 |1 |1024 |10 |10 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |onap.hpa.flavor22 |1547857635807 |2 |2048 |20 |222 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |m1.tiny |1547857626877 |1 |512 |1 |0 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |m1.xxlarge |1547857647065 |12 |24567 |50 |50 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |m1.xlarge |1547857645715 |8 |8192 |40 |40 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |m1.medium |1547857630702 |2 |2048 |20 |20 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |onap.hpa.flavor23 |1547857639343 |2 |2048 |20 |223 |
+ +--------------------+------------------+--------+----------+------------+------+
+ |rt |1547857644692 |4 |1024 |2 |309 |
+ +--------------------+------------------+--------+----------+------------+------+
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-flavor-list-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-flavor-list-schema-dublin.yaml
new file mode 100644
index 00000000..1c394526
--- /dev/null
+++ b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-flavor-list-schema-dublin.yaml
@@ -0,0 +1,81 @@
+# Copyright © Intel Corporation 2019
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: cloud-flavor-list
+description: List the flavors in a cloud region and its capabilities including HPA with -s option
+
+info:
+ product: onap-dublin
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: cloud-region
+ description: Name of cloud region
+ type: string
+ short_option: x
+ long_option: name
+ is_optional: false
+ - name: cloud-owner
+ description: Name of cloud owner
+ type: string
+ short_option: y
+ long_option: cloud-owner
+ is_optional: false
+
+
+results:
+ direction: landscape
+ attributes:
+ - name: flavor
+ description: Name of Flavor
+ scope: short
+ type: string
+ - name: resource-version
+ description: Resource version of the Flavor
+ scope: short
+ type: string
+ - name: vcpus
+ description: Number of VCPUs
+ scope: short
+ type: string
+ - name: ram-size
+ description: RAM Size for flavor
+ scope: short
+ type: string
+ - name: disk-size
+ description: Disk size for flavor
+ scope: short
+ type: string
+ - name: ID
+ description: flavor ID in cloud
+ scope: long
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/flavors?depth=all
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ flavor: $b{flavor.[*].flavor-name}
+ vcpus: $b{flavor.[*].flavor-vcpus}
+ ram-size: $b{flavor.[*].flavor-ram}
+ disk-size: $b{flavor.[*].flavor-disk}
+ resource-version: $b{flavor.[*].resource-version}
+ ID: $b{flavor.[*].flavor-id}