Yaml update for PNF VNF 85/35785/1
authorXingXiaocheng <xingxiaocheng@huawei.com>
Tue, 13 Mar 2018 14:31:01 +0000 (14:31 +0000)
committerXingXiaocheng <xingxiaocheng@huawei.com>
Wed, 14 Mar 2018 15:41:50 +0000 (15:41 +0000)
Change-Id: Ic42e4e0a1a99d90cc5059e201103fd8dacb6e51c
Issue-ID: CLI-93
Signed-off-by: xingxiaocheng <xingxiaocheng@huawei.com>
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/pnf/pnf-create-schema.yaml
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/pnf/pnf-delete-schema.yaml
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/pnf/pnf-list-schema.yaml
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-create-schema.yaml [new file with mode: 0644]
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-delete-schema.yaml [new file with mode: 0644]
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-list-schema.yaml [new file with mode: 0644]

index 7b7b3bb..bb5f433 100644 (file)
@@ -37,25 +37,25 @@ parameters:
   - name: equip-type\r
     description: equip-type\r
     type: string\r
-    short_option: t\r
+    short_option: q\r
     long_option: equipType\r
     is_optional: true\r
   - name: equip-vendor\r
     description: equip-vendor\r
     type: string\r
-    short_option: v\r
+    short_option: x\r
     long_option: equip-vendor\r
     is_optional: true\r
   - name: in-maint\r
     description: Used to indicate whether or not this object is in maintenance mode (maintenance mode = true)\r
     type: bool\r
-    short_option: i\r
+    short_option: w\r
     long_option: in-maint\r
     is_optional: true\r
   - name: prov-status\r
     description: Prov Status of this device (not under canopi control) Valid values [PREPROV/NVTPROV/PROV]\r
     type: string\r
-    short_option: s\r
+    short_option: g\r
     long_option: prov-status\r
     is_optional: true\r
   - name: relationship\r
@@ -73,7 +73,7 @@ http:
     method: PUT\r
     context:\r
       remove_empty_node: true\r
-    body: '{"pnf-name": "${pnf-name}" ,"pnf-id": "${pnf-id}","equip-type": "${equip-type}","equip-vendor": "${equip-vendor}","in-maint": ${in-maint},"prov-status": "${prov-status}","relationship-list": ["${relationship}"]}'\r
+    body: '{"pnf-name": "${pnf-name}" ,"pnf-id": "${pnf-id}","equip-type": "${equip-type}","equip-vendor": "${equip-vendor}","in-maint": "${in-maint}","prov-status": "${prov-status}","relationship-list": ["${relationship}"]}'\r
   success_codes:\r
     - 200\r
     - 201\r
index cbc4b57..f4be138 100644 (file)
@@ -32,7 +32,7 @@ parameters:
   - name: resource-version\r
     description: Onap pnf resource version\r
     type: uuid\r
-    short_option: v\r
+    short_option: b\r
     long_option: resource-version\r
     is_optional: false\r
 http:\r
index fd5832b..f989828 100644 (file)
@@ -32,6 +32,10 @@ results:
       description: Onap pnf id\r
       scope: short\r
       type: string\r
+    - name: resource-version\r
+      description: Onap resource-version\r
+      scope: short\r
+      type: string\r
 http:\r
   service:\r
     auth: basic\r
diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-create-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-create-schema.yaml
new file mode 100644 (file)
index 0000000..a50f4a2
--- /dev/null
@@ -0,0 +1,67 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+#     http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+open_cli_schema_version: 1.0\r
+name: vnf-create\r
+description: Create a vnf\r
+\r
+info:\r
+  product: onap-beijing\r
+  service: aai\r
+  author: ONAP CLI Team onap-discuss@lists.onap.org\r
+\r
+parameters:\r
+  - name: vnf-name\r
+    description: vnf-name\r
+    type: string\r
+    short_option: n\r
+    long_option: name\r
+    is_optional: true\r
+  - name: vnf-id\r
+    description: vnf-id\r
+    type: string\r
+    short_option: i\r
+    long_option: vnf-id\r
+    is_optional: false\r
+  - name: vnf-type\r
+    description: vnf-type\r
+    type: string\r
+    short_option: z\r
+    long_option: vnf-type\r
+    is_optional: true\r
+  - name: in-maint\r
+    description: Used to indicate whether or not this object is in maintenance mode (maintenance mode = true)\r
+    type: bool\r
+    short_option: w\r
+    long_option: in-maint\r
+    is_optional: true\r
+  - name: relationship\r
+    description: relationship\r
+    type: json\r
+    short_option: r\r
+    long_option: relationship\r
+    is_optional: true\r
+http:\r
+  service:\r
+    auth: basic\r
+    mode: direct\r
+  request:\r
+    uri: /aai/v11/network/generic-vnfs/generic-vnf/${vnf-id}\r
+    method: PUT\r
+    context:\r
+      remove_empty_node: true\r
+    body: '{"vnf-id": "${vnf-id}","vnf-name": "${vnf-name}" ,"vnf-type": "${vnf-type}","in-maint": "${in-maint}","relationship-list": ["${relationship}"]}'\r
+  success_codes:\r
+    - 200\r
+    - 201\r
diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-delete-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-delete-schema.yaml
new file mode 100644 (file)
index 0000000..1a1e3fe
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+#     http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+open_cli_schema_version: 1.0\r
+name: vnf-delete\r
+description: Delete vnf from Onap\r
+\r
+info:\r
+  product: onap-beijing\r
+  service: aai\r
+  author: ONAP CLI Team onap-discuss@lists.onap.org\r
+\r
+\r
+parameters:\r
+  - name: vnf-id\r
+    description: Onap vnf id\r
+    type: string\r
+    short_option: i\r
+    long_option: vnf-id\r
+    is_optional: false\r
+  - name: resource-version\r
+    description: Onap vnf resource version\r
+    type: uuid\r
+    short_option: b\r
+    long_option: resource-version\r
+    is_optional: false\r
+http:\r
+  service:\r
+    auth: basic\r
+    mode: direct\r
+  request:\r
+    uri: /aai/v11/network/generic-vnfs/generic-vnf/${vnf-id}?resource-version=${resource-version}\r
+    method: DELETE\r
+  success_codes:\r
+    - 204\r
+    - 404\r
diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-list-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-list-schema.yaml
new file mode 100644 (file)
index 0000000..2b5b844
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+#     http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+open_cli_schema_version: 1.0\r
+name: vnf-list\r
+description: Lists the vnfs\r
+\r
+info:\r
+  product: onap-beijing\r
+  service: aai\r
+  author: ONAP CLI Team onap-discuss@lists.onap.org\r
+\r
+results:\r
+  direction: landscape\r
+  attributes:\r
+    - name: vnf-name\r
+      description: Onap vnf name\r
+      scope: short\r
+      type: string\r
+    - name: vnf-id\r
+      description: Onap vnf id\r
+      scope: short\r
+      type: string\r
+    - name: vnf-type\r
+      description: Onap vnf-type\r
+      scope: short\r
+      type: string\r
+    - name: in-maint\r
+      description: Onap in-maint\r
+      scope: short\r
+      type: string\r
+    - name: resource-version\r
+      description: Onap resource-version\r
+      scope: short\r
+      type: string\r
+http:\r
+  service:\r
+    auth: basic\r
+    mode: direct\r
+  request:\r
+    uri: /aai/v11/network/generic-vnfs\r
+    method: GET\r
+  success_codes:\r
+    - 200\r
+  result_map:\r
+    vnf-name: $b{generic-vnf.[*].vnf-name}\r
+    vnf-id: $b{generic-vnf.[*].vnf-id}\r
+    vnf-type: $b{generic-vnf.[*].vnf-type}\r
+    in-maint: $b{generic-vnf.[*].in-maint}\r
+    resource-version: $b{generic-vnf.[*].resource-version}\r