--- /dev/null
+# 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
--- /dev/null
+# 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