complex-disassociate update 28/94528/1
authorKanagaraj Manickam <mkr1481@gmail.com>
Thu, 29 Aug 2019 11:13:05 +0000 (16:43 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Thu, 29 Aug 2019 11:13:05 +0000 (16:43 +0530)
Change-Id: I84c3080d55970aef6ccc9a5e206e9d92b5691dc6
Issue-ID: CLI-166
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-disassociate-schema-dublin-moco.json [new file with mode: 0644]
products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-disassociate-schema-dublin-sample.yaml [new file with mode: 0644]
products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-disassociate-schema-dublin.yaml [new file with mode: 0644]

diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-disassociate-schema-dublin-moco.json b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-disassociate-schema-dublin-moco.json
new file mode 100644 (file)
index 0000000..5f102ff
--- /dev/null
@@ -0,0 +1,25 @@
+[ {
+  "request" : {
+    "method" : "delete",
+    "uri" : "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/OCOMP/RegionOVP/relationship-list/relationship",
+    "headers" : {
+      "Authorization" : "Basic QUFJOkFBSQ==",
+      "X-FromAppId" : "ONAP CLI",
+      "Accept" : "application/json",
+      "X-TransactionId" : "req-26265a69-7c6c-4315-bddb-0e9548880b15",
+      "Content-Type" : "application/json"
+    },
+    "json" : {
+      "related-to" : "complex",
+      "related-link" : "/aai/v11/cloud-infrastructure/complexes/complex/ocomp-region",
+      "relationship-data" : [ {
+        "relationship-key" : "complex.physical-location-id",
+        "relationship-value" : "ocomp-region"
+      } ]
+    }
+  },
+  "response" : {
+    "status" : 204,
+    "json" : null
+  }
+} ]
\ No newline at end of file
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-disassociate-schema-dublin-sample.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-sample/infra/complex/complex-disassociate-schema-dublin-sample.yaml
new file mode 100644 (file)
index 0000000..3bb8658
--- /dev/null
@@ -0,0 +1,10 @@
+open_cli_sample_version: 1.0
+name: complex-disassociate
+version: onap-dublin
+samples:
+  sample1:
+    name: complex-disassociate
+    input: --format json --complex-name ocomp-region --cloud-owner OCOMP --cloud-region RegionOVP
+    moco: complex-disassociate-schema-dublin-moco.json
+    output: |
+      [{}]
diff --git a/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-disassociate-schema-dublin.yaml b/products/onap-dublin/features/aai/src/main/resources/open-cli-schema/infra/complex/complex-disassociate-schema-dublin.yaml
new file mode 100644 (file)
index 0000000..39480c0
--- /dev/null
@@ -0,0 +1,63 @@
+#  Copyright © Intel Corporation 2019
+#
+# 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: complex-disassociate
+description: Disassociate a cloud region with a cloud complex
+
+info:
+  product: onap-dublin
+  service: aai
+  author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com)
+
+parameters:
+  - name: complex-name
+    description: name of cloud complex
+    type: string
+    short_option: x
+    long_option: complex-name
+    is_optional: false
+  - name: cloud-region
+    description: name of registered cloud-region
+    type: string
+    short_option: y
+    long_option:  cloud-region
+    is_optional: false
+  - name: cloud-owner
+    description: name of cloud-owner
+    type: string
+    short_option: z
+    long_option:  cloud-owner
+    is_optional: false
+
+http:
+  service:
+    auth: basic
+    mode: direct
+  request:
+    uri: /aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/relationship-list/relationship
+    method: DELETE
+    body: '{
+           "related-to": "complex",
+           "related-link": "/aai/v11/cloud-infrastructure/complexes/complex/${complex-name}",
+           "relationship-data": [
+           {
+                "relationship-key": "complex.physical-location-id",
+                "relationship-value": "${complex-name}"
+                }]
+           }'
+  success_codes:
+    - 200
+    - 204
+    - 404