aboutsummaryrefslogtreecommitdiffstats
path: root/products/onap-dublin/features/vfc/src
diff options
context:
space:
mode:
authorzhaoliping123 <zhaoliping@chinamobile.com>2020-04-20 19:58:57 +0800
committerLiping Zhao <zhaoliping@chinamobile.com>2020-04-21 03:19:44 +0000
commit5b181bb499d9dbfccd1e81f643b48d9cb7218d2c (patch)
treef72cb359699ec0aeba314e772bfe6efa4ddf30b9 /products/onap-dublin/features/vfc/src
parent252b3e313b435e5333b1001f2a4decf904d2c892 (diff)
update vnf-tosca-lcm.py
Issue-ID: CLI-263 Change-Id: I16533c3da0ea12c7a594174393d56a516f94f9cc Signed-off-by: zhaoliping123 <zhaoliping@chinamobile.com>
Diffstat (limited to 'products/onap-dublin/features/vfc/src')
-rw-r--r--products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-moco.json75
-rw-r--r--products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-sample.yaml19
-rw-r--r--products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-jobid.yaml29
3 files changed, 114 insertions, 9 deletions
diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-moco.json b/products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-moco.json
new file mode 100644
index 00000000..772367a6
--- /dev/null
+++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-moco.json
@@ -0,0 +1,75 @@
+
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/api/nslcm/v1/jobs/NS-NS_INST-330366c3-3a42-4739-9d46-6f468cf7e6ec-a85c262c-8099-11ea-80f5-0227d810af52",
+ "headers" : {
+ "Accept" : "application/json",
+ "Content-Type" : "application/json"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "jobId": "NS-NS_INST-330366c3-3a42-4739-9d46-6f468cf7e6ec-a85c262c-8099-11ea-80f5-0227d810af52",
+ "responseDescriptor": {
+ "status": "finished",
+ "progress": 100,
+ "statusDescription": "Create NS successfully.",
+ "errorCode": "0",
+ "responseId": 8,
+ "responseHistoryList": [
+ {
+ "status": "processing",
+ "progress": 90,
+ "statusDescription": "Start to post deal",
+ "errorCode": "0",
+ "responseId": 7
+ },
+ {
+ "status": "processing",
+ "progress": 70,
+ "statusDescription": "Start to create SFC",
+ "errorCode": "0",
+ "responseId": 6
+ },
+ {
+ "status": "processing",
+ "progress": 50,
+ "statusDescription": "Start to create PNF",
+ "errorCode": "0",
+ "responseId": 5
+ },
+ {
+ "status": "processing",
+ "progress": 30,
+ "statusDescription": "Start to create VNF",
+ "errorCode": "0",
+ "responseId": 4
+ },
+ {
+ "status": "processing",
+ "progress": 10,
+ "statusDescription": "Start to create VL",
+ "errorCode": "0",
+ "responseId": 3
+ },
+ {
+ "status": "processing",
+ "progress": 10,
+ "statusDescription": "NS inst(330366c3-3a42-4739-9d46-6f468cf7e6ec) buildin workflow started.",
+ "errorCode": "0",
+ "responseId": 2
+ },
+ {
+ "status": "processing",
+ "progress": 5,
+ "statusDescription": "Start query nsd(be194bc4-eb04-467c-a4ee-67e43ecbb7ad)",
+ "errorCode": "0",
+ "responseId": 1
+ }
+ ]
+ }
+ }
+ }
+} ]
diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-sample.yaml b/products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-sample.yaml
new file mode 100644
index 00000000..895ca2d6
--- /dev/null
+++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-sample/nslcm/vfc-nslcm-get-jobid-schema-sample.yaml
@@ -0,0 +1,19 @@
+open_cli_sample_version: 1.0
+name: vfc-nslcm-get-jobid
+version: onap-dublin
+samples:
+ sample1:
+ name: vfc-nslcm-get-jobid
+ input: -m http://10.12.5.155:30280 -i NS-NS_INST-330366c3-3a42-4739-9d46-6f468cf7e6ec-a85c262c-8099-11ea-80f5-0227d810af52
+ moco: vfc-nslcm-get-jobid-schema-moco.json
+ output: |
+ +--------------+----------------------------------------------------+
+ |property |value |
+ +--------------+----------------------------------------------------+
+ |ns-job-id |NS-NS_INST-330366c3-3a42-4739-9d46-6f468cf7e6ec-a8 |
+ | |5c262c-8099-11ea-80f5-0227d810af52 |
+ +--------------+----------------------------------------------------+
+ |job-status |finished |
+ +--------------+----------------------------------------------------+
+ |job-progress |100 |
+ +--------------+----------------------------------------------------+
diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-jobid.yaml b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-jobid.yaml
index a35c508d..d15cd5cb 100644
--- a/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-jobid.yaml
+++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-jobid.yaml
@@ -18,19 +18,29 @@ info:
service: vfc
author: ONAP VFC Team (yangyanyj@chinamobile.com)
+parameters:
+ - name: ns-job-id
+ description: ns job id
+ type: string
+ short_option: i
+ long_option: ns-job-id
+ is_optional: false
+
results:
direction: portrait
attributes:
- name: ns-job-id
- description: ns-job-id
+ description: ns job id
scope: short
type: string
- - name: ns-name
- description: ns-name
+
+ - name: job-status
+ description: job status
scope: short
type: string
- - name: description
- description: description
+
+ - name: job-progress
+ description: job progress
scope: short
type: string
@@ -39,7 +49,7 @@ http:
auth: none
mode: direct
request:
- uri: /api/nsd/v1/ns_descriptors
+ uri: /api/nslcm/v1/jobs/${ns-job-id}
method: GET
context:
remove_empty_node: true
@@ -49,7 +59,8 @@ http:
Accept: application/json
success_codes:
- 200
+
result_map:
- ns-job-id: $b{$.ns-job-id}
- ns-name: $b{$.nsName}
- description: $b{$.description}
+ ns-job-id: $b{$.jobId}
+ job-status: $b{$.responseDescriptor.status}
+ job-progress: $b{$.responseDescriptor.progress} \ No newline at end of file