CLI: license-model-create beijing 01/36501/1
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Mon, 19 Mar 2018 10:31:58 +0000 (16:01 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Mon, 19 Mar 2018 10:31:58 +0000 (16:01 +0530)
Change-Id: If8b88bdc4621f5c85d88716f509c381b3f942201
Issue-ID: CLI-100
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vlm/license-model-create-schema.yaml [new file with mode: 0644]
products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml [new file with mode: 0644]

diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vlm/license-model-create-schema.yaml b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/vlm/license-model-create-schema.yaml
new file mode 100644 (file)
index 0000000..19ff025
--- /dev/null
@@ -0,0 +1,29 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+
+name: license-model-create
+version: openecomp
+samples:
+  sample1:
+    name: create license model
+    input: -x htipl -y "sample model" -u cs0008 -p demo123456! -m http://192.168.17.126:8080
+    moco: license-model-create-schema-moco.json
+    output: |
+      +----------+----------------------------------+
+      |property  |value                             |
+      +----------+----------------------------------+
+      |ID        |2366699475c943bdb283fc0b9106579c  |
+      +----------+----------------------------------+
diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml b/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/vlm/license-model-create-schema.yaml
new file mode 100644 (file)
index 0000000..fd595ee
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# 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: license-model-create
+description: Create License Model
+
+info:
+  product: onap-beijing
+  service: sdc
+  author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+  - name: vendor-name
+    description: vendor name
+    type: string
+    short_option: x
+    long_option: vendor-name
+    is_optional: false
+  - name: license-model-description
+    description: Description for License Model
+    type: string
+    short_option: y
+    long_option: license-model-description
+    is_optional: true
+results:
+  direction: portrait
+  attributes:
+    - name: ID
+      description: License Model ID
+      scope: short
+      type: string
+http:
+  service:
+    name: sdc
+    version: v1.0
+    auth: basic
+    mode: direct
+  request:
+    uri: /onboarding-api/v1.0/vendor-license-models
+    method: POST
+    body: '{"vendorName": "${vendor-name}", "description": "${license-model-description}",  "iconRef": "icon"}'
+  success_codes:
+    - 200
+  result_map:
+    ID: $b{$.value}
+  sample_response:
+    body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}'