aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/aai/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/aai/src')
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-create-schema-1.1.yaml33
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml36
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-create-schema-1.1.yaml23
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-delete-schema-1.1.yaml39
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-list-schema-1.1.yaml2
-rw-r--r--plugins/aai/src/main/resources/onap-cli-schema/tenant/tenant-delete-schema-1.1.yaml43
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-create-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-delete-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml16
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-create-sample-1.1.yaml2
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-delete-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-list-sample-1.1.yaml13
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-create-sample-1.1.yaml2
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-delete-sample-1.1.yaml8
-rw-r--r--plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-list-sample-1.1.yaml7
15 files changed, 211 insertions, 37 deletions
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-create-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-create-schema-1.1.yaml
new file mode 100644
index 00000000..dad8d68c
--- /dev/null
+++ b/plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-create-schema-1.1.yaml
@@ -0,0 +1,33 @@
+onap_cmd_schema_version: 1.0
+name: cloud-create
+description: Create a cloud region in Onap
+version: onap-1.1
+service:
+ name: aai
+ version: v11
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: cloud-name
+ description: Onap cloud name
+ type: string
+ short_option: x
+ long_option: cloud-name
+ is_optional: false
+ - name: region-name
+ description: Onap region name
+ type: string
+ short_option: y
+ long_option: region-name
+ is_optional: false
+
+http:
+ request:
+ uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/${cloud-name}/${region-name}
+ method: PUT
+ body: '{"sriov-automation": false, "cloud-region-id": "${region-name}", "cloud-owner": "${cloud-name}", "new-attribute-for-demo": "blah", "number-attribute-for-demo": 1 }'
+ success_codes:
+ - 201
+ sample_response:
+ body: ''
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml
new file mode 100644
index 00000000..85a8f76a
--- /dev/null
+++ b/plugins/aai/src/main/resources/onap-cli-schema/cloud-region/cloud-delete-schema-1.1.yaml
@@ -0,0 +1,36 @@
+onap_cmd_schema_version: 1.0
+name: cloud-delete
+description: Delete a cloud region from Onap
+version: onap-1.1
+service:
+ name: aai
+ version: v11
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: cloud-name
+ description: Onap cloud name
+ type: string
+ short_option: x
+ long_option: cloud-name
+ is_optional: false
+ - name: region-name
+ description: Onap cloud region name
+ type: string
+ short_option: y
+ long_option: region-name
+ is_optional: false
+ - name: resource-version
+ description: Onap cloud region version
+ type: uuid
+ short_option: z
+ long_option: resource-version
+ is_optional: true
+http:
+ request:
+ uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/${cloud-name}/${region-name}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-create-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-create-schema-1.1.yaml
index 19d9a8a7..68bb9311 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-create-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-create-schema-1.1.yaml
@@ -15,17 +15,11 @@ parameters:
short_option: x
long_option: customer-name
is_optional: false
- - name: subscriber-name
- description: Onap subscriber name
- type: string
- short_option: y
- long_option: subscriber-name
- is_optional: false
- - name: cloud-type
- description: Onap cloud type (openstack, rackspace)
+ - name: cloud-name
+ description: Onap cloud name
type: string
short_option: z
- long_option: cloud-type
+ long_option: cloud-name
is_optional: false
- name: cloud-region
description: Onap cloud region
@@ -45,17 +39,12 @@ parameters:
short_option: e
long_option: service-type
is_optional: false
- - name: resource-version
- description: Onap subscription resource version. It is mandatory for existing customer to create a new subscription
- type: string
- short_option: g
- long_option: resource-version
- is_optional: true
+
http:
request:
- uri: /aai/v11/business/customers/customer/${customer-name}
+ uri: /aai/v11/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}
method: PUT
- body: '{"global-customer-id": "${customer-name}", "subscriber-name": "${subscriber-name}", "subscriber-type": "INFRA", "resource-version":"${resource-version}", "service-subscriptions":{"service-subscription":[{"relationship-list":{"relationship":[{"related-to":"tenant","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"${cloud-type}"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"${cloud-region}"},{"relationship-key":"tenant.tenant-id","relationship-value":"${cloud-tenant-id}"}]}]},"service-type":"${service-type}"}]}}}'
+ body: '{"service-subscription":[{"relationship-list":{"relationship":[{"related-to":"tenant","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"${cloud-name}"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"${cloud-region}"},{"relationship-key":"tenant.tenant-id","relationship-value":"${cloud-tenant-id}"}]}]},"service-type":"${service-type}"}]}'
success_codes:
- 200
- 201
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-delete-schema-1.1.yaml
new file mode 100644
index 00000000..069a27e8
--- /dev/null
+++ b/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-delete-schema-1.1.yaml
@@ -0,0 +1,39 @@
+onap_cmd_schema_version: 1.0
+name: subscription-delete
+description: Delete the subscription for a given customer in Onap
+version: onap-1.1
+service:
+ name: aai
+ version: v11
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+ - name: service-type
+ description: Onap subscribtion id
+ type: string
+ short_option: y
+ long_option: service-type
+ is_optional: false
+ - name: resource-version
+ description: Onap subscription resource version
+ type: string
+ short_option: g
+ long_option: resource-version
+ is_optional: true
+http:
+ request:
+ uri: /aai/v11//business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
+
+
+
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-list-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-list-schema-1.1.yaml
index 9a747887..0908fc9a 100644
--- a/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-list-schema-1.1.yaml
+++ b/plugins/aai/src/main/resources/onap-cli-schema/subscription/subscription-list-schema-1.1.yaml
@@ -29,7 +29,7 @@ results:
type: string
http:
request:
- uri: /aai/v11//business/customers/customer/${customer-name}/service-subscriptions
+ uri: /aai/v11/business/customers/customer/${customer-name}/service-subscriptions
method: GET
success_codes:
- 200
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/tenant/tenant-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/tenant/tenant-delete-schema-1.1.yaml
new file mode 100644
index 00000000..70778254
--- /dev/null
+++ b/plugins/aai/src/main/resources/onap-cli-schema/tenant/tenant-delete-schema-1.1.yaml
@@ -0,0 +1,43 @@
+onap_cmd_schema_version: 1.0
+name: tenant-delete
+description: Delete tenant under given cloud region in Onap
+version: onap-1.1
+service:
+ name: aai
+ version: v11
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: cloud
+ description: Onap cloud
+ type: string
+ short_option: x
+ long_option: cloud
+ is_optional: false
+ - name: region
+ description: Onap cloud region
+ type: string
+ short_option: y
+ long_option: region
+ is_optional: false
+ - name: tenant-id
+ description: Onap cloud tenant id
+ type: string
+ short_option: z
+ long_option: tenant-id
+ is_optional: false
+ - name: resource-version
+ description: Onap cloud tenant version
+ type: uuid
+ short_option: r
+ long_option: resource-version
+ is_optional: true
+
+http:
+ request:
+ uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/${cloud}/${region}/tenants/tenant/${tenant-id}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-create-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-create-sample-1.1.yaml
new file mode 100644
index 00000000..6a5c55c0
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-create-sample-1.1.yaml
@@ -0,0 +1,8 @@
+onap_cli_sample_version: 1.0
+
+name: cloud-create
+version: onap-1.1
+samples:
+ sample1:
+ name: Create a cloud region in onap
+ input: -h https://locahost:8443 -u AAI -p AAI -x abc-xyz -y ABCXYZ25
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-delete-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-delete-sample-1.1.yaml
new file mode 100644
index 00000000..c84b8eca
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-delete-sample-1.1.yaml
@@ -0,0 +1,8 @@
+onap_cli_sample_version: 1.0
+
+name: cloud-delete
+version: onap-1.1
+samples:
+ sample1:
+ name: Delete the cloud region in onap
+ input: -h https://locahost:8443 -u AAI -p AAI -x abc-xyz -y ABCXYZ25 -z 1504257554519 \ No newline at end of file
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml
index de1555d7..ada90903 100644
--- a/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml
+++ b/plugins/aai/src/test/resources/onap-cli-sample/cloud-region/cloud-list-sample-1.1.yaml
@@ -7,10 +7,12 @@ samples:
name: List the configured clouds in onap
input: -h https://locahost:8443 -u AAI -p AAI
output: |
- +--------------------------------+------------------------------------+
- |cloud |region |
- +--------------------------------+------------------------------------+
- |example-cloud-owner-val-44086 |example-cloud-region-id-val-67393 |
- +--------------------------------+------------------------------------+
- |att-aic |AAIAIC25 |
- +--------------------------------+------------------------------------+ \ No newline at end of file
+ +--------------------------------+------------------------------------+------------------+
+ |cloud |region |resource-version |
+ +--------------------------------+------------------------------------+------------------+
+ |example-cloud-owner-val-44086 |example-cloud-region-id-val-67393 |1503503677953 |
+ +--------------------------------+------------------------------------+------------------+
+ |att-aic |AAIAIC25 |1503380675 |
+ +--------------------------------+------------------------------------+------------------+
+ |abc-xyz |ABCXYZ25 |1504257554519 |
+ +--------------------------------+------------------------------------+------------------+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-create-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-create-sample-1.1.yaml
index c2777458..b33cf597 100644
--- a/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-create-sample-1.1.yaml
+++ b/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-create-sample-1.1.yaml
@@ -5,4 +5,4 @@ version: onap-1.1
samples:
sample1:
name: Create a subscription
- input: -h https://locahost:8443 -u AAI -p AAI -x customer-2 -y subscriber-2 -z att-aic -r AAIAIC25 -c 26ab7af6-96cc-4c4e-814a-e533af4ef9f6 -e vTest
+ input: -h https://locahost:8443 -u AAI -p AAI -x customer-4 -y subscriber-4 -z abc-xyz -r ABCXYZ25 -c 8bcf4466-b092-473f-889b-7f40efb5a323 -e vTest
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-delete-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-delete-sample-1.1.yaml
new file mode 100644
index 00000000..3a040d7e
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-delete-sample-1.1.yaml
@@ -0,0 +1,8 @@
+onap_cli_sample_version: 1.0
+
+name: subscription-delete
+version: onap-1.1
+samples:
+ sample1:
+ name: Delete the subscription
+ input: -h https://locahost:8443 -u AAI -p AAI -x customer-4 -y vTest -g 1504258356743
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-list-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-list-sample-1.1.yaml
index 5943ab15..c4c6f206 100644
--- a/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-list-sample-1.1.yaml
+++ b/plugins/aai/src/test/resources/onap-cli-sample/subscription/subscription-list-sample-1.1.yaml
@@ -5,11 +5,12 @@ version: onap-1.1
samples:
sample1:
name: List the configured subscription in onap for a given customer
- input: -h https://locahost:8443 -u AAI -p AAI -x customer-2
+ input: -h https://locahost:8443 -u AAI -p AAI -x customer-4
output: |
- +--------------+
- |service-type |
- +--------------+
- |vTest |
- +--------------+
+ +--------------+------------------+
+ |service-type |resource-version |
+ +--------------+------------------+
+ |vTest |1504258356743 |
+ +--------------+------------------+
+
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-create-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-create-sample-1.1.yaml
index 958e9040..8a2da490 100644
--- a/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-create-sample-1.1.yaml
+++ b/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-create-sample-1.1.yaml
@@ -5,4 +5,4 @@ version: onap-1.1
samples:
sample1:
name: Create a tenant under given cloud region
- input: -h https://locahost:8443 -u AAI -p AAI -x att-aic -y AAIAIC25 -z 8bcf4466-b092-473f-889b-7f40efb5a322 -r tenant-2
+ input: -h https://locahost:8443 -u AAI -p AAI -x abc-xyz -y ABCXYZ25 -z 8bcf4466-b092-473f-889b-7f40efb5a323 -r tenant-3
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-delete-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-delete-sample-1.1.yaml
new file mode 100644
index 00000000..44026ec3
--- /dev/null
+++ b/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-delete-sample-1.1.yaml
@@ -0,0 +1,8 @@
+onap_cli_sample_version: 1.0
+
+name: tenant-delete
+version: onap-1.1
+samples:
+ sample1:
+ name: Delete the tenant under given cloud region
+ input: -h https://locahost:8443 -u AAI -p AAI -x abc-xyz -y ABCXYZ25 -z 8bcf4466-b092-473f-889b-7f40efb5a323 -r 1504258015611
diff --git a/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-list-sample-1.1.yaml b/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-list-sample-1.1.yaml
index d609a08b..4348f6eb 100644
--- a/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-list-sample-1.1.yaml
+++ b/plugins/aai/src/test/resources/onap-cli-sample/tenant/tenant-list-sample-1.1.yaml
@@ -5,12 +5,11 @@ version: onap-1.1
samples:
sample1:
name: List the tenant under given cloud region in onap
- input: -h https://locahost:8443 -u AAI -p AAI -x att-aic -y AAIAIC25
+ input: -h https://locahost:8443 -u AAI -p AAI -x abc-xyz -y ABCXYZ25
output: |
+--------------------------------------+--------------+------------------+
|tenant-id |tenant-name |resource-version |
+--------------------------------------+--------------+------------------+
- |26ab7af6-96cc-4c4e-814a-e533af4ef9f6 |test |1504091074807 |
- +--------------------------------------+--------------+------------------+
- |8bcf4466-b092-473f-889b-7f40efb5a322 |tenant-2 |1504093061465 |
+ |8bcf4466-b092-473f-889b-7f40efb5a323 |tenant-3 |1504258015611 |
+--------------------------------------+--------------+------------------+
+