aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/aai/src/test/resources/onap-cli-sample/customer
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2017-10-27 04:03:24 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-27 04:03:24 +0000
commitc4128a3daa201a3cfd7af4c578b444ba97d6bbda (patch)
treef0c7600b1386de91bb53dfb807f292360648c988 /plugins/aai/src/test/resources/onap-cli-sample/customer
parent5090b19cde7127ff532d422a7b18e16e2d374da2 (diff)
parentac5043681e662aa837c9be7d1d794861dd7aeb87 (diff)
Merge changes I4df12801,I8d67cae3,I7296259a,I19938237
* changes: Add sample for customer-delete Add sample for customer-show Add sample for customer-list Add sample for customer-create
Diffstat (limited to 'plugins/aai/src/test/resources/onap-cli-sample/customer')
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-moco.json22
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-sample.yaml10
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-sample-1.1.yaml9
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-moco.json18
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-sample.yaml10
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-sample-1.1.yaml18
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-moco.json35
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-sample.yaml18
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-sample-1.1.yaml23
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-moco.json23
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-sample.yaml14
12 files changed, 150 insertions, 58 deletions
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-sample-1.1.yaml
deleted file mode 100644
index d5332115..00000000
--- a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-sample-1.1.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: customer-create
-version: onap-1.1
-samples:
- sample1:
- name: Create a customer
- input: -h https://locahost:8443 -u AAI -p AAI -x customer-1 -y subscriber-1
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-moco.json b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-moco.json
new file mode 100644
index 00000000..18bb05d7
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-moco.json
@@ -0,0 +1,22 @@
+[ {
+ "request" : {
+ "method" : "put",
+ "uri" : "/aai/v11/business/customers/customer/test",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-9ad55bff-efbb-4306-bc8a-b76687e8e065",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "global-customer-id" : "test",
+ "subscriber-name" : "test",
+ "subscriber-type" : "INFRA"
+ }
+ },
+ "response" : {
+ "status" : 201,
+ "json" : null
+ }
+} ] \ No newline at end of file
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-sample.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-sample.yaml
new file mode 100644
index 00000000..db4a5135
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-create-schema-1.1-sample.yaml
@@ -0,0 +1,10 @@
+onap_cli_sample_version: 1.0
+name: customer-create
+version: onap-1.1
+samples:
+ sample1:
+ name: customer-create
+ input: --customer-name test --subscriber-name test
+ moco: customer-create-schema-1.1-moco.json
+ ouput: |
+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-sample-1.1.yaml
deleted file mode 100644
index 9f80da02..00000000
--- a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-sample-1.1.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: customer-delete
-version: onap-1.1
-samples:
- sample1:
- name: Delete the customer
- input: -h https://locahost:8443 -u AAI -p AAI -x customer-1 -y 1504085129922
-
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-moco.json b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-moco.json
new file mode 100644
index 00000000..26e8a918
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-moco.json
@@ -0,0 +1,18 @@
+[ {
+ "request" : {
+ "method" : "delete",
+ "uri" : "/aai/v11/business/customers/customer/test",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-5f5bb7d0-5d03-42a3-a24f-fd8d125a7a8e",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 204,
+ "json" : null
+ }
+} ] \ No newline at end of file
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-sample.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-sample.yaml
new file mode 100644
index 00000000..e209fe13
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-delete-schema-1.1-sample.yaml
@@ -0,0 +1,10 @@
+onap_cli_sample_version: 1.0
+name: customer-delete
+version: onap-1.1
+samples:
+ sample1:
+ name: customer-delete
+ input: --customer-name test --resource-version 1509029022293
+ moco: customer-delete-schema-1.1-moco.json
+ ouput: |
+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-sample-1.1.yaml
deleted file mode 100644
index feb4d7ce..00000000
--- a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-sample-1.1.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: customer-list
-version: onap-1.1
-samples:
- sample1:
- name: List the configured customers in onap
- input: -h https://locahost:8443 -u AAI -p AAI
- output: |
- +--------------------------------------+------------------+
- |name |resource-version |
- +--------------------------------------+------------------+
- |example-global-customer-id-val-8741 |1504017436899 |
- +--------------------------------------+------------------+
- |example-global-customer-id-val-87416 |1504017249493 |
- +--------------------------------------+------------------+
- |customer-1 |1504085129922 |
- +--------------------------------------+------------------+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-moco.json b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-moco.json
new file mode 100644
index 00000000..f7737271
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-moco.json
@@ -0,0 +1,35 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/aai/v11/business/customers",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-f56d4034-1ee8-469c-848a-8b9cd1afa19b",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "customer" : [ {
+ "global-customer-id" : "test",
+ "subscriber-name" : "test",
+ "subscriber-type" : "INFRA",
+ "resource-version" : "1509029022293"
+ }, {
+ "global-customer-id" : "kanag",
+ "subscriber-name" : "kanag",
+ "subscriber-type" : "INFRA",
+ "resource-version" : "1509029007060"
+ }, {
+ "global-customer-id" : "Demonstration",
+ "subscriber-name" : "Demonstration",
+ "subscriber-type" : "INFRA",
+ "resource-version" : "1508827908763"
+ } ]
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-sample.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-sample.yaml
new file mode 100644
index 00000000..05c7a53e
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-list-schema-1.1-sample.yaml
@@ -0,0 +1,18 @@
+onap_cli_sample_version: 1.0
+name: customer-list
+version: onap-1.1
+samples:
+ sample1:
+ name: customer-list
+ input:
+ moco: customer-list-schema-1.1-moco.json
+ ouput: |
+ +----------------+------------------+
+ |name |resource-version |
+ +----------------+------------------+
+ |test |1509029022293 |
+ +----------------+------------------+
+ |kanag |1509029007060 |
+ +----------------+------------------+
+ |Demonstration |1508827908763 |
+ +----------------+------------------+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-sample-1.1.yaml
deleted file mode 100644
index 8c2e8dbd..00000000
--- a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-sample-1.1.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: customer-show
-version: onap-1.1
-samples:
- sample1:
- name: Show complete details of a customer
- input: -h https://locahost:8443 -u AAI -p AAI -x example-global-customer-id-val-8741 --long
- output: |
- +--------------------------------------+----------------------------------+------------------+------------------------------------+
- |name |subscriber-name |resource-version |subscriber-type |
- +--------------------------------------+----------------------------------+------------------+------------------------------------+
- |example-global-customer-id-val-8741 |example-subscriber-name-val-2447 |1504017436899 |example-subscriber-type-val-24368 |
- +--------------------------------------+----------------------------------+------------------+------------------------------------+
- sample2:
- name: Show basic details of a customer
- input: -h https://locahost:8443 -u AAI -p AAI -x example-global-customer-id-val-8741
- output: |
- +--------------------------------------+----------------------------------+
- |name |subscriber-name |
- +--------------------------------------+----------------------------------+
- |example-global-customer-id-val-8741 |example-subscriber-name-val-2447 |
- +--------------------------------------+----------------------------------+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-moco.json b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-moco.json
new file mode 100644
index 00000000..242db8c1
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-moco.json
@@ -0,0 +1,23 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/aai/v11/business/customers/customer/kanag",
+ "headers" : {
+ "Authorization" : "Basic QUFJOkFBSQ==",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-95e5eac5-6839-49f3-8f9e-786789e69c67",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "global-customer-id" : "kanag",
+ "subscriber-name" : "kanag",
+ "subscriber-type" : "INFRA",
+ "resource-version" : "1509029007060"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-sample.yaml b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-sample.yaml
new file mode 100644
index 00000000..1e1ba425
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/customer/customer-show-schema-1.1-sample.yaml
@@ -0,0 +1,14 @@
+onap_cli_sample_version: 1.0
+name: customer-show
+version: onap-1.1
+samples:
+ sample1:
+ name: customer-show
+ input: --customer-name kanag --long
+ moco: customer-show-schema-1.1-moco.json
+ ouput: |
+ +--------+------------------+------------------+------------------+
+ |name |subscriber-name |resource-version |subscriber-type |
+ +--------+------------------+------------------+------------------+
+ |kanag |kanag |1509029007060 |INFRA |
+ +--------+------------------+------------------+------------------+