aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sdc
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sdc')
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/vsp/vsp-validate-schema-1.1.yaml48
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-moco.json46
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml44
3 files changed, 138 insertions, 0 deletions
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/vsp/vsp-validate-schema-1.1.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/vsp/vsp-validate-schema-1.1.yaml
new file mode 100644
index 00000000..243ddbb4
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/vsp/vsp-validate-schema-1.1.yaml
@@ -0,0 +1,48 @@
+open_cli_schema_version: 1.0
+name: vsp-validate
+description: Validated the uploaded Vendor Software Product
+version: onap-1.1
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: vsp-id
+ description: Onap VSP ID
+ type: string
+ short_option: x
+ long_option: vsp-id
+ is_optional: false
+ - name: vsp-version
+ description: VSP version
+ type: string
+ short_option: y
+ long_option: vsp-version
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: status
+ description: Validation status
+ scope: short
+ type: string
+ - name: errors
+ description: Validation messages
+ scope: short
+ type: json
+
+http:
+ request:
+ uri: /onboarding-api/v1.0/vendor-software-products/${vsp-id}/versions/${vsp-version}/orchestration-template-candidate/process
+ method: PUT
+ body: '{}'
+ success_codes:
+ - 201
+ - 200
+ result_map:
+ status: $b{$.status}
+ errors: $b{$.errors}
+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-moco.json
new file mode 100644
index 00000000..6dc8041d
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-moco.json
@@ -0,0 +1,46 @@
+[ {
+ "request" : {
+ "method" : "put",
+ "uri" : "/onboarding-api/v1.0/vendor-software-products/5ca119e2326045d1857ae3f04a816434/versions/0.1/orchestration-template-candidate/process",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-79f5d3d8-36b6-4b66-ad35-4666556ef022",
+ "Content-Type" : "application/json"
+ },
+ "json" : { }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "fileNames" : [ "base_vfw.yaml", "base_vfw.env" ],
+ "errors" : {
+ "base_vfw.yaml" : [ {
+ "level" : "WARNING",
+ "message" : "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [onap_private_subnet_id], Resource ID [vfw_private_2_port]. As a result, VF/VFC Profile may miss this information"
+ }, {
+ "level" : "WARNING",
+ "message" : "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [onap_private_subnet_id], Resource ID [vpg_private_1_port]. As a result, VF/VFC Profile may miss this information"
+ }, {
+ "level" : "WARNING",
+ "message" : "WARNING: Port 'Fixed_IPS' Parameter Name not aligned with Guidelines, Parameter Name [onap_private_subnet_id], Resource ID [vsn_private_1_port]. As a result, VF/VFC Profile may miss this information"
+ }, {
+ "level" : "WARNING",
+ "message" : "WARNING: A resource is connected twice to the same network role, Network Role [vpg_0], Resource ID [onap_private]"
+ }, {
+ "level" : "WARNING",
+ "message" : "WARNING: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [vpg_0]"
+ }, {
+ "level" : "WARNING",
+ "message" : "WARNING: A resource is connected twice to the same network role, Network Role [vsn_0], Resource ID [onap_private]"
+ }, {
+ "level" : "WARNING",
+ "message" : "WARNING: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [vsn_0]"
+ } ]
+ },
+ "status" : "Success"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml
new file mode 100644
index 00000000..119f5a80
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/vsp/vsp-validate-schema-1.1-sample.yaml
@@ -0,0 +1,44 @@
+onap_cli_sample_version: 1.0
+name: vsp-validate
+version: onap-1.1
+samples:
+ sample1:
+ name: vsp-validate
+ input: --vsp-id 5ca119e2326045d1857ae3f04a816434 --vsp-version 0.1
+ moco: vsp-validate-schema-1.1-moco.json
+ ouput:|
+ +----------+----------------------------------------------------+
+ |property |value |
+ +----------+----------------------------------------------------+
+ |status |Success |
+ +----------+----------------------------------------------------+
+ |errors |{base_vfw.yaml=[{"level":"WARNING","message":"WARN |
+ | |ING: Port 'Fixed_IPS' Parameter Name not aligned |
+ | |with Guidelines, Parameter Name |
+ | |[onap_private_subnet_id], Resource ID |
+ | |[vfw_private_2_port]. As a result, VF\/VFC |
+ | |Profile may miss this information"},{"level":"WARN |
+ | |ING","message":"WARNING: Port 'Fixed_IPS' |
+ | |Parameter Name not aligned with Guidelines, |
+ | |Parameter Name [onap_private_subnet_id], Resource |
+ | |ID [vpg_private_1_port]. As a result, VF\/VFC |
+ | |Profile may miss this information"},{"level":"WARN |
+ | |ING","message":"WARNING: Port 'Fixed_IPS' |
+ | |Parameter Name not aligned with Guidelines, |
+ | |Parameter Name [onap_private_subnet_id], Resource |
+ | |ID [vsn_private_1_port]. As a result, VF\/VFC |
+ | |Profile may miss this information"},{"level":"WARN |
+ | |ING","message":"WARNING: A resource is connected |
+ | |twice to the same network role, Network Role |
+ | |[vpg_0], Resource ID [onap_private]"},{"level":"WA |
+ | |RNING","message":"WARNING: Nova Server naming |
+ | |convention in image, flavor and name properties |
+ | |is not consistent, Resource ID |
+ | |[vpg_0]"},{"level":"WARNING","message":"WARNING: |
+ | |A resource is connected twice to the same network |
+ | |role, Network Role [vsn_0], Resource ID [onap_priv |
+ | |ate]"},{"level":"WARNING","message":"WARNING: |
+ | |Nova Server naming convention in image, flavor |
+ | |and name properties is not consistent, Resource |
+ | |ID [vsn_0]"}]} |
+ +----------+----------------------------------------------------+