cmd : create VNF/PNF with template 35/37035/1
authorXingXiaocheng <xingxiaocheng@huawei.com>
Tue, 20 Mar 2018 10:01:17 +0000 (10:01 +0000)
committerXingXiaocheng <xingxiaocheng@huawei.com>
Tue, 20 Mar 2018 10:01:39 +0000 (10:01 +0000)
Change-Id: I772f5dbe136d067a9151850812f4149e37c6f512
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-with-template-schema.yaml [new file with mode: 0644]
products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-create-with-template-schema.yaml [new file with mode: 0644]

diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/pnf/pnf-create-with-template-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/pnf/pnf-create-with-template-schema.yaml
new file mode 100644 (file)
index 0000000..eced714
--- /dev/null
@@ -0,0 +1,49 @@
+# 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: pnf-create-with-template\r
+description: Create a pnf with a template. this is flexible approch to create PNF , all the parameters are in template json file\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: pnf-name\r
+    description: pnf-name\r
+    type: string\r
+    short_option: n\r
+    long_option: name\r
+    is_optional: false\r
+  - name: template\r
+    description: json template\r
+    type: json\r
+    short_option: r\r
+    long_option: template\r
+    is_optional: true\r
+http:\r
+  service:\r
+    auth: basic\r
+    mode: direct\r
+  request:\r
+    uri: /aai/v11/network/pnfs/pnf/${pnf-name}\r
+    method: PUT\r
+    context:\r
+      remove_empty_node: true\r
+    body: '"${template}"'\r
+  success_codes:\r
+    - 200\r
+    - 201\r
diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-create-with-template-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/vnf/vnf-create-with-template-schema.yaml
new file mode 100644 (file)
index 0000000..71911fb
--- /dev/null
@@ -0,0 +1,49 @@
+# 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 pnf with a template. this is flexible approch to create VNF , all the parameters are in template json file\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-id\r
+    description: vnf-id\r
+    type: string\r
+    short_option: i\r
+    long_option: vnf-id\r
+    is_optional: false\r
+  - name: template\r
+    description: template\r
+    type: json\r
+    short_option: r\r
+    long_option: template\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}\r
+    method: PUT\r
+    context:\r
+      remove_empty_node: true\r
+    body: '"${template}"'\r
+  success_codes:\r
+    - 200\r
+    - 201\r