aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/user_guide_end_to_end_onap_cli_commands.rst6
-rw-r--r--docs/user_guide_pnf_on_boarding.rst4
-rw-r--r--docs/user_guide_verification_program.rst6
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowCommandTest.java51
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowDebugCommandTest.java47
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/product/OnapProductsListCommandTest.java36
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/product/OnapServiceListCommandTest.java37
-rw-r--r--framework/src/test/java/org/onap/cli/fw/store/OnapCommandArtifactStoreTest.java86
-rw-r--r--framework/src/test/java/org/onap/cli/fw/store/OnapCommandExecutionStoreTest.java85
-rw-r--r--framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java67
-rw-r--r--main/src/test/java/open/infc/grpc/client/OpenRemoteCliTest.java53
-rw-r--r--products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py216
-rw-r--r--products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-dublin.yaml4
-rw-r--r--products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-dublin.yaml8
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-create-schema-elalto.yaml47
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-delete-schema-elalto.yaml46
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-list-schema-elalto.yaml47
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-show-schema-elalto.yaml66
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-elalto.yaml52
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-create-schema-elalto.yaml48
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-delete-schema-elalto.yaml46
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-list-schema-elalto.yaml52
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-elalto.yaml100
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-delete-schema-elalto.yaml97
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-elalto.yaml106
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-delete-schema-elalto.yaml52
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml78
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-elalto.yaml93
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-elalto.yaml50
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-elalto.yaml49
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-elalto.yaml78
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-elalto.yaml110
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-elalto.yaml50
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-elalto.yaml60
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-elalto.yaml181
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-delete-schema-elalto.yaml46
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-list-schema-elalto.yaml61
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-delete-schema-elalto.yaml52
-rw-r--r--products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-list-schema-elalto.yaml60
-rw-r--r--products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-cloud-delete-schema.yaml46
-rw-r--r--products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-register-cloud-schema.yaml46
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-moco.json25
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-sample.yaml47
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-moco.json22
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-sample.yaml47
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-moco.json22
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-sample.yaml47
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-moco.json22
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-sample.yaml47
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-moco.json24
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-sample.yaml36
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-moco.json700
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-sample.yaml291
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-moco.json43
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-sample.yaml42
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-moco.json43
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-sample.yaml42
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/create-operational-policy-schema-elalto.yaml75
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/delete-operational-policy-with-version-schema-elalto.yaml74
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-latest-version-schema-elalto.yaml68
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-version-schema-elalto.yaml74
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-healthcheck-schema-elalto.yaml69
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-all-schema-elalto.yaml49
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-elalto.yaml58
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-elalto.yaml63
-rw-r--r--profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java4
66 files changed, 4431 insertions, 128 deletions
diff --git a/docs/user_guide_end_to_end_onap_cli_commands.rst b/docs/user_guide_end_to_end_onap_cli_commands.rst
index 9b595092..69204fdb 100644
--- a/docs/user_guide_end_to_end_onap_cli_commands.rst
+++ b/docs/user_guide_end_to_end_onap_cli_commands.rst
@@ -8,9 +8,9 @@
End-to-End command guide for working with ONAP
==============================================
-This document demonstrate end to end working with ONAP using cli.
+This document demonstrates end to end working with ONAP using cli.
-In current state of ONAP, it is getting initialized by robot scritp (`demo.sh init`),
+Currently, in ONAP, it is getting initialized by robot script (`demo.sh init`),
which requires programming knowledge to modify the scripts as per the requirement.
Cli provides an interface to communicate with different services in ONAP and it can
be used to configure ONAP as per requirement without any programming knowledge.
@@ -154,7 +154,7 @@ Run following command to create VSP.
Add artifact to VSP
-------------------
-This command will associate artifacts to VSP.
+This command associates artifacts to VSP.
::
diff --git a/docs/user_guide_pnf_on_boarding.rst b/docs/user_guide_pnf_on_boarding.rst
index ef5c7e53..765db066 100644
--- a/docs/user_guide_pnf_on_boarding.rst
+++ b/docs/user_guide_pnf_on_boarding.rst
@@ -8,9 +8,9 @@
Step to import VNF/PNF
==============================================
-This document describe how to insert existing PNF/VNF to AAI with CLI project.
+This document describes how to insert existing PNF/VNF to AAI with CLI project.
-The main step will include:
+Main steps:
1. create customer and service instance in AAI. This step could be done by UUI or VID, OR user can insert customer/service instance node by CLI cmd.
2. create PNF/VNF
diff --git a/docs/user_guide_verification_program.rst b/docs/user_guide_verification_program.rst
index 462badb8..05bcb28b 100644
--- a/docs/user_guide_verification_program.rst
+++ b/docs/user_guide_verification_program.rst
@@ -13,9 +13,9 @@ in future it could be extended to other profile) for authoring the testing the C
It provides the model based test environment where author needs to setup following aspects:
-# Write the moco json which capture the HTTP request and response in moco style
+# Write the moco JSON which captures the HTTP request and response in moco style
-# Write the sample YAML which capture the one or more functional test case(s)
+# Write the sample YAML which captures the one or more functional test case(s)
# Place them under open-cli-sample directory under OPEN_CLI_HOME
@@ -23,4 +23,4 @@ Once this setup is done, author can verify the OCS YAML by running the following
oclip <command name> --verify | -V
-It will list out the success/failure of each test cases written in sample YAML.
+It will list out the success/failure of each test case written in sample YAML.
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowCommandTest.java
new file mode 100644
index 00000000..172f7045
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowCommandTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+package org.onap.cli.fw.cmd.execution;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.error.OnapCommandExecutionFailed;
+import org.onap.cli.fw.output.OnapCommandResultAttribute;
+import org.onap.cli.fw.store.OnapCommandExecutionStoreTest;
+
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class OnapCommandExceutionShowCommandTest {
+@BeforeClass
+public static void setUp() throws Exception {
+ OnapCommandExecutionStoreTest executionStoreTest= new OnapCommandExecutionStoreTest();
+ executionStoreTest.setUp();
+ executionStoreTest.listExecutionsTest();
+ executionStoreTest.storeExectutionDebugTest();
+ executionStoreTest.storeExectutionEndTest();
+ executionStoreTest.storeExectutionOutputTest();
+ executionStoreTest.storeExectutionProgressTest();
+ executionStoreTest.storeExectutionStartTest();
+}
+ @Test
+ public void runTest() throws OnapCommandException {
+ OnapCommandExceutionShowCommand cmd=new OnapCommandExceutionShowCommand();
+ cmd.initializeSchema("execution-show.yaml");
+ cmd.getParametersMap().get("execution-id").setValue("requestId");
+ cmd.getParametersMap().get("format").setValue("TEXT");
+ cmd.execute();
+ List<OnapCommandResultAttribute> oclipCommandResultAttributes = cmd.getResult()
+ .getRecords();
+ assertTrue(oclipCommandResultAttributes.size() > 1);
+ }
+} \ No newline at end of file
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowDebugCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowDebugCommandTest.java
new file mode 100644
index 00000000..e31e53d5
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/execution/OnapCommandExceutionShowDebugCommandTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+package org.onap.cli.fw.cmd.execution;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.store.OnapCommandExecutionStoreTest;
+
+import static org.junit.Assert.*;
+
+public class OnapCommandExceutionShowDebugCommandTest {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OnapCommandExecutionStoreTest executionStoreTest= new OnapCommandExecutionStoreTest();
+ executionStoreTest.setUp();
+ executionStoreTest.listExecutionsTest();
+ executionStoreTest.storeExectutionDebugTest();
+ executionStoreTest.storeExectutionEndTest();
+ executionStoreTest.storeExectutionOutputTest();
+ executionStoreTest.storeExectutionProgressTest();
+ executionStoreTest.storeExectutionStartTest();
+ }
+ @Test
+ public void runTest() throws OnapCommandException {
+ OnapCommandExceutionShowDebugCommand cmd=new OnapCommandExceutionShowDebugCommand();
+ cmd.initializeSchema("execution-show-debug.yaml");
+ cmd.getParametersMap().get("execution-id").setValue("requestId");
+ cmd.execute();
+ assertNotNull(cmd.getResult().getOutput());
+
+ }
+
+} \ No newline at end of file
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/product/OnapProductsListCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/product/OnapProductsListCommandTest.java
new file mode 100644
index 00000000..88779bb4
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/product/OnapProductsListCommandTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+package org.onap.cli.fw.cmd.product;
+
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.output.OnapCommandResultAttribute;
+
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class OnapProductsListCommandTest {
+ @Test
+ public void runTest() throws OnapCommandException {
+ OnapProductsListCommand cmd=new OnapProductsListCommand ();
+ cmd.initializeSchema("product-list.yaml");
+ cmd.execute();
+ List<OnapCommandResultAttribute> oclipCommandResultAttributes = cmd.getResult()
+ .getRecords();
+ assertTrue(oclipCommandResultAttributes.size() > 1);
+ }
+}
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/product/OnapServiceListCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/product/OnapServiceListCommandTest.java
new file mode 100644
index 00000000..5ba8a042
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/product/OnapServiceListCommandTest.java
@@ -0,0 +1,37 @@
+/* Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+
+ package org.onap.cli.fw.cmd.product;
+
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.output.OnapCommandResultAttribute;
+
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class OnapServiceListCommandTest {
+ @Test
+ public void runTest() throws OnapCommandException {
+ OnapServiceListCommand cmd=new OnapServiceListCommand();
+ cmd.initializeSchema("service-list.yaml");
+ cmd.getParametersMap().get("product").setValue("open-cli");
+ cmd.execute();
+ List<OnapCommandResultAttribute> oclipCommandResultAttributes = cmd.getResult()
+ .getRecords();
+ assertTrue(oclipCommandResultAttributes.size() > 1);
+ }
+} \ No newline at end of file
diff --git a/framework/src/test/java/org/onap/cli/fw/store/OnapCommandArtifactStoreTest.java b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandArtifactStoreTest.java
new file mode 100644
index 00000000..1a4d982a
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandArtifactStoreTest.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+
+
+package org.onap.cli.fw.store;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandArtifactAlreadyExist;
+import org.onap.cli.fw.error.OnapCommandArtifactContentChecksumNotMatch;
+import org.onap.cli.fw.error.OnapCommandArtifactContentNotExist;
+import org.onap.cli.fw.error.OnapCommandArtifactNotFound;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+public class OnapCommandArtifactStoreTest {
+ OnapCommandArtifactStore onapCommandArtifactStore;
+ OnapCommandArtifactStore.Artifact artifact;
+ @Before
+ public void setUp() throws Exception {
+ onapCommandArtifactStore= OnapCommandArtifactStore.getStore();
+ artifact =new OnapCommandArtifactStore.Artifact();
+ Map<String,String> metadata=new HashMap<>();
+ metadata.put("name","data");
+ artifact.setName("artifact");
+ artifact.setCategoty("category");
+ artifact.setChecksum("checksum");
+ artifact.setPath(System.getProperty("user.dir")+ File.separator+"src/test/resources/sample-cmd-test-help.txt");
+ artifact.setCreateAt("12");
+ artifact.setDescription("description");
+ artifact.setLastUpdatedAt("12");
+ artifact.setMetadata(metadata);
+ artifact.setSize(12L);
+ }
+ @Test
+ public void createAndDeleteArtifactTest() throws OnapCommandArtifactContentChecksumNotMatch, OnapCommandArtifactAlreadyExist, OnapCommandArtifactContentNotExist, OnapCommandArtifactNotFound {
+ assertNotNull(onapCommandArtifactStore.createArtifact(artifact));
+ onapCommandArtifactStore.deleteArtifact("artifact","category");
+ String artifactPath=System.getProperty("user.dir")+File.separator+"data/artifacts";
+ File artifactFile= new File(artifactPath+File.separator+"artifact__category.json");
+ assertFalse(artifactFile.exists());
+
+ }
+ @Test
+ public void updateArtifactTest() throws OnapCommandArtifactNotFound, OnapCommandArtifactAlreadyExist, OnapCommandArtifactContentNotExist, OnapCommandArtifactContentChecksumNotMatch {
+ onapCommandArtifactStore.createArtifact(artifact);
+ OnapCommandArtifactStore.Artifact artifactForUpdate =new OnapCommandArtifactStore.Artifact();
+ Map<String,String> metadata=new HashMap<>();
+ metadata.put("name","data");
+ artifactForUpdate.setName("artifactForUpdate");
+ artifactForUpdate.setCategoty("categoryUpdate");
+ artifactForUpdate.setChecksum("checksum");
+ artifactForUpdate.setPath(System.getProperty("user.dir")+ File.separator+"src/test/resources/sample-cmd-test-help.txt");
+ artifactForUpdate.setCreateAt("12");
+ artifactForUpdate.setDescription("description");
+ artifactForUpdate.setLastUpdatedAt("12");
+ artifactForUpdate.setMetadata(metadata);
+ assertNotNull(onapCommandArtifactStore.updateArtifact("artifact","category",artifactForUpdate));
+ onapCommandArtifactStore.deleteArtifact("artifactForUpdate","categoryUpdate");
+ }
+ @Test(expected = OnapCommandArtifactNotFound.class)
+ public void getArtifactTest() throws OnapCommandArtifactNotFound {
+ onapCommandArtifactStore.getArtifact("abc","abc");
+ }
+ @Test
+ public void listArtifactTest() throws OnapCommandArtifactNotFound {
+ assertNotNull(onapCommandArtifactStore.listArtifact("category","namePattern"));
+ }
+} \ No newline at end of file
diff --git a/framework/src/test/java/org/onap/cli/fw/store/OnapCommandExecutionStoreTest.java b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandExecutionStoreTest.java
new file mode 100644
index 00000000..6b69f0b0
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandExecutionStoreTest.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+
+package org.onap.cli.fw.store;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandExecutionFailed;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+public class OnapCommandExecutionStoreTest {
+ OnapCommandExecutionStore executionStore;
+ @Before
+ public void setUp() throws Exception {
+ executionStore=OnapCommandExecutionStore.getStore();
+ }
+ @Test
+ public void storeExectutionStartTest(){
+ assertNotNull(executionStore.storeExectutionStart("requestId","product","service","cmd","profile","input"));
+ }
+ @Test
+ public void listExecutionsTest() throws OnapCommandExecutionFailed {
+ Map<String,String> search=new HashMap<>();
+ search.put("startTime","12");
+ search.put("endTime","12");
+ search.put("execution-id","abc");
+ search.put("request-id","abc");
+ assertNotNull(executionStore.listExecutions(search));
+ }
+ @Test
+ public void storeExectutionEndTest(){
+ OnapCommandExecutionStore.ExecutionStoreContext store=new OnapCommandExecutionStore.ExecutionStoreContext();
+ store.setExecutionId("abc");
+ store.setRequestId("abc");
+ store.setStorePath("abc");
+ executionStore.storeExectutionEnd(store,"abc","abc","abc",true);
+ assertTrue(new File(System.getProperty("user.dir")+File.separator+"abc").exists());
+ }
+ @Test
+ public void storeExectutionProgressTest(){
+ OnapCommandExecutionStore.ExecutionStoreContext store=new OnapCommandExecutionStore.ExecutionStoreContext();
+ store.setExecutionId("abc");
+ store.setRequestId("abc");
+ store.setStorePath("abc");
+ executionStore.storeExectutionProgress(store,"abc","abc","abc");
+ assertTrue(new File(System.getProperty("user.dir")+File.separator+"abc").exists());
+ }
+ @Test
+ public void storeExectutionDebugTest(){
+ OnapCommandExecutionStore.ExecutionStoreContext store=new OnapCommandExecutionStore.ExecutionStoreContext();
+ store.setExecutionId("abc");
+ store.setRequestId("abc");
+ store.setStorePath("abc");
+ executionStore.storeExectutionDebug(store,"abc");
+ assertTrue(new File(System.getProperty("user.dir")+File.separator+"abc").exists());
+ }
+ @Test
+ public void storeExectutionOutputTest(){
+ OnapCommandExecutionStore.ExecutionStoreContext store=new OnapCommandExecutionStore.ExecutionStoreContext();
+ store.setExecutionId("abc");
+ store.setRequestId("abc");
+ store.setStorePath("abc");
+ executionStore.storeExectutionOutput(store,"abc");
+ assertTrue(new File(System.getProperty("user.dir")+File.separator+"abc").exists());
+ }
+
+} \ No newline at end of file
diff --git a/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java
new file mode 100644
index 00000000..f98f518d
--- /dev/null
+++ b/framework/src/test/java/org/onap/cli/fw/store/OnapCommandProfileStoreTest.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+package org.onap.cli.fw.store;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.cli.fw.error.OnapCommandException;
+import org.onap.cli.fw.error.OnapCommandPersistProfileFailed;
+import org.onap.cli.fw.input.cache.OnapCommandParamEntity;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.*;
+
+public class OnapCommandProfileStoreTest {
+ OnapCommandProfileStore onapCommandProfileStore;
+ @Before
+ public void setUp() throws Exception {
+ onapCommandProfileStore=OnapCommandProfileStore.getInstance();
+ }
+ @Test
+ public void includeProfileTest() throws OnapCommandException {
+ onapCommandProfileStore.includeProfile("profiles");
+ assertTrue(new File(System.getProperty("user.dir")+File.separator+"data/profiles").exists());
+ }
+ @Test
+ public void persistProfileAndgetProfilesTest() throws OnapCommandPersistProfileFailed {
+ OnapCommandParamEntity onapCommandParamEntity=new OnapCommandParamEntity();
+ onapCommandParamEntity.setName("schema-list");
+ onapCommandParamEntity.setProduct("open-cli");
+ onapCommandParamEntity.setValue("value");
+ List<OnapCommandParamEntity> paramEntityList=new ArrayList<>();
+ paramEntityList.add(onapCommandParamEntity);
+ onapCommandProfileStore.persistProfile(paramEntityList,"abc");
+ assertTrue(new File(System.getProperty("user.dir")+File.separator+"data/profiles/abc-profile.json").exists());
+ assertNotNull(onapCommandProfileStore.getProfiles());
+ }
+ @Test
+ public void removeProfileTest(){
+ onapCommandProfileStore.removeProfile("abc");
+ assertFalse(new File(System.getProperty("user.dir")+File.separator+"data/profiles/abc-profile.json").exists());
+ }
+ @Test
+ public void addTest(){
+ onapCommandProfileStore.add("abc","abc","abc");
+ }
+@Test
+ public void getParamsTest(){
+ assertNotNull(onapCommandProfileStore.getParams("abc"));
+}
+
+} \ No newline at end of file
diff --git a/main/src/test/java/open/infc/grpc/client/OpenRemoteCliTest.java b/main/src/test/java/open/infc/grpc/client/OpenRemoteCliTest.java
new file mode 100644
index 00000000..6b060a60
--- /dev/null
+++ b/main/src/test/java/open/infc/grpc/client/OpenRemoteCliTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2019 Huawei Technologies Co., Ltd.
+ *
+ * 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.
+ */
+
+package org.open.infc.grpc.client;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+
+public class OpenRemoteCliTest {
+ OpenRemoteCli openRemoteCli;
+ @Before
+ public void setUp() throws Exception {
+ openRemoteCli= new OpenRemoteCli("localhost",8080,123,"abc");
+ }
+ @Test(expected = OpenInterfaceGrpcClient.OpenInterfaceGrpcTimeoutExecption.class)
+ public void runTest() throws Exception {
+ List<String > list =new ArrayList<>();
+ list.add("abc");
+ openRemoteCli.run(list);
+ }
+ @Test(expected = OpenInterfaceGrpcClient.OpenInterfaceGrpcTimeoutExecption.class)
+ public void runTest2() throws Exception {
+ List<String > list =new ArrayList<>();
+ list.add("abc");
+ openRemoteCli.run("localhost",8080,"abc",list);
+ }
+ @Test(expected = OpenInterfaceGrpcClient.OpenInterfaceGrpcTimeoutExecption.class)
+ public void invokeTest() throws Exception {
+ Map<String, String> map = new HashMap<>();
+ map.put("product", "product");
+ openRemoteCli.invoke("localhost",8080,"product","profile","action","abc123",map);
+ }
+} \ No newline at end of file
diff --git a/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py b/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py
index 11193fd9..2141e168 100644
--- a/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py
+++ b/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py
@@ -6,7 +6,6 @@ import time
import argparse
import sys
import requests
-import __main__
def get_parameters(file):
parameters = json.load(file)
@@ -25,8 +24,8 @@ def set_open_cli_env(parameters):
os.environ["OPEN_CLI_HOME"] = parameters["open_cli_home"]
def create_complex(parameters):
- complex_create_string = "oclip complex-create -j {} -r {} -x {} -y {} -lt {} -l {} -i {} -lo {} \
- -S {} -la {} -g {} -w {} -z {} -k {} -o {} -q {} -m {} -u {} -p {}".format(parameters["street2"], \
+ complex_create_string = "oclip --request-id {} complex-create --debug -j {} -r {} -x {} -y {} -lt {} -l {} -i {} -lo {} \
+ -S {} -la {} -g {} -w {} -z {} -k {} -o {} -q {} -m {} -u {} -p {}".format(request_id, parameters["street2"], \
parameters["physical_location"], parameters["complex_name"], \
parameters["data_center_code"], parameters["latitude"], parameters["region"], \
parameters["street1"], parameters["longitude"], parameters["state"], \
@@ -38,14 +37,14 @@ def create_complex(parameters):
os.system(complex_create_string)
def create_vlm(parameters):
- vlm_create_string = "oclip vlm-create -x {} -u {} -p {} -m {}".format(parameters["vendor-name"], \
+ vlm_create_string = "oclip --request-id {} vlm-create --debug -x {} -u {} -p {} -m {}".format(request_id, parameters["vendor-name"], \
parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_onboarding_url"])
command_out = (os.popen(vlm_create_string)).read()
out_list = get_out_helper(command_out)
vlm_id = out_list[3]
vlm_version = out_list[5]
- entitlement_string = "oclip vlm-entitlement-pool-create -x {} -y {} -e {} -z {} -k {} -g {} -l {} -u {} -p {} -m {}".format( \
+ entitlement_string = "oclip --request-id {} vlm-entitlement-pool-create --debug -x {} -y {} -e {} -z {} -k {} -g {} -l {} -u {} -p {} -m {}".format(request_id, \
parameters["entitlement-pool-name"], vlm_id, vlm_version, parameters["entitlement-description"], parameters["vendor-name"], \
parameters["expiry-date"], parameters["start-date"], parameters["sdc_creator"], parameters["sdc_password"], \
parameters["sdc_onboarding_url"])
@@ -53,25 +52,25 @@ def create_vlm(parameters):
entitlement_id = (get_out_helper(command_out))[3]
- key_group_string = "oclip vlm-key-group-create -c {} -e {} -x {} -y {} -u {} -p {} -m {}".format(vlm_id, vlm_version, \
+ key_group_string = "oclip --request-id {} vlm-key-group-create --debug -c {} -e {} -x {} -y {} -u {} -p {} -m {}".format(request_id, vlm_id, vlm_version, \
parameters["key-group-name"], parameters["key-group-type"], parameters["sdc_creator"], parameters["sdc_password"], \
parameters["sdc_onboarding_url"])
command_out = (os.popen(key_group_string)).read()
key_group_id = (get_out_helper(command_out))[3]
- feature_group_string = "oclip vlm-feature-group-create -x {} -y {} -e {} -z {} -g {} -b {} -c {} -u {} -p {} -m {}".format(
+ feature_group_string = "oclip --request-id {} vlm-feature-group-create --debug -x {} -y {} -e {} -z {} -g {} -b {} -c {} -u {} -p {} -m {}".format(request_id,
parameters["feature-grp-name"], vlm_id, vlm_version, parameters["feature-grp-desc"], key_group_id, entitlement_id, \
parameters["part-no"], parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_onboarding_url"])
command_out = (os.popen(feature_group_string)).read()
feature_group_id = (get_out_helper(command_out))[3]
- agreement_string = "oclip vlm-aggreement-create -x {} -y {} -e {} -z {} -g {} -u {} -p {} -m {}".format(parameters["agreement-name"], \
+ agreement_string = "oclip --request-id {} vlm-aggreement-create --debug -x {} -y {} -e {} -z {} -g {} -u {} -p {} -m {}".format(request_id, parameters["agreement-name"], \
vlm_id, vlm_version, parameters["agreement-desc"], feature_group_id, parameters["sdc_creator"], parameters["sdc_password"], \
parameters["sdc_onboarding_url"])
command_out = (os.popen(agreement_string)).read()
agreement_id = (get_out_helper(command_out))[3]
- submit_string = "oclip vlm-submit -x {} -y {} -u {} -p {} -m {}".format(vlm_id, vlm_version, parameters["sdc_creator"], \
+ submit_string = "oclip --request-id {} vlm-submit --debug -x {} -y {} -u {} -p {} -m {}".format(request_id, vlm_id, vlm_version, parameters["sdc_creator"], \
parameters["sdc_password"], parameters["sdc_onboarding_url"])
os.system(submit_string)
@@ -82,7 +81,7 @@ def create_vsp(parameters, in_list):
vnfs = parameters["vnf"]
vsp_dict = {}
for name, value in vnfs.iteritems():
- create_string = "oclip vsp-create -j {} -o {} -e {} -x {} -y {} -i {} -c {} -g {} -u {} -p {} -m {}".format( in_list[0], \
+ create_string = "oclip --request-id {} vsp-create --debug -j {} -o {} -e {} -x {} -y {} -i {} -c {} -g {} -u {} -p {} -m {}".format(request_id, in_list[0], \
parameters["onboarding-method"], parameters["vendor-name" ], value.get("vsp-name"), value.get("vsp-desc"), in_list[1], \
in_list[2], in_list[3], parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_onboarding_url"] )
command_out = (os.popen(create_string)).read()
@@ -90,16 +89,16 @@ def create_vsp(parameters, in_list):
vsp_id = out_list[3]
vsp_version = out_list[5]
- os.system("oclip vsp-add-artifact -x {} -y {} -z {} -u {} -p {} -m {}".format(vsp_id, vsp_version, value.get("path"), \
+ os.system("oclip --request-id {} vsp-add-artifact --debug -x {} -y {} -z {} -u {} -p {} -m {}".format(request_id, vsp_id, vsp_version, value.get("path"), \
parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_onboarding_url"]))
- os.system("oclip vsp-validate -x {} -y {} -u {} -p {} -m {}".format(vsp_id, vsp_version, parameters["sdc_creator"], \
+ os.system("oclip --request-id {} vsp-validate --debug -x {} -y {} -u {} -p {} -m {}".format(request_id, vsp_id, vsp_version, parameters["sdc_creator"], \
parameters["sdc_password"], parameters["sdc_onboarding_url"]))
- os.system("oclip vsp-submit -x {} -y {} -u {} -p {} -m {}".format(vsp_id, vsp_version, parameters["sdc_creator"], \
+ os.system("oclip --request-id {} vsp-submit --debug -x {} -y {} -u {} -p {} -m {}".format(request_id, vsp_id, vsp_version, parameters["sdc_creator"], \
parameters["sdc_password"], parameters["sdc_onboarding_url"]))
- os.system("oclip vsp-package -x {} -y {} -u {} -p {} -m {}".format(vsp_id, vsp_version, parameters["sdc_creator"], \
+ os.system("oclip --request-id {} vsp-package --debug -x {} -y {} -u {} -p {} -m {}".format(request_id, vsp_id, vsp_version, parameters["sdc_creator"], \
parameters["sdc_password"], parameters["sdc_onboarding_url"]))
vsp_ids[name] = vsp_id
@@ -109,41 +108,41 @@ def create_vf_model(parameters, vsp_dict):
vnfs = parameters["vnfs"]
vf_dict = {}
for name, value in vnfs.iteritems():
- create_string = "oclip vf-model-create -y {} -g {} -x {} -z {} -b {} -u {} -p {} -m {}".format(value.get("vf-description"), \
+ create_string = "oclip --request-id {} vf-model-create --debug -y {} -g {} -x {} -z {} -b {} -u {} -p {} -m {}".format(request_id, value.get("vf-description"), \
value.get("vsp-version"), value.get("vf-name"), parameters["vendor-name"], vsp_dict[name], \
parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_catalog_url"])
os.system(create_string)
- output = (os.popen("oclip vf-model-list -m {} -u {} -p {} | grep {}".format(parameters["sdc_catalog_url"], \
+ output = (os.popen("oclip --request-id {} vf-model-list --debug -m {} -u {} -p {} | grep {}".format(request_id, parameters["sdc_catalog_url"], \
parameters["sdc_creator"], parameters["sdc_password"], value.get("vf-name")))).read()
output = (get_out_helper_2(output))
vf_unique_id = output[1]
# checkout
- output = (os.popen("oclip vf-model-checkout --host-url {} --host-username {} --host-password {} --vf-model-uuid {} --format json".format(
+ output = (os.popen("oclip --request-id {} vf-model-checkout --debug --host-url {} --host-username {} --host-password {} --vf-model-uuid {} --format json".format(request_id,
parameters["sdc_catalog_url"], parameters["sdc_creator"], parameters["sdc_password"], vf_unique_id))).read()
vf_unique_id = (json.loads(output))['ID']
# add consumer, if already exist , just ignore, below command would fail simply !!
- os.system("oclip sdc-consumer-create --consumer-name {}".format(parameters["sdc_consumer"]))
+ os.system("oclip --request-id {} sdc-consumer-create --debug --consumer-name {}".format(request_id, parameters["sdc_consumer"]))
def get_vnf_name(vnf_csar_path):
return vnf_csar_path.replace("_"," ").replace(".", " ").replace("-"," ")
# add artifact
- os.system("oclip vf-model-add-artifact --host-url {} --host-username {} --host-password {} --vf-model-uuid {} --artifact {} --artifact-name {}".format(
- parameters["sdc_catalog_url"], parameters["sdc_consumer"], parameters["sdc_password"], vf_unique_id, vnf_csar, get_vnf_name(vnf_csar)))
+ os.system("oclip --request-id {} vf-model-add-artifact --debug --host-url {} --host-username {} --host-password {} --vf-model-uuid {} --artifact {} --artifact-name {}".format(
+ request_id, parameters["sdc_catalog_url"], parameters["sdc_consumer"], parameters["sdc_password"], vf_unique_id, vnf_csar, get_vnf_name(vnf_csar)))
# check-in
- os.system("oclip vf-model-checkin --host-url {} --host-username {} --host-password {} --vf-model-uuid {}".format(
- parameters["sdc_catalog_url"], parameters["sdc_creator"], parameters["sdc_password"], vf_unique_id))
+ os.system("oclip --request-id {} vf-model-checkin --debug --host-url {} --host-username {} --host-password {} --vf-model-uuid {}".format(
+ request_id, parameters["sdc_catalog_url"], parameters["sdc_creator"], parameters["sdc_password"], vf_unique_id))
- os.system("oclip vf-model-certify -b {} -r {} -u {} -p {} -m {}".format(vf_unique_id, value.get("vf-remarks"), \
- parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
+ os.system("oclip --request-id {} vf-model-certify --debug -b {} -r {} -u {} -p {} -m {}".format(vf_unique_id, value.get("vf-remarks"), \
+ request_id, parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
#Check for new parameters after certification
- output = (os.popen("oclip vf-model-list -m {} -u {} -p {} | grep {}".format(parameters["sdc_catalog_url"], \
+ output = (os.popen("oclip --request-id {} vf-model-list --debug -m {} -u {} -p {} | grep {}".format(request_id, parameters["sdc_catalog_url"], \
parameters["sdc_creator"], parameters["sdc_password"], value.get("vf-name")))).read()
output = (get_out_helper_2(output))
@@ -155,22 +154,22 @@ def create_vf_model(parameters, vsp_dict):
def create_service_model(parameters, vf_dict):
vnfs = parameters["vnfs"]
- create_string = "oclip service-model-create -z {} -y {} -e {} -x {} -c {} -b {} -u {} -p {} -m {} |grep ID".format(parameters["project-code"], \
+ create_string = "oclip --request-id {} service-model-create --debug -z {} -y {} -e {} -x {} -c {} -b {} -u {} -p {} -m {} |grep ID".format(request_id, parameters["project-code"], \
parameters["service-model-desc"], parameters["icon-id"], parameters["service-model-name"], parameters["category-display"], \
parameters["category"],parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_catalog_url"])
service_model_id = (get_out_helper_2((os.popen(create_string)).read()))[1]
# checkout
- output = (os.popen("oclip service-model-checkout --host-url {} --host-username {} --host-password {} --service-model-uuid {} --format json".format(
+ output = (os.popen("oclip --request-id {} service-model-checkout --debug --host-url {} --host-username {} --host-password {} --service-model-uuid {} --format json".format(request_id,
parameters["sdc_catalog_url"], parameters["sdc_creator"], parameters["sdc_password"], service_model_id))).read()
service_model_id = (json.loads(output))['ID']
# add consumer, if already exist , just ignore, below command would fail simply !!
- os.system("oclip sdc-consumer-create --consumer-name {}".format(parameters["sdc_consumer"]))
+ os.system("oclip --request-id {} sdc-consumer-create - --debug -consumer-name {}".format(request_id, parameters["sdc_consumer"]))
for name, value in vnfs.iteritems():
- output = (os.popen("oclip service-model-add-vf -x {} -b {} -y {} -z {} -u {} -p {} -m {}".format(service_model_id, \
+ output = (os.popen("oclip --request-id {} service-model-add-vf --debug -x {} -b {} -y {} -z {} -u {} -p {} -m {}".format(request_id, service_model_id, \
parameters["vf-version"], vf_dict[name], value.get("vf-name"), parameters["sdc_creator"], \
parameters["sdc_password"], parameters["sdc_catalog_url"] ))).read()
vf_unique_id = (json.loads(output))['ID']
@@ -180,45 +179,45 @@ def create_service_model(parameters, vf_dict):
return vnf_csar_path.replace("_"," ").replace(".", " ").replace("-"," ")
# add artifact
- os.system("oclip service-model-add-artifact --host-url {} --host-username {} --host-password {} --service-uniqueId {} --artifact {} --artifact-name {}".format(
- parameters["sdc_catalog_url"], parameters["sdc_consumer"], parameters["sdc_password"], vf_unique_id, ns_csar, get_vnf_name(ns_csar)))
+ os.system("oclip --request-id {} service-model-add-artifact --debug --host-url {} --host-username {} --host-password {} --service-uniqueId {} --artifact {} --artifact-name {}".format(
+ request_id, parameters["sdc_catalog_url"], parameters["sdc_consumer"], parameters["sdc_password"], vf_unique_id, ns_csar, get_vnf_name(ns_csar)))
# set properties
- os.system("oclip service-model-set-property --host-url {} --host-username {} --host-password {} --service-uniqueId {} --resource-uuid {} --resource-uniqueId {} --property-name nf_type --property-value {}".format(
- parameters["sdc_catalog_url"], parameters["sdc_consumer"], parameters["sdc_password"], service_model_id , vf_unique_id, vf_uuid, vnfm_driver))
+ os.system("oclip --request-id {} service-model-set-property --debug --host-url {} --host-username {} --host-password {} --service-uniqueId {} --resource-uuid {} --resource-uniqueId {} --property-name nf_type --property-value {}".format(
+ request_id, parameters["sdc_catalog_url"], parameters["sdc_consumer"], parameters["sdc_password"], service_model_id , vf_unique_id, vf_uuid, vnfm_driver))
# check-in
- os.system("oclip service-model-checkin --host-url {} --host-username {} --host-password {} --service-model-uuid {}".format(
- parameters["sdc_catalog_url"], parameters["sdc_creator"], parameters["sdc_password"], service_model_id))
+ os.system("oclip --request-id {} service-model-checkin --debug --host-url {} --host-username {} --host-password {} --service-model-uuid {}".format(
+ request_id, parameters["sdc_catalog_url"], parameters["sdc_creator"], parameters["sdc_password"], service_model_id))
- os.system("oclip service-model-test-request -b {} -r {} -u {} -p {} -m {}".format(service_model_id, parameters["service-test-remarks"], \
- parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
+ os.system("oclip --request-id {} service-model-test-request --debug -b {} -r {} -u {} -p {} -m {}".format(service_model_id, parameters["service-test-remarks"], \
+ request_id, parameters["sdc_creator"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
- os.system("oclip service-model-test-start -b {} -u {} -p {} -m {}".format(service_model_id, parameters["sdc_tester"], \
- parameters["sdc_password"], parameters["sdc_catalog_url"]))
+ os.system("oclip --request-id {} service-model-test-start --debug -b {} -u {} -p {} -m {}".format(service_model_id, parameters["sdc_tester"], \
+ request_id, parameters["sdc_password"], parameters["sdc_catalog_url"]))
- os.system("oclip service-model-test-accept -b {} -r {} -u {} -p {} -m {}".format(service_model_id, parameters["service-accept-remarks"], \
- parameters["sdc_tester"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
+ os.system("oclip --request-id {} service-model-test-accept --debug -b {} -r {} -u {} -p {} -m {}".format(service_model_id, parameters["service-accept-remarks"], \
+ request_id, parameters["sdc_tester"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
#Get uniqueId for the service model
- service_model_values = (os.popen("oclip service-model-list -u {} -p {} -m {} |grep {}".format(parameters["sdc_creator"], \
+ service_model_values = (os.popen("oclip --request-id {} service-model-list --debug -u {} -p {} -m {} |grep {}".format(request_id, parameters["sdc_creator"], \
parameters["sdc_password"], parameters["sdc_catalog_url"], parameters["service-model-name"]))).read()
service_model_values = get_out_helper_2(service_model_values)
service_model_uniqueId = (service_model_values)[1]
- os.system("oclip service-model-approve -b {} -r {} -u {} -p {} -m {}".format(service_model_uniqueId, parameters["service-approve-remarks"], \
+ os.system("oclip --request-id {} service-model-approve --debug -b {} -r {} -u {} -p {} -m {}".format(request_id, service_model_uniqueId, parameters["service-approve-remarks"], \
parameters["sdc_governor"], parameters["sdc_password"], parameters["sdc_catalog_url"]))
- os.system("oclip service-model-distribute -b {} -u {} -p {} -m {}".format(service_model_uniqueId, parameters["sdc_operator"], \
+ os.system("oclip --request-id {} service-model-distribute --debug -b {} -u {} -p {} -m {}".format(request_id, service_model_uniqueId, parameters["sdc_operator"], \
parameters["sdc_password"], parameters["sdc_catalog_url"]))
return service_model_values
def register_cloud_helper(cloud_region, values, parameters):
#Create Cloud
- cloud_create_string = 'oclip cloud-create -e {} -b {} -I {{\\\\\\"openstack-region-id\\\\\\":\\\\\\"{}\\\\\\"}} \
- -x {} -y {} -j {} -w {} -l {} -url {} -n {} -q {} -r {} -Q {} -i {} -g {} -z {} -k {} -c {} -m {} -u {} -p {}'.format(
+ cloud_create_string = 'oclip --request-id {} cloud-create --debug -e {} -b {} -I {{\\\\\\"openstack-region-id\\\\\\":\\\\\\"{}\\\\\\"}} \
+ -x {} -y {} -j {} -w {} -l {} -url {} -n {} -q {} -r {} -Q {} -i {} -g {} -z {} -k {} -c {} -m {} -u {} -p {}'.format(request_id,
values.get("esr-system-info-id"), values.get("user-name"), cloud_region, parameters["cloud-owner"], \
cloud_region, values.get("password"), values.get("cloud-region-version"), values.get("default-tenant"), \
values.get("service-url"), parameters["complex_name"], values.get("cloud-type"), parameters["owner-defined-type"], \
@@ -230,12 +229,12 @@ def register_cloud_helper(cloud_region, values, parameters):
os.system(cloud_create_string)
#Associate Cloud with complex
- complex_associate_string = "oclip complex-associate -x {} -y {} -z {} -m {} -u {} -p {}".format(parameters["complex_name"], \
+ complex_associate_string = "oclip --request-id {} complex-associate --debug -x {} -y {} -z {} -m {} -u {} -p {}".format(request_id, parameters["complex_name"], \
cloud_region, parameters["cloud-owner"], parameters["aai_url"], parameters["aai_username"], parameters["aai_password"])
os.system(complex_associate_string)
#Register Cloud with Multicloud
- multicloud_register_string = "oclip multicloud-register-cloud -y {} -x {} -m {}".format(parameters["cloud-owner"], \
+ multicloud_register_string = "oclip --request-id {} multicloud-register-cloud --debug -y {} -x {} -m {}".format(request_id, parameters["cloud-owner"], \
cloud_region, parameters["multicloud_url"])
os.system(multicloud_register_string)
@@ -245,12 +244,12 @@ def register_all_clouds(parameters):
register_cloud_helper(cloud_region, cloud_region_values, parameters)
def create_service_type(parameters):
- create_string = "oclip service-type-create -x {} -m {} -u {} -p {}".format( parameters["service_name"], \
+ create_string = "oclip --request-id {} service-type-create --debug -x {} -m {} -u {} -p {}".format(request_id, parameters["service_name"], \
parameters["aai_url"], parameters["aai_username"], parameters["aai_password"])
os.system(create_string)
def create_customer(parameters):
- create_string = "oclip customer-create -x {} -y {} -m {} -u {} -p {}".format( parameters["customer_name"], \
+ create_string = "oclip --request-id {} customer-create --debug -x {} -y {} -m {} -u {} -p {}".format(request_id, parameters["customer_name"], \
parameters["subscriber_name"], parameters["aai_url"], parameters["aai_username"], parameters["aai_password"])
os.system(create_string)
@@ -258,11 +257,11 @@ def add_customer_subscription(parameters):
subscription_check = 0
for cloud_region, cloud_region_values in (parameters["cloud_region_data"]).iteritems():
if subscription_check == 0 :
- subscription_string = "oclip subscription-create -x {} -c {} -z {} -e {} -y {} -r {} -m {} -u {} -p {}".format(\
+ subscription_string = "oclip --request-id {} subscription-create --debug -x {} -c {} -z {} -e {} -y {} -r {} -m {} -u {} -p {}".format(request_id, \
parameters["customer_name"], cloud_region_values.get("tenant-id"), parameters["cloud-owner"], parameters["service_name"],\
cloud_region_values.get("default-tenant"), cloud_region, parameters["aai_url"], parameters["aai_username"], parameters["aai_password"] )
else:
- subscription_string = "oclip subscription-cloud-add -x {} -c {} -z {} -e {} -y {} -r {} -m {} -u {} -p {}".format(\
+ subscription_string = "oclip --request-id {} subscription-cloud-add --debug -x {} -c {} -z {} -e {} -y {} -r {} -m {} -u {} -p {}".format(request_id, \
parameters["customer_name"], cloud_region_values.get("tenant-id"), parameters["cloud-owner"], parameters["service_name"],\
cloud_region_values.get("default-tenant"), cloud_region, parameters["aai_url"], parameters["aai_username"], parameters["aai_password"] )
os.system(subscription_string)
@@ -270,8 +269,8 @@ def add_customer_subscription(parameters):
def register_vnfm_helper(vnfm_key, values, parameters):
#Create vnfm
- vnfm_create_string = 'oclip vnfm-create -b {} -c {} -e {} -v {} -g {} -x {} -i {} -j {} -q {} \
- -m {} -u {} -p {}'.format(vnfm_key, values.get("type"), values.get("vendor"), \
+ vnfm_create_string = 'oclip --request-id {} vnfm-create --debug -b {} -c {} -e {} -v {} -g {} -x {} -i {} -j {} -q {} \
+ -m {} -u {} -p {}'.format(request_id, vnfm_key, values.get("type"), values.get("vendor"), \
values.get("version"), values.get("url"), values.get("vim-id"), \
values.get("user-name"), values.get("user-password"), values.get("vnfm-version"), \
parameters["aai_url"], parameters["aai_username"], parameters["aai_password"])
@@ -289,18 +288,18 @@ def onboard_vnf(parameters):
vnf_onboard_outputs = {}
for key, value in vnfs.items():
- vnf_onboard_string = 'oclip vfc-catalog-onboard-vnf -c {}'.format(value.get("csar-id"))
+ vnf_onboard_string = 'oclip --request-id {} vfc-catalog-onboard-vnf --debug -c {}'.format(request_id, value.get("csar-id"))
vnf_onboard_outs[key] = (os.popen(ns_onboard_string)).read()
return vnf_onboard_outputs
def onboard_ns(parameters):
- ns_onboard_string = 'oclip vfc-catalog-onboard-ns -c {}'.format(parameters["ns-csar-id"])
+ ns_onboard_string = 'oclip --request-id {} vfc-catalog-onboard-ns --debug -c {}'.format(request_id, parameters["ns-csar-id"])
ns_onboard_out = (os.popen(ns_onboard_string)).read()
return ns_onboard_out
def create_ns(parameters, csar_id):
ns = parameters["ns"]
- ns_create_string = 'oclip vfc-nslcm-create -m {} -c {} -n {} -q {} -S {}'.format(parameters["vfc-url"], \
+ ns_create_string = 'oclip --request-id {} vfc-nslcm-create --debug -m {} -c {} -n {} -q {} -S {}'.format(request_id, parameters["vfc-url"], \
csar_id, ns.get("name"), parameters["customer_name"], parameters["service_name"])
print (ns_create_string)
@@ -313,7 +312,7 @@ def create_ns(parameters, csar_id):
return ns_instance_id
def instantiate_ns(parameters, ns_instance_id):
- ns_instantiate_string = 'oclip vfc-nslcm-instantiate -m {} -i {} -c {} -n {}'.format(parameters["vfc-url"], \
+ ns_instantiate_string = 'oclip --request-id {} vfc-nslcm-instantiate --debug -m {} -i {} -c {} -n {}'.format(request_id, parameters["vfc-url"], \
ns_instance_id, parameters["location"], parameters["sdc-controller-id"])
print (ns_instantiate_string)
@@ -322,7 +321,7 @@ def instantiate_ns(parameters, ns_instance_id):
def create_ns_package(parameters):
ns = parameters["ns"]
- create_ns_string = 'oclip vfc-catalog-create-ns -m {} -c {} -e {}'.format(parameters["vfc-url"], \
+ create_ns_string = 'oclip --request-id {} vfc-catalog-create-ns --debug -m {} -c {} -e {}'.format(request_id, parameters["vfc-url"], \
ns.get("key"), ns.get("value"))
cmd_out = (os.popen(create_ns_string)).read()
out_list = get_out_helper_2(cmd_out)
@@ -333,7 +332,7 @@ def create_vnf_package(parameters):
outputs = {}
for vnf_key, vnf_values in vnfs.iteritems():
- create_vnf_string = 'oclip vfc-catalog-create-vnf -m {} -c {} -e {}'.format(parameters["vfc-url"], \
+ create_vnf_string = 'oclip --request-id {} vfc-catalog-create-vnf --debug -m {} -c {} -e {}'.format(request_id, parameters["vfc-url"], \
vnf_values.get("key"), vnf_values.get("value"))
cmd_out = (os.popen(create_vnf_string)).read()
out_list = get_out_helper_2(cmd_out)
@@ -341,23 +340,6 @@ def create_vnf_package(parameters):
return outputs
-def upload_ns_package(parameters, ns_package_output):
- ns = parameters["ns"]
- ns_upload_string = '{}/api/nsd/v1/ns_descriptors/{}/nsd_content'.format(parameters["vfc-url"], ns_package_output)
- print (ns_upload_string)
- print (ns.get("path"))
- resp = requests.put(ns_upload_string, files={'file': open(ns.get("path"), 'rb')})
- return resp
-
-def upload_vnf_package(parameters, vnf_package_output):
- vnfs = parameters["vnfs"]
- for vnf_key, vnf_values in vnfs.iteritems():
- vnf_upload_str = '{}/api/vnfpkgm/v1/vnf_packages/{}/package_content'.format(parameters["vfc-url"], \
- vnf_package_output[vnf_key], vnf_package_output[vnf_key])
- resp = requests.put(vnf_upload_str, files={'file': open(vnf_values.get("path"), 'rb')})
- return resp
-
-
def provision_vnf():
result_json = {}
@@ -366,51 +348,55 @@ def provision_vnf():
result_json['ns_id'] = ''
result_json['ns_status'] = ''
- # 1.Setup cloud and service
- #setup cloud and region
- create_complex(parameters)
- register_all_clouds(parameters)
+ def _provision():
+ # 1.Setup cloud and service
+ #setup cloud and region
+ create_complex(parameters)
+ register_all_clouds(parameters)
- # setup subscription and customer
- create_service_type(parameters)
- create_customer(parameters)
- add_customer_subscription(parameters)
+ # setup subscription and customer
+ create_service_type(parameters)
+ create_customer(parameters)
+ add_customer_subscription(parameters)
- # setup vnfm
- register_vnfm(parameters)
+ # setup vnfm
+ register_vnfm(parameters)
- # Setup License
- vlm_output = create_vlm(parameters)
- print "vlm parameters={}".format(vlm_output)
+ # Setup License
+ vlm_output = create_vlm(parameters)
+ print "vlm parameters={}".format(vlm_output)
- # 2. on-board VSP
- vsp_id = create_vsp(parameters, vlm_output)
- print "vsp id={}".format(vsp_id)
+ # 2. on-board VSP
+ vsp_id = create_vsp(parameters, vlm_output)
+ print "vsp id={}".format(vsp_id)
- # 3. model VF
- vf_model_dict = create_vf_model(parameters, vsp_id)
- print "vf model parameters={}".format(vf_model_dict)
- vf_id = vf_model_dict["vf_id"]
- vf_unique_id = vf_model_dict["vf_unique_id"]
+ # 3. model VF
+ vf_model_dict = create_vf_model(parameters, vsp_id)
+ print "vf model parameters={}".format(vf_model_dict)
+ vf_id = vf_model_dict["vf_id"]
+ vf_unique_id = vf_model_dict["vf_unique_id"]
- # 4. model NS and 5. Approve and distribute
- service_model_list = create_service_model(parameters, vf_unique_id)
- print "service model parameters={}".format(service_model_list)
+ # 4. model NS and 5. Approve and distribute
+ service_model_list = create_service_model(parameters, vf_unique_id)
+ print "service model parameters={}".format(service_model_list)
- # 6. onboard VNF
- vnf_onboard_output = onboard_vnf(parameters)
- print vnf_onboard_output
+ # 6. onboard VNF
+ vnf_onboard_output = onboard_vnf(parameters)
+ print vnf_onboard_output
- # 7. onboard NS
- ns_onboard_out = onboard_ns(parameters)
- print ns_onboard_out
+ # 7. onboard NS
+ ns_onboard_out = onboard_ns(parameters)
+ print ns_onboard_out
- # 8. create NS
- ns_instance_id = create_ns(parameters, ns_package_output)
- print ns_instance_id
+ #TODO is create vnf and ns pacakge required ??
+ # 8. create NS
+ ns_instance_id = create_ns(parameters, ns_package_output)
+ print ns_instance_id
- instantiate_ns_output = instantiate_ns(parameters, ns_instance_id)
- print instantiate_ns_output
+ instantiate_ns_output = instantiate_ns(parameters, ns_instance_id)
+ print instantiate_ns_output
+
+ _provision()
return result_json
@@ -437,6 +423,7 @@ parser.add_argument('--vnf-csar', action='store', dest='vnf_csar', help='VNF CSA
parser.add_argument('--ns-csar', action='store', dest='ns_csar', help='NS CSAR')
parser.add_argument('--vnfm-driver', action='store', dest='vnfm_driver', help='gVNFM or hwVNFM')
parser.add_argument('--result-json', action='store', dest='result_json_path', help='Output result json')
+parser.add_argument('--request-id', action='store', dest='request_id', help='Request Id to track')
#Retrive the params
args = parser.parse_args()
@@ -449,6 +436,11 @@ ns_csar = args.ns_csar
vnfm_driver = args.vnfm_driver
result_json_path = args.result_json_path
+if args.request_id is None:
+ request_id = os.environ["OPEN_CLI_REQUEST_ID"]
+else:
+ request_id = args.request_id
+
# setup CLI
parameters = get_parameters(config_file)
set_open_cli_env(parameters)
diff --git a/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-dublin.yaml b/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-dublin.yaml
index 5b2dd407..d9b6236b 100644
--- a/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-dublin.yaml
+++ b/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-dublin.yaml
@@ -25,8 +25,8 @@ parameters:
- name: policy-type-id
description: Policy type ID
type: string
- long-option: policy-type-id
- short-option: x
+ long_option: policy-type-id
+ short_option: x
is_optional: false
results:
diff --git a/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-dublin.yaml b/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-dublin.yaml
index 57b12c25..ac4a55cd 100644
--- a/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-dublin.yaml
+++ b/products/onap-dublin/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-dublin.yaml
@@ -25,14 +25,14 @@ parameters:
- name: policy-type-id
description: Policy type ID
type: string
- long-option: policy-type-id
- short-option: x
+ long_option: policy-type-id
+ short_option: x
is_optional: false
- name: version-id
description: Policy type version ID
type: string
- long-option: version-id
- short-option: y
+ long_option: version-id
+ short_option: y
is_optional: false
results:
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-create-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-create-schema-elalto.yaml
new file mode 100644
index 00000000..c87e9cb9
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-create-schema-elalto.yaml
@@ -0,0 +1,47 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: customer-create
+description: Create a customer in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ 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
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}
+ method: PUT
+ body: '{"global-customer-id": "${customer-name}", "subscriber-name": "${subscriber-name}", "subscriber-type": "INFRA"}'
+ success_codes:
+ - 201
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-delete-schema-elalto.yaml
new file mode 100644
index 00000000..c2561a07
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-delete-schema-elalto.yaml
@@ -0,0 +1,46 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: customer-delete
+description: Delete a customer from Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer-name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+ - name: resource-version
+ description: Onap customer resource version
+ type: uuid
+ short_option: y
+ long_option: resource-version
+ is_optional: false
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-list-schema-elalto.yaml
new file mode 100644
index 00000000..f518ab02
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-list-schema-elalto.yaml
@@ -0,0 +1,47 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: customer-list
+description: Lists the registered customers in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: Onap customer name
+ scope: short
+ type: string
+ - name: resource-version
+ description: Onap customer resource version
+ scope: short
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v13/business/customers
+ method: GET
+ success_codes:
+ - 200
+ - 404
+ result_map:
+ name: $b{customer.[*].global-customer-id}
+ resource-version: $b{customer.[*].resource-version}
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-show-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-show-schema-elalto.yaml
new file mode 100644
index 00000000..7b516d31
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/customer/customer-show-schema-elalto.yaml
@@ -0,0 +1,66 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: customer-show
+description: Retrieves the given registered customer in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: Onap customer name
+ scope: short
+ type: string
+ - name: subscriber-name
+ description: Onap subscriber name
+ scope: short
+ type: string
+ - name: resource-version
+ description: Onap subscriber resource version
+ scope: long
+ type: string
+ - name: subscriber-type
+ description: Onap subscriber type
+ scope: long
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ name: $b{$.global-customer-id}
+ subscriber-name: $b{$.subscriber-name}
+ subscriber-type: $b{$.subscriber-type}
+ resource-version: $b{$.resource-version}
+ sample_response:
+ body: '{"global-customer-id":"Linan","subscriber-name":"Linan","subscriber-type":"INFRA","resource-version":"1501768482","service-subscriptions":{"service-subscription":[{"service-type":"vFW","resource-version":"1501768482","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}},{"service-type":"vLB","resource-version":"1501768482","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"https://192.168.17.12:8443/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/Rackspace/RegionOne/tenants/tenant/e69e6d64b44347509c3fc512391f34a6/","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"Rackspace"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"RegionOne"},{"relationship-key":"tenant.tenant-id","relationship-value":"e69e6d64b44347509c3fc512391f34a6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"onap"}]}]}}]}}'
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-elalto.yaml
new file mode 100644
index 00000000..708d480c
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/owning-entity/owning-entity-list-schema-elalto.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: owning-entity-list
+description: Lists the Owning Entities in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: Owning entity name
+ scope: short
+ type: string
+ - name: Id
+ description: Owning entity Id
+ scope: short
+ type: string
+ - name: resource-version
+ description: Owning entity resource version
+ scope: short
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/owning-entities
+ method: GET
+ success_codes:
+ - 200
+ - 404
+ result_map:
+ name: $b{owning-entity.[*].owning-entity-name}
+ Id: $b{owning-entity.[*].owning-entity-id}
+ resource-version: $b{owning-entity.[*].resource-version}
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-create-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-create-schema-elalto.yaml
new file mode 100644
index 00000000..4b2766dc
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-create-schema-elalto.yaml
@@ -0,0 +1,48 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: service-type-create
+description: Add a service type in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+parameters:
+ - name: service-type
+ description: Onap service type
+ type: string
+ short_option: x
+ long_option: service-type
+ is_optional: false
+ - name: service-type-id
+ description: Onap service type uuid
+ type: uuid
+ short_option: y
+ long_option: service-type-id
+ is_optional: true
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v13/service-design-and-creation/services/service/${service-type-id}
+ method: PUT
+ body: '{"service-description": "${service-type}", "service-id": "${service-type-id}"}'
+ success_codes:
+ - 201
+ sample_response:
+ body: ''
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-delete-schema-elalto.yaml
new file mode 100644
index 00000000..817f95f5
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-delete-schema-elalto.yaml
@@ -0,0 +1,46 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: service-type-delete
+description: Delete a service type from Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: service-type-id
+ description: Onap service type uuid
+ type: uuid
+ short_option: x
+ long_option: service-type-id
+ is_optional: true
+ - name: resource-version
+ description: Onap service resource version
+ type: uuid
+ short_option: y
+ long_option: resource-version
+ is_optional: true
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v13/service-design-and-creation/services/service/${service-type-id}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-list-schema-elalto.yaml
new file mode 100644
index 00000000..938c6f2d
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/service-type/service-type-list-schema-elalto.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: service-type-list
+description: List the service types configured in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: service-type-id
+ description: Onap cloud service
+ scope: short
+ type: string
+ - name: service-type
+ description: Onap cloud service
+ scope: short
+ type: string
+ - name: resource-version
+ description: Onap cloud service resource version
+ scope: short
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v13/service-design-and-creation/services
+ method: GET
+ success_codes:
+ - 200
+ - 404
+ result_map:
+ service-type: $b{service.[*].service-description}
+ service-type-id: $b{service.[*].service-id}
+ resource-version: $b{service.[*].resource-version}
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-elalto.yaml
new file mode 100644
index 00000000..f9c97e28
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-add-schema-elalto.yaml
@@ -0,0 +1,100 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: subscription-cloud-add
+description: Add a new cloud region to a customer subscription
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+ - name: cloud-owner
+ description: Onap cloud owner name
+ type: string
+ short_option: z
+ long_option: cloud-owner
+ is_optional: false
+ - name: cloud-region
+ description: Onap cloud region
+ type: string
+ short_option: r
+ long_option: cloud-region
+ is_optional: false
+ - name: cloud-tenant-id
+ description: Onap cloud tenant id
+ type: string
+ short_option: c
+ long_option: cloud-tenant-id
+ is_optional: false
+ - name: service-type
+ description: Onap service type
+ type: string
+ short_option: e
+ long_option: service-type
+ is_optional: false
+ - name: tenant-name
+ description: name of tenant to use in the cloud region
+ type: string
+ short_option: y
+ long_option: tenant-name
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}/relationship-list/relationship
+ method: PUT
+ context:
+ remove_empty_node: true
+ body: '{
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/tenants/tenant/${cloud-tenant-id}",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "${cloud-owner}"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "${cloud-region}"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "${cloud-tenant-id}"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "${tenant-name}"
+ }
+ ]
+ }'
+ success_codes:
+ - 200
+ - 201
+ sample_response:
+ body: ''
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-delete-schema-elalto.yaml
new file mode 100644
index 00000000..a5e93a73
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-cloud-delete-schema-elalto.yaml
@@ -0,0 +1,97 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: subscription-cloud-delete
+description: Delete a cloud region from a customer subscription
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+ - name: cloud-owner
+ description: Onap cloud owner name
+ type: string
+ short_option: z
+ long_option: cloud-owner
+ is_optional: false
+ - name: cloud-region
+ description: Onap cloud region
+ type: string
+ short_option: r
+ long_option: cloud-region
+ is_optional: false
+ - name: cloud-tenant-id
+ description: Onap cloud tenant id
+ type: string
+ short_option: c
+ long_option: cloud-tenant-id
+ is_optional: false
+ - name: service-type
+ description: Onap service type
+ type: string
+ short_option: e
+ long_option: service-type
+ is_optional: false
+ - name: tenant-name
+ description: name of tenant to use in the cloud region
+ type: string
+ short_option: y
+ long_option: tenant-name
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}/relationship-list/relationship
+ method: DELETE
+ context:
+ remove_empty_node: true
+ body: '{
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/tenants/tenant/${cloud-tenant-id}",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "${cloud-owner}"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "${cloud-region}"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "${cloud-tenant-id}"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "${tenant-name}"
+ }
+ ]
+ }'
+ success_codes:
+ - 204
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-elalto.yaml
new file mode 100644
index 00000000..a63ddd22
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-create-schema-elalto.yaml
@@ -0,0 +1,106 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: subscription-create
+description: Create a subscription of a customer for given service in specific cloud region in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+ - name: cloud-owner
+ description: Onap cloud owner name
+ type: string
+ short_option: z
+ long_option: cloud-owner
+ is_optional: false
+ - name: cloud-region
+ description: Onap cloud region
+ type: string
+ short_option: r
+ long_option: cloud-region
+ is_optional: false
+ - name: cloud-tenant-id
+ description: Onap cloud tenant id
+ type: string
+ short_option: c
+ long_option: cloud-tenant-id
+ is_optional: false
+ - name: service-type
+ description: Onap service type
+ type: string
+ short_option: e
+ long_option: service-type
+ is_optional: false
+ - name: tenant-name
+ description: name of tenant to use in the cloud region
+ type: string
+ short_option: y
+ long_option: tenant-name
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}
+ method: PUT
+ context:
+ remove_empty_node: true
+ body: '{
+ "service-type": "${service-type}",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "tenant",
+ "relationship-label": "org.onap.relationships.inventory.Uses",
+ "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${cloud-region}/tenants/tenant/${cloud-tenant-id}",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "${cloud-owner}"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "${cloud-region}"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "${cloud-tenant-id}"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "tenant.tenant-name",
+ "property-value": "${tenant-name}"
+ }
+ ]
+ }
+ ]
+ } }'
+ success_codes:
+ - 200
+ - 201
+ sample_response:
+ body: ''
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-delete-schema-elalto.yaml
new file mode 100644
index 00000000..1140c8db
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-delete-schema-elalto.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: subscription-delete
+description: Delete the subscription for a given customer in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+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:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v13/business/customers/customer/${customer-name}/service-subscriptions/service-subscription/${service-type}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml
new file mode 100644
index 00000000..f1f5a604
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/business/subscription/subscription-list-schema-elalto.yaml
@@ -0,0 +1,78 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: subscription-list
+description: Lists the subscription for a given customer in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: customer-name
+ description: Onap customer name
+ type: string
+ short_option: x
+ long_option: customer-name
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: service-type
+ description: Onap service type
+ scope: short
+ type: string
+ - name: resource-version
+ description: Onap subscription resource version
+ scope: short
+ type: string
+ - name: tenant
+ description: Onap tenant name
+ scope: long
+ type: string
+ - name: region
+ description: Onap region name
+ scope: long
+ type: string
+ - name: cloud
+ description: Onap cloud name
+ scope: long
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/business/customers/customer/${customer-name}/service-subscriptions
+ method: GET
+ success_codes:
+ - 200
+ - 404
+ result_map:
+ service-type: $b{$.service-subscription.[*].service-type}
+ resource-version: $b{$.service-subscription.[*].resource-version}
+ tenant: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'tenant.tenant-id')].relationship-value}
+ region: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'cloud-region.cloud-region-id')].relationship-value}
+ cloud: $b{service-subscription.[*].relationship-list.relationship.[*].relationship-data.[?(@.relationship-key == 'cloud-region.cloud-owner')].relationship-value}
+
+ sample_response:
+ body: '{"service-subscription":[{"service-type":"vTest","resource-version":"1504091375183","relationship-list":{"relationship":[{"related-to":"tenant","related-link":"/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/26ab7af6-96cc-4c4e-814a-e533af4ef9f6","relationship-data":[{"relationship-key":"cloud-region.cloud-owner","relationship-value":"att-aic"},{"relationship-key":"cloud-region.cloud-region-id","relationship-value":"AAIAIC25"},{"relationship-key":"tenant.tenant-id","relationship-value":"26ab7af6-96cc-4c4e-814a-e533af4ef9f6"}],"related-to-property":[{"property-key":"tenant.tenant-name","property-value":"test"}]}]}}]}'
+
+
+
+
+
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-elalto.yaml
new file mode 100644
index 00000000..7bb06c24
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-create-schema-elalto.yaml
@@ -0,0 +1,93 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: ems-create
+
+description: Register a EMS in Onap
+
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: ems-id
+ description: Onap EMS unique id
+ type: uuid
+ short_option: z
+ long_option: ems-id
+ is_optional: false
+ - name: name
+ description: Onap EMS name
+ type: string
+ short_option: b
+ long_option: name
+ is_optional: false
+ - name: type
+ description: Onap EMS type
+ type: string
+ short_option: c
+ long_option: type
+ is_optional: false
+ - name: vendor
+ description: Onap EMS vendor
+ type: string
+ short_option: e
+ long_option: vendor
+ is_optional: false
+ - name: ems-version
+ description: Onap EMS version
+ type: string
+ short_option: q
+ long_option: ems-version
+ is_optional: false
+ - name: url
+ description: Onap EMS URL
+ type: string
+ short_option: g
+ long_option: url
+ is_optional: false
+ - name: username
+ description: Onap EMS username
+ type: string
+ short_option: i
+ long_option: username
+ is_optional: false
+ - name: password
+ description: Onap EMS password
+ type: string
+ short_option: j
+ long_option: password
+ is_optional: false
+ - name: remote-path
+ description: Onap EMS remote-path
+ type: string
+ short_option: x
+ long_option: remote-path
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-ems-list/esr-ems/${ems-id}
+ method: PUT
+ body: '{"ems-id":"${ems-id}","passive":true,"remote-path":"${remote-path}","esr-system-info-list":{"esr-system-info":[{"esr-system-info-id":"${ems-id}","system-name":"${name}","type":"${type}","vendor":"${vendor}","version":"${ems-version}","service-url":"${url}","user-name":"${username}","password":"${password}","system-type":"ems","protocal":"","ssl-cacert":"","ssl-insecure":"","ip-address":"","port":"","cloud-domain":"","default-tenant":""}]}}'
+ success_codes:
+ - 201
+
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-elalto.yaml
new file mode 100644
index 00000000..653cdacf
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-delete-schema-elalto.yaml
@@ -0,0 +1,50 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: ems-delete
+
+description: Un-register a EMS in Onap
+
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: ems-id
+ description: Onap EMS unique id
+ type: uuid
+ short_option: x
+ long_option: ems-id
+ is_optional: false
+ - name: resource-version
+ description: Onap EMS resource version
+ type: string
+ short_option: y
+ long_option: resource-version
+ is_optional: true
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-ems-list/esr-ems/${ems-id}?resource-version=${resource-version}
+ method: DELETE
+
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-elalto.yaml
new file mode 100644
index 00000000..c1c52c0d
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-list-schema-elalto.yaml
@@ -0,0 +1,49 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: ems-list
+
+description: List the configured ems
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: ems-id
+ description: Onap ems id
+ scope: short
+ type: string
+ - name: resource-version
+ description: Onap ems resource version
+ scope: short
+ type: string
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-ems-list
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ ems-id: $b{$.esr-ems.[*].ems-id}
+ resource-version: $b{$.esr-ems.[*].resource-version}
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-elalto.yaml
new file mode 100644
index 00000000..7f54b821
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/ems/ems-show-schema-elalto.yaml
@@ -0,0 +1,78 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: ems-show
+
+description: Show the details of configured ems
+
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: ems-id
+ description: Onap EMS unique id
+ type: uuid
+ short_option: x
+ long_option: ems-id
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: Onap ems name
+ scope: short
+ type: string
+ - name: type
+ description: Onap ems type
+ scope: short
+ type: string
+ - name: vendor
+ description: Onap ems vendor
+ scope: short
+ type: string
+ - name: version
+ description: Onap ems version
+ scope: short
+ type: string
+ - name: url
+ description: Onap ems url
+ scope: short
+ type: string
+ - name: username
+ description: Onap ems username
+ scope: long
+ type: string
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-ems-list/esr-ems/${ems-id}/esr-system-info-list/esr-system-info/${ems-id}
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ name: $b{$.system-name}
+ type: $b{$.type}
+ vendor: $b{$.vendor}
+ version: $b{$.version}
+ url: $b{$.service-url}
+ username: $b{$.user-name}
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-elalto.yaml
new file mode 100644
index 00000000..1097c92b
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-create-schema-elalto.yaml
@@ -0,0 +1,110 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: sdnc-create
+
+description: Register a SDNC in Onap
+
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: location
+ description: Onap SDNC unique id
+ type: uuid
+ short_option: x
+ long_option: location
+ is_optional: false
+ - name: sdnc-id
+ description: Onap SDNC unique id
+ type: uuid
+ short_option: y
+ long_option: sdnc-id
+ is_optional: false
+ - name: name
+ description: Onap SDNC name
+ type: string
+ short_option: b
+ long_option: name
+ is_optional: false
+ - name: type
+ description: Onap SDNC type
+ type: string
+ short_option: c
+ long_option: type
+ is_optional: false
+ - name: vendor
+ description: Onap SDNC vendor
+ type: string
+ short_option: e
+ long_option: vendor
+ is_optional: false
+ - name: sdnc-version
+ description: Onap SDNC version
+ type: string
+ short_option: q
+ long_option: sdnc-version
+ is_optional: false
+ - name: ip-address
+ description: Onap SDNC ip address
+ type: string
+ short_option: g
+ long_option: ip-address
+ is_optional: false
+ - name: port
+ description: Onap SDNC port
+ type: string
+ short_option: k
+ long_option: port
+ is_optional: false
+ - name: protocal
+ description: Onap SDNC protocal
+ type: string
+ short_option: r
+ long_option: protocal
+ is_optional: false
+ - name: username
+ description: Onap SDNC username
+ type: string
+ short_option: i
+ long_option: username
+ is_optional: false
+ - name: password
+ description: Onap SDNC password
+ type: string
+ short_option: j
+ long_option: password
+ is_optional: false
+ - name: product-name
+ description: Onap SDNC product-name
+ type: string
+ short_option: z
+ long_option: product-name
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/${sdnc-id}
+ method: PUT
+ body: '{"thirdparty-sdnc-id":"${sdnc-id}","location":"${location}","product-name":"${product-name}","esr-system-info-list":{"esr-system-info":[{"esr-system-info-id":"${sdnc-id}","system-name":"${name}","type":"${type}","vendor":"${vendor}","version":"${sdnc-version}","service-url":"","user-name":"${username}","password":"${password}","system-type":"sdnc","protocal":"${protocal}","ssl-cacert":"","ssl-insecure":"","ip-address":"${ip-address}","port":"${port}","cloud-domain":"","default-tenant":""}]}}'
+ success_codes:
+ - 201
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-elalto.yaml
new file mode 100644
index 00000000..625f8a08
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-delete-schema-elalto.yaml
@@ -0,0 +1,50 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: sdnc-delete
+
+description: Un-register a VNFM in Onap
+
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: sdnc-id
+ description: Onap sdnc unique id
+ type: string
+ short_option: x
+ long_option: sdnc-id
+ is_optional: false
+ - name: resource-version
+ description: Onap resource version
+ type: uuid
+ short_option: r
+ long_option: resource-version
+ is_optional: true
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/${sdnc-id}?resource-version=${resource-version}
+ method: DELETE
+
+ success_codes:
+ - 201
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-elalto.yaml
new file mode 100644
index 00000000..6f8b6e43
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/esr/sdnc/sdnc-list-schema-elalto.yaml
@@ -0,0 +1,60 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: sdnc-list
+
+description: List the configured sdnc
+
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: sdnc-id
+ description: Onap sdnc id
+ scope: short
+ type: string
+ - name: resource-version
+ description: Onap sdnc resource version
+ scope: short
+ type: string
+ - name: location
+ description: Onap sdnc location
+ scope: short
+ type: string
+ - name: product-name
+ description: Onap sdnc product name
+ scope: short
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/external-system/esr-thirdparty-sdnc-list
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ sdnc-id: $b{$.esr-thirdparty-sdnc.[*].thirdparty-sdnc-id}
+ location: $b{$.esr-thirdparty-sdnc.[*].location}
+ product-name: $b{$.esr-thirdparty-sdnc.[*].product-name}
+ resource-version: $b{$.esr-thirdparty-sdnc.[*].resource-version}
+
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-elalto.yaml
new file mode 100644
index 00000000..f834554d
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-elalto.yaml
@@ -0,0 +1,181 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: cloud-create
+description: Create a cloud region in Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+ - name: cloud-owner
+ description: Onap cloud owner
+ type: string
+ short_option: x
+ long_option: cloud-owner
+ is_optional: false
+ - name: region-name
+ description: Onap region name
+ type: string
+ short_option: y
+ long_option: region-name
+ is_optional: false
+ - name: cloud-type
+ description: Cloud type e.g openstack
+ type: string
+ short_option: q
+ long_option: cloud-type
+ is_optional: false
+ - name: owner-defined-type
+ description: owner defined type
+ type: string
+ short_option: r
+ long_option: owner-type
+ is_optional: false
+ - name: cloud-region-version
+ description: cloud region version e.g titanium_cloud
+ type: string
+ short_option: w
+ long_option: cloud-region-version
+ is_optional: false
+ - name: complex-name
+ description: Onap complex-name
+ type: string
+ short_option: n
+ long_option: complex-name
+ is_optional: false
+ - name: cloud-zone
+ description: Onap cloud zone
+ type: string
+ short_option: g
+ long_option: cloud-zone
+ is_optional: false
+ - name: region-name
+ description: Onap region name
+ type: string
+ short_option: y
+ long_option: region-name
+ is_optional: false
+ - name: sriov-automation
+ description: sriov automation, default is false
+ type: bool
+ short_option: S
+ long_option: sriov-automation
+ is_optional: true
+ default: false
+ - name: identity-url
+ description: Onap identity-url, updated by multicloud if multicloud is used
+ type: string
+ short_option: i
+ long_option: identity-url
+ is_optional: false
+ - name: esr-system-info-id
+ description: id for esr system (arbitrary UUID e.g 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bc8)
+ type: uuid
+ short_option: e
+ long_option: esr-id
+ is_optional: false
+ - name: service-url
+ description: service-url i.e keystone url for openstack
+ type: string
+ short_option: url
+ long_option: service-url
+ is_optional: false
+ - name: user-name
+ description: cloud user name
+ type: string
+ short_option: b
+ long_option: user-name
+ is_optional: false
+ - name: password
+ description: cloud password
+ type: string
+ short_option: j
+ long_option: password
+ is_optional: false
+ - name: system-type
+ description: system type for cloud e.g VIM
+ type: string
+ short_option: Q
+ long_option: system-type
+ is_optional: false
+ - name: ssl-insecure
+ description: to use ssl insecure or not, default is true
+ type: bool
+ short_option: z
+ long_option: ssl-insecure
+ is_optional: false
+ - name: cloud-domain
+ description: cloud domain, default is Default
+ type: string
+ short_option: c
+ long_option: cloud-domain
+ is_optional: false
+ - name: default-tenant
+ description: default cloud tenant to use
+ type: string
+ short_option: l
+ long_option: default-tenant
+ is_optional: false
+ - name: system-status
+ description: status of the cloud, default is active
+ type: string
+ short_option: k
+ long_option: system-status
+ is_optional: false
+ - name: cloud-extra-info
+ description: extra info to register cloud , generally string with region id e.g {\"openstack-region-id\":\"region-id\"}, enter as {\\"openstack-region-id\\":\\"ONAP-POD-01-Rail-07\\"} with CLI
+ type: string
+ short_option: I
+ long_option: extra-info
+ is_optional: false
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${region-name}
+ method: PUT
+ body: '{
+ "cloud-owner": "${cloud-owner}",
+ "cloud-region-id": "${region-name}",
+ "cloud-type": "${cloud-type}",
+ "owner-defined-type": "${owner-defined-type}",
+ "cloud-region-version": "${cloud-region-version}",
+ "complex-name":"${complex-name}",
+ "cloud-zone": "${cloud-zone}",
+ "sriov-automation": "${sriov-automation}",
+ "identity-url": "${identity-url}",
+ "cloud-extra-info":"${cloud-extra-info}",
+ "esr-system-info-list": {
+ "esr-system-info":[
+ {
+ "esr-system-info-id":"${esr-system-info-id}",
+ "service-url": "${service-url}",
+ "user-name":"${user-name}",
+ "password":"${password}",
+ "system-type": "${system-type}",
+ "ssl-insecure": "${ssl-insecure}",
+ "cloud-domain":"${cloud-domain}",
+ "default-tenant":"${default-tenant}",
+ "system-status":"${system-status}"
+ }]}
+ }'
+ success_codes:
+ - 201
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-delete-schema-elalto.yaml
new file mode 100644
index 00000000..e99d1915
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-delete-schema-elalto.yaml
@@ -0,0 +1,46 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: service-instance-delete
+description: Delete a service instance from ONAP
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: service-instance-id
+ description: Id of service-instance to be deleted (get from service-instance-list)
+ type: string
+ short_option: x
+ long_option: service-instance-id
+ is_optional: false
+ - name: resource-version
+ description: resource version of service instance to be deleted
+ type: uuid
+ short_option: y
+ long_option: resource-version
+ is_optional: true
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/nodes/service-instances/service-instance/${service-instance-id}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-list-schema-elalto.yaml
new file mode 100644
index 00000000..ad14698f
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/service-instance-list-schema-elalto.yaml
@@ -0,0 +1,61 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: service-instance-list
+description: List the existing service instances
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: service-instance-name
+ description: Name of service instance
+ scope: short
+ type: string
+ - name: service-instance-id
+ description: Id of service instance
+ scope: short
+ type: string
+ - name: resource-version
+ description: resource version
+ scope: short
+ type: string
+ - name: service-model-version-id
+ description: version id of service model
+ scope: short
+ type: string
+ - name: service-model-invariant-id
+ description: Invariant Id of service model
+ scope: short
+ type: string
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/nodes/service-instances/
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ service-instance-name: $b{service-instance.[*].service-instance-name}
+ service-instance-id: $b{service-instance.[*].service-instance-id}
+ resource-version: $b{service-instance.[*].resource-version}
+ service-model-version-id: $b{service-instance.[*].model-version-id}
+ service-model-invariant-id: $b{service-instance.[*].model-invariant-id}
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-delete-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-delete-schema-elalto.yaml
new file mode 100644
index 00000000..4225b041
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-delete-schema-elalto.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: vf-module-delete
+description: Delete a VF module from Onap
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: vnf-id
+ description: Id of VNF that vf module belongs to
+ type: string
+ short_option: x
+ long_option: vnf-id
+ is_optional: false
+ - name: vf-module-id
+ description: Id of the vf module
+ type: string
+ short_option: y
+ long_option: vf-module-id
+ is_optional: false
+ - name: resource-version
+ description: resource version of vf-module
+ type: uuid
+ short_option: r
+ long_option: resource-version
+ is_optional: true
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/network/generic-vnfs/generic-vnf/${vnf-id}/vf-modules/vf-module/${vf-module-id}?resource-version=${resource-version}
+ method: DELETE
+ success_codes:
+ - 204
+ - 404
diff --git a/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-list-schema-elalto.yaml b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-list-schema-elalto.yaml
new file mode 100644
index 00000000..b42ca961
--- /dev/null
+++ b/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/so-components/vf-module-list-schema-elalto.yaml
@@ -0,0 +1,60 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: vf-module-list
+description: List the VF module in a VNF instance
+
+info:
+ product: onap-elalto
+ service: aai
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: vnf-id
+ description: id of vnf instance
+ type: string
+ short_option: x
+ long_option: vnf-id
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: vf-module-name
+ description: Name of the vf-module
+ scope: short
+ type: string
+ - name: vf-module-id
+ description: Id of the vf-module
+ scope: short
+ type: string
+ - name: resource-version
+ description: resource version of the vf module
+ scope: short
+ type: string
+
+http:
+ service:
+ auth: basic
+ mode: direct
+ request:
+ uri: /aai/v16/network/generic-vnfs/generic-vnf/${vnf-id}/vf-modules
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ vf-module-name: $b{vf-module.[*].vf-module-name}
+ vf-module-id: $b{vf-module.[*].vf-module-id}
+ resource-version: $b{vf-module.[*].resource-version}
diff --git a/products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-cloud-delete-schema.yaml b/products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-cloud-delete-schema.yaml
new file mode 100644
index 00000000..c43894ed
--- /dev/null
+++ b/products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-cloud-delete-schema.yaml
@@ -0,0 +1,46 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: multicloud-cloud-delete
+description: Deletes a cloud region, can be used to directly delete cloud referenced by other resources
+
+info:
+ product: onap-elalto
+ service: multicloud
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: cloud-region
+ description: Onap Cloud region name
+ type: string
+ short_option: x
+ long_option: cloud-region
+ is_optional: false
+ - name: cloud-owner
+ description: Onap Cloud Owner name
+ type: string
+ short_option: y
+ long_option: cloud-owner
+ is_optional: false
+
+http:
+ service:
+ auth: none
+ mode: direct
+ request:
+ uri: /api/multicloud-titaniumcloud/v0/${cloud-owner}_${cloud-region}
+ method: DELETE
+ success_codes:
+ - 204
diff --git a/products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-register-cloud-schema.yaml b/products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-register-cloud-schema.yaml
new file mode 100644
index 00000000..eba73df5
--- /dev/null
+++ b/products/onap-elalto/features/multicloud/src/main/resources/open-cli-schema/multicloud-register-cloud-schema.yaml
@@ -0,0 +1,46 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: multicloud-register-cloud
+description: Register a cloud region with multicloud plugin
+
+info:
+ product: onap-elalto
+ service: multicloud
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: cloud-region
+ description: Onap Cloud region name
+ type: string
+ short_option: x
+ long_option: cloud-region
+ is_optional: false
+ - name: cloud-owner
+ description: Onap Cloud Owner name
+ type: string
+ short_option: y
+ long_option: cloud-owner
+ is_optional: false
+
+http:
+ service:
+ auth: none
+ mode: direct
+ request:
+ uri: /api/multicloud/v0/${cloud-owner}_${cloud-region}/registry
+ method: POST
+ success_codes:
+ - 202
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-moco.json
new file mode 100644
index 00000000..119f8c91
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-moco.json
@@ -0,0 +1,25 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "policy-id" : "operational.BandwidthOnDemand",
+ "content" : "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "policy-id" : "operational.BandwidthOnDemand",
+ "policy-version" : "6",
+ "content" : "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-sample.yaml
new file mode 100644
index 00000000..ebbc694c
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/create-operational-policy-schema-elalto-sample.yaml
@@ -0,0 +1,47 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: create-operational-policy
+version: onap-elalto
+samples:
+ sample1:
+ name: create-operational-policy
+ input: --policy-id operational.BandwidthOnDemand --content controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: create-operational-policy-schema-elalto-moco.json
+ output: |
+ +----------------+----------------------------------------------------+
+ |property |value |
+ +----------------+----------------------------------------------------+
+ |policy-id |operational.BandwidthOnDemand |
+ +----------------+----------------------------------------------------+
+ |policy-version |6 |
+ +----------------+----------------------------------------------------+
+ |content |controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++cont |
+ | |rolLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-484 |
+ | |3-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+uniqu |
+ | |e-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A |
+ | |+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicie |
+ | |s%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthO |
+ | |nDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D |
+ | |%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A |
+ | |++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A |
+ | |%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++ |
+ | |++timeout%3A+1200%0D%0A++++success%3A+final_succes |
+ | |s%0D%0A++++failure%3A+final_failure%0D%0A++++failu |
+ | |re_timeout%3A+final_failure_timeout%0D%0A++++failu |
+ | |re_retries%3A+final_failure_retries%0D%0A++++failu |
+ | |re_exception%3A+final_failure_exception%0D%0A++++f |
+ | |ailure_guard%3A+final_failure_guard |
+ +----------------+----------------------------------------------------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-moco.json
new file mode 100644
index 00000000..18acd236
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-moco.json
@@ -0,0 +1,22 @@
+[ {
+ "request" : {
+ "method" : "delete",
+ "uri" : "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.BandwidthOnDemand/versions/5",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "policy-id" : "operational.BandwidthOnDemand",
+ "policy-version" : "5",
+ "content" : "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-sample.yaml
new file mode 100644
index 00000000..4a31a206
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/delete-operational-policy-with-version-schema-elalto-sample.yaml
@@ -0,0 +1,47 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: delete-operational-policy-with-version
+version: onap-elalto
+samples:
+ sample1:
+ name: delete-operational-policy-with-version
+ input: --policy-id operational.BandwidthOnDemand --policy-version 5 -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: delete-operational-policy-with-version-schema-elalto-moco.json
+ output: |
+ +----------------+----------------------------------------------------+
+ |property |value |
+ +----------------+----------------------------------------------------+
+ |policy-id |operational.BandwidthOnDemand |
+ +----------------+----------------------------------------------------+
+ |policy-version |5 |
+ +----------------+----------------------------------------------------+
+ |content |controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++cont |
+ | |rolLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-484 |
+ | |3-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+uniqu |
+ | |e-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A |
+ | |+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicie |
+ | |s%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthO |
+ | |nDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D |
+ | |%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A |
+ | |++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A |
+ | |%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++ |
+ | |++timeout%3A+1200%0D%0A++++success%3A+final_succes |
+ | |s%0D%0A++++failure%3A+final_failure%0D%0A++++failu |
+ | |re_timeout%3A+final_failure_timeout%0D%0A++++failu |
+ | |re_retries%3A+final_failure_retries%0D%0A++++failu |
+ | |re_exception%3A+final_failure_exception%0D%0A++++f |
+ | |ailure_guard%3A+final_failure_guard |
+ +----------------+----------------------------------------------------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-moco.json
new file mode 100644
index 00000000..7a1557b3
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-moco.json
@@ -0,0 +1,22 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.BandwidthOnDemand/versions/latest",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "policy-id" : "operational.BandwidthOnDemand",
+ "policy-version" : "4",
+ "content" : "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-sample.yaml
new file mode 100644
index 00000000..333ea582
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-latest-version-schema-elalto-sample.yaml
@@ -0,0 +1,47 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: get-operational-policy-with-latest-version
+version: onap-elalto
+samples:
+ sample1:
+ name: get-operational-policy-with-latest-version
+ input: --policy-id operational.BandwidthOnDemand -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: get-operational-policy-with-latest-version-schema-elalto-moco.json
+ output: |
+ +----------------+----------------------------------------------------+
+ |property |value |
+ +----------------+----------------------------------------------------+
+ |policy-id |operational.BandwidthOnDemand |
+ +----------------+----------------------------------------------------+
+ |policy-version |4 |
+ +----------------+----------------------------------------------------+
+ |content |controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++cont |
+ | |rolLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-484 |
+ | |3-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+uniqu |
+ | |e-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A |
+ | |+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicie |
+ | |s%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthO |
+ | |nDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D |
+ | |%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A |
+ | |++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A |
+ | |%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++ |
+ | |++timeout%3A+1200%0D%0A++++success%3A+final_succes |
+ | |s%0D%0A++++failure%3A+final_failure%0D%0A++++failu |
+ | |re_timeout%3A+final_failure_timeout%0D%0A++++failu |
+ | |re_retries%3A+final_failure_retries%0D%0A++++failu |
+ | |re_exception%3A+final_failure_exception%0D%0A++++f |
+ | |ailure_guard%3A+final_failure_guard |
+ +----------------+----------------------------------------------------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-moco.json
new file mode 100644
index 00000000..83f95ce3
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-moco.json
@@ -0,0 +1,22 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/operational.BandwidthOnDemand/versions/4",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "policy-id" : "operational.BandwidthOnDemand",
+ "policy-version" : "4",
+ "content" : "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthOnDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-sample.yaml
new file mode 100644
index 00000000..7425bf45
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/get-operational-policy-with-version-schema-elalto-sample.yaml
@@ -0,0 +1,47 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: get-operational-policy-with-version
+version: onap-elalto
+samples:
+ sample1:
+ name: get-operational-policy-with-version
+ input: --policy-id operational.BandwidthOnDemand --policy-version 4 -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: get-operational-policy-with-version-schema-elalto-moco.json
+ output: |
+ +----------------+----------------------------------------------------+
+ |property |value |
+ +----------------+----------------------------------------------------+
+ |policy-id |operational.BandwidthOnDemand |
+ +----------------+----------------------------------------------------+
+ |policy-version |4 |
+ +----------------+----------------------------------------------------+
+ |content |controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++cont |
+ | |rolLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-484 |
+ | |3-a71a-a8c24c70c22b%0D%0A++trigger_policy%3A+uniqu |
+ | |e-policy-id-16-BandwidthOnDemand%0D%0A++timeout%3A |
+ | |+3600%0D%0A++abatement%3A+false%0D%0A%0D%0Apolicie |
+ | |s%3A%0D%0A++-+id%3A+unique-policy-id-16-BandwidthO |
+ | |nDemand%0D%0A++++name%3A+CCVPNBandwidthOnDemand%0D |
+ | |%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A |
+ | |++++recipe%3A+BandwidthOnDemand%0D%0A++++target%3A |
+ | |%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++ |
+ | |++timeout%3A+1200%0D%0A++++success%3A+final_succes |
+ | |s%0D%0A++++failure%3A+final_failure%0D%0A++++failu |
+ | |re_timeout%3A+final_failure_timeout%0D%0A++++failu |
+ | |re_retries%3A+final_failure_retries%0D%0A++++failu |
+ | |re_exception%3A+final_failure_exception%0D%0A++++f |
+ | |ailure_guard%3A+final_failure_guard |
+ +----------------+----------------------------------------------------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-moco.json
new file mode 100644
index 00000000..fed08d52
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-moco.json
@@ -0,0 +1,24 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/healthcheck",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "name" : "Policy API",
+ "url" : "self",
+ "healthy" : true,
+ "code" : 200,
+ "message" : "alive"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-sample.yaml
new file mode 100644
index 00000000..b3d44af2
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-healthcheck-schema-elalto-sample.yaml
@@ -0,0 +1,36 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: policy-healthcheck
+version: onap-elalto
+samples:
+ sample1:
+ name: policy-healthcheck
+ input: -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: policy-healthcheck-schema-elalto-moco.json
+ output: |
+ +----------+------------+
+ |property |value |
+ +----------+------------+
+ |name |Policy API |
+ +----------+------------+
+ |url |self |
+ +----------+------------+
+ |healthy |true |
+ +----------+------------+
+ |code |200 |
+ +----------+------------+
+ |message |alive |
+ +----------+------------+
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-moco.json
new file mode 100644
index 00000000..59610dc9
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-moco.json
@@ -0,0 +1,700 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/policytypes",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "tosca_definitions_version" : "tosca_simple_yaml_1_0_0",
+ "policy_types" : [ {
+ "onap.policies.Monitoring" : {
+ "properties" : { },
+ "name" : "onap.policies.Monitoring",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.policies.Root:0.0.0",
+ "metadata" : { },
+ "description" : "a base policy type for all policies that govern monitoring provision"
+ },
+ "onap.policies.Optimization" : {
+ "properties" : { },
+ "name" : "onap.policies.Optimization",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.policies.Root:0.0.0",
+ "metadata" : { },
+ "description" : "a base policy type for all policies that govern optimization"
+ },
+ "onap.policies.controlloop.Guard" : {
+ "properties" : { },
+ "name" : "onap.policies.controlloop.Guard",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.policies.Root:0.0.0",
+ "metadata" : { },
+ "description" : "Guard Policies for Control Loop Operational Policies"
+ },
+ "onap.policies.controlloop.Operational" : {
+ "properties" : { },
+ "name" : "onap.policies.controlloop.Operational",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.policies.Root:0.0.0",
+ "metadata" : { },
+ "description" : "Operational Policy for Control Loops"
+ },
+ "onap.policies.controlloop.guard.Blacklist" : {
+ "properties" : {
+ "blacklist_policy" : {
+ "name" : "blacklist_policy",
+ "type" : "map",
+ "typeVersion" : "0.0.0",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "onap.datatypes.guard.Blacklist",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.controlloop.guard.Blacklist",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.controlloop.Guard:0.0.0",
+ "metadata" : { },
+ "description" : "Supports blacklist of VNF's from performing control loop actions on."
+ },
+ "onap.policies.controlloop.guard.FrequencyLimiter" : {
+ "properties" : {
+ "frequency_policy" : {
+ "name" : "frequency_policy",
+ "type" : "map",
+ "typeVersion" : "0.0.0",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "onap.datatypes.guard.FrequencyLimiter",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.controlloop.guard.FrequencyLimiter",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.controlloop.Guard:0.0.0",
+ "metadata" : { },
+ "description" : "Supports limiting the frequency of actions being taken by a Actor."
+ },
+ "onap.policies.controlloop.guard.MinMax" : {
+ "properties" : {
+ "minmax_policy" : {
+ "name" : "minmax_policy",
+ "type" : "map",
+ "typeVersion" : "0.0.0",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "onap.datatypes.guard.MinMax",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.controlloop.guard.MinMax",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.controlloop.Guard:0.0.0",
+ "metadata" : { },
+ "description" : "Supports Min/Max number of VF Modules"
+ },
+ "onap.policies.monitoring.cdap.tca.hi.lo.app" : {
+ "properties" : {
+ "tca_policy" : {
+ "name" : "tca_policy",
+ "type" : "map",
+ "typeVersion" : "0.0.0",
+ "description" : "TCA Policy JSON",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "onap.datatypes.monitoring.tca_policy",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Monitoring:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server" : {
+ "properties" : {
+ "datafile.policy" : {
+ "name" : "datafile.policy",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "description" : "datafile Policy JSON as string",
+ "required" : false
+ },
+ "buscontroller_feed_publishing_endpoint" : {
+ "name" : "buscontroller_feed_publishing_endpoint",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "description" : "DMAAP Bus Controller feed endpoint",
+ "required" : false
+ }
+ },
+ "name" : "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server",
+ "version" : "1.0.0",
+ "derived_from" : "policy.nodes.Root:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.AffinityPolicy" : {
+ "properties" : {
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "affinityProperties" : {
+ "name" : "affinityProperties",
+ "type" : "policy.data.affinityProperties_properties",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "resources" : {
+ "name" : "resources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "applicableResources" : {
+ "name" : "applicableResources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "any", "all" ]
+ } ]
+ }
+ },
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "zone" ]
+ } ]
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.AffinityPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.DistancePolicy" : {
+ "properties" : {
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "distanceProperties" : {
+ "name" : "distanceProperties",
+ "type" : "policy.data.distanceProperties_properties",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "applicableResources" : {
+ "name" : "applicableResources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "any", "all" ]
+ } ]
+ }
+ },
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "distance_to_location" ]
+ } ]
+ }
+ },
+ "resources" : {
+ "name" : "resources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.DistancePolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.HpaPolicy" : {
+ "properties" : {
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "hpa" ]
+ } ]
+ }
+ },
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "flavorFeatures" : {
+ "name" : "flavorFeatures",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "policy.data.flavorFeatures_properties",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "resources" : {
+ "name" : "resources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.HpaPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.OptimizationPolicy" : {
+ "properties" : {
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "placement_optimization" ]
+ } ]
+ }
+ },
+ "objectiveParameter" : {
+ "name" : "objectiveParameter",
+ "type" : "policy.data.objectiveParameter_properties",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "objective" : {
+ "name" : "objective",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "minimize", "maximize" ]
+ } ]
+ }
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.OptimizationPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.PciPolicy" : {
+ "properties" : {
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "pciPolicy" ]
+ } ]
+ }
+ },
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "pciProperties" : {
+ "name" : "pciProperties",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "policy.data.pciProperties_properties",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "resources" : {
+ "name" : "resources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.PciPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.QueryPolicy" : {
+ "properties" : {
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "queryProperties" : {
+ "name" : "queryProperties",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "policy.data.queryProperties_properties",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "request_param_query" ]
+ } ]
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.QueryPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.SubscriberPolicy" : {
+ "properties" : {
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "properties" : {
+ "name" : "properties",
+ "type" : "policy.data.properties_properties",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "subscriberPolicy" ]
+ } ]
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.SubscriberPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.Vim_fit" : {
+ "properties" : {
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "resources" : {
+ "name" : "resources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "capacityProperties" : {
+ "name" : "capacityProperties",
+ "type" : "policy.data.capacityProperties_properties",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "applicableResources" : {
+ "name" : "applicableResources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "any", "all" ]
+ } ]
+ }
+ },
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "vim_fit" ]
+ } ]
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.Vim_fit",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ },
+ "onap.policies.optimization.VnfPolicy" : {
+ "properties" : {
+ "identity" : {
+ "name" : "identity",
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "required" : true
+ },
+ "policyScope" : {
+ "name" : "policyScope",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "scope where the policy is applicable",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "vnfProperties" : {
+ "name" : "vnfProperties",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "policy.data.vnfProperties_properties",
+ "typeVersion" : "0.0.0"
+ }
+ },
+ "applicableResources" : {
+ "name" : "applicableResources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "any", "all" ]
+ } ]
+ }
+ },
+ "policyType" : {
+ "name" : "policyType",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "description" : "type of a policy",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0",
+ "constraints" : [ {
+ "valid_values" : [ "vnfPolicy" ]
+ } ]
+ }
+ },
+ "resources" : {
+ "name" : "resources",
+ "type" : "list",
+ "typeVersion" : "0.0.0",
+ "required" : true,
+ "entry_schema" : {
+ "type" : "string",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.optimization.VnfPolicy",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Optimization:0.0.0",
+ "metadata" : { }
+ }
+ } ],
+ "name" : "ToscaServiceTemplateSimple",
+ "version" : "1.0.0"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-sample.yaml
new file mode 100644
index 00000000..251ac210
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-all-schema-elalto-sample.yaml
@@ -0,0 +1,291 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: policy-type-list-all
+version: onap-elalto
+samples:
+ sample1:
+ name: policy-type-list-all
+ input: -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: policy-type-list-all-schema-elalto-moco.json
+ output: |
+ +----------------------------------------------------+
+ |Type properties |
+ +----------------------------------------------------+
+ |tosca_simple_yaml_1_0_0 |
+ +----------------------------------------------------+
+ |[{"onap.policies.Monitoring":{"properties":{},"nam |
+ |e":"onap.policies.Monitoring","version":"1.0.0","d |
+ |erived_from":"tosca.policies.Root:0.0.0","metadata |
+ |":{},"description":"a base policy type for all |
+ |policies that govern monitoring provision"},"onap. |
+ |policies.Optimization":{"properties":{},"name":"on |
+ |ap.policies.Optimization","version":"1.0.0","deriv |
+ |ed_from":"tosca.policies.Root:0.0.0","metadata":{} |
+ |,"description":"a base policy type for all |
+ |policies that govern optimization"},"onap.policies |
+ |.controlloop.Guard":{"properties":{},"name":"onap. |
+ |policies.controlloop.Guard","version":"1.0.0","der |
+ |ived_from":"tosca.policies.Root:0.0.0","metadata": |
+ |{},"description":"Guard Policies for Control Loop |
+ |Operational Policies"},"onap.policies.controlloop. |
+ |Operational":{"properties":{},"name":"onap.policie |
+ |s.controlloop.Operational","version":"1.0.0","deri |
+ |ved_from":"tosca.policies.Root:0.0.0","metadata":{ |
+ |},"description":"Operational Policy for Control Lo |
+ |ops"},"onap.policies.controlloop.guard.Blacklist": |
+ |{"properties":{"blacklist_policy":{"name":"blackli |
+ |st_policy","type":"map","typeVersion":"0.0.0","req |
+ |uired":false,"entry_schema":{"type":"onap.datatype |
+ |s.guard.Blacklist","typeVersion":"0.0.0"}}},"name" |
+ |:"onap.policies.controlloop.guard.Blacklist","vers |
+ |ion":"1.0.0","derived_from":"onap.policies.control |
+ |loop.Guard:0.0.0","metadata":{},"description":"Sup |
+ |ports blacklist of VNF's from performing control |
+ |loop actions on."},"onap.policies.controlloop.guar |
+ |d.FrequencyLimiter":{"properties":{"frequency_poli |
+ |cy":{"name":"frequency_policy","type":"map","typeV |
+ |ersion":"0.0.0","required":false,"entry_schema":{" |
+ |type":"onap.datatypes.guard.FrequencyLimiter","typ |
+ |eVersion":"0.0.0"}}},"name":"onap.policies.control |
+ |loop.guard.FrequencyLimiter","version":"1.0.0","de |
+ |rived_from":"onap.policies.controlloop.Guard:0.0.0 |
+ |","metadata":{},"description":"Supports limiting |
+ |the frequency of actions being taken by a Actor."} |
+ |,"onap.policies.controlloop.guard.MinMax":{"proper |
+ |ties":{"minmax_policy":{"name":"minmax_policy","ty |
+ |pe":"map","typeVersion":"0.0.0","required":false," |
+ |entry_schema":{"type":"onap.datatypes.guard.MinMax |
+ |","typeVersion":"0.0.0"}}},"name":"onap.policies.c |
+ |ontrolloop.guard.MinMax","version":"1.0.0","derive |
+ |d_from":"onap.policies.controlloop.Guard:0.0.0","m |
+ |etadata":{},"description":"Supports Min\/Max |
+ |number of VF Modules"},"onap.policies.monitoring.c |
+ |dap.tca.hi.lo.app":{"properties":{"tca_policy":{"n |
+ |ame":"tca_policy","type":"map","typeVersion":"0.0. |
+ |0","description":"TCA Policy JSON","required":fals |
+ |e,"entry_schema":{"type":"onap.datatypes.monitorin |
+ |g.tca_policy","typeVersion":"0.0.0"}}},"name":"ona |
+ |p.policies.monitoring.cdap.tca.hi.lo.app","version |
+ |":"1.0.0","derived_from":"onap.policies.Monitoring |
+ |:0.0.0","metadata":{}},"onap.policies.monitoring.d |
+ |caegen2.collectors.datafile.datafile-app-server":{ |
+ |"properties":{"datafile.policy":{"name":"datafile. |
+ |policy","type":"string","typeVersion":"0.0.0","des |
+ |cription":"datafile Policy JSON as string","requir |
+ |ed":false},"buscontroller_feed_publishing_endpoint |
+ |":{"name":"buscontroller_feed_publishing_endpoint" |
+ |,"type":"string","typeVersion":"0.0.0","descriptio |
+ |n":"DMAAP Bus Controller feed endpoint","required" |
+ |:false}},"name":"onap.policies.monitoring.dcaegen2 |
+ |.collectors.datafile.datafile-app-server","version |
+ |":"1.0.0","derived_from":"policy.nodes.Root:0.0.0" |
+ |,"metadata":{}},"onap.policies.optimization.Affini |
+ |tyPolicy":{"properties":{"identity":{"name":"ident |
+ |ity","type":"string","typeVersion":"0.0.0","requir |
+ |ed":true},"policyScope":{"name":"policyScope","typ |
+ |e":"list","typeVersion":"0.0.0","description":"sco |
+ |pe where the policy is applicable","required":true |
+ |,"entry_schema":{"type":"string","typeVersion":"0. |
+ |0.0"}},"affinityProperties":{"name":"affinityPrope |
+ |rties","type":"policy.data.affinityProperties_prop |
+ |erties","typeVersion":"0.0.0","required":true},"re |
+ |sources":{"name":"resources","type":"list","typeVe |
+ |rsion":"0.0.0","required":true,"entry_schema":{"ty |
+ |pe":"string","typeVersion":"0.0.0"}},"applicableRe |
+ |sources":{"name":"applicableResources","type":"lis |
+ |t","typeVersion":"0.0.0","required":true,"entry_sc |
+ |hema":{"type":"string","typeVersion":"0.0.0","cons |
+ |traints":[{"valid_values":["any","all"]}]}},"polic |
+ |yType":{"name":"policyType","type":"list","typeVer |
+ |sion":"0.0.0","description":"type of a policy","re |
+ |quired":true,"entry_schema":{"type":"string","type |
+ |Version":"0.0.0","constraints":[{"valid_values":[" |
+ |zone"]}]}}},"name":"onap.policies.optimization.Aff |
+ |inityPolicy","version":"1.0.0","derived_from":"ona |
+ |p.policies.Optimization:0.0.0","metadata":{}},"ona |
+ |p.policies.optimization.DistancePolicy":{"properti |
+ |es":{"identity":{"name":"identity","type":"string" |
+ |,"typeVersion":"0.0.0","required":true},"policySco |
+ |pe":{"name":"policyScope","type":"list","typeVersi |
+ |on":"0.0.0","description":"scope where the policy |
+ |is applicable","required":true,"entry_schema":{"ty |
+ |pe":"string","typeVersion":"0.0.0"}},"distanceProp |
+ |erties":{"name":"distanceProperties","type":"polic |
+ |y.data.distanceProperties_properties","typeVersion |
+ |":"0.0.0","required":true},"applicableResources":{ |
+ |"name":"applicableResources","type":"list","typeVe |
+ |rsion":"0.0.0","required":true,"entry_schema":{"ty |
+ |pe":"string","typeVersion":"0.0.0","constraints":[ |
+ |{"valid_values":["any","all"]}]}},"policyType":{"n |
+ |ame":"policyType","type":"list","typeVersion":"0.0 |
+ |.0","description":"type of a policy","required":tr |
+ |ue,"entry_schema":{"type":"string","typeVersion":" |
+ |0.0.0","constraints":[{"valid_values":["distance_t |
+ |o_location"]}]}},"resources":{"name":"resources"," |
+ |type":"list","typeVersion":"0.0.0","required":true |
+ |,"entry_schema":{"type":"string","typeVersion":"0. |
+ |0.0"}}},"name":"onap.policies.optimization.Distanc |
+ |ePolicy","version":"1.0.0","derived_from":"onap.po |
+ |licies.Optimization:0.0.0","metadata":{}},"onap.po |
+ |licies.optimization.HpaPolicy":{"properties":{"pol |
+ |icyType":{"name":"policyType","type":"list","typeV |
+ |ersion":"0.0.0","description":"type of a policy"," |
+ |required":true,"entry_schema":{"type":"string","ty |
+ |peVersion":"0.0.0","constraints":[{"valid_values": |
+ |["hpa"]}]}},"identity":{"name":"identity","type":" |
+ |string","typeVersion":"0.0.0","required":true},"fl |
+ |avorFeatures":{"name":"flavorFeatures","type":"lis |
+ |t","typeVersion":"0.0.0","required":true,"entry_sc |
+ |hema":{"type":"policy.data.flavorFeatures_properti |
+ |es","typeVersion":"0.0.0"}},"policyScope":{"name": |
+ |"policyScope","type":"list","typeVersion":"0.0.0", |
+ |"description":"scope where the policy is applicabl |
+ |e","required":true,"entry_schema":{"type":"string" |
+ |,"typeVersion":"0.0.0"}},"resources":{"name":"reso |
+ |urces","type":"list","typeVersion":"0.0.0","requir |
+ |ed":true,"entry_schema":{"type":"string","typeVers |
+ |ion":"0.0.0"}}},"name":"onap.policies.optimization |
+ |.HpaPolicy","version":"1.0.0","derived_from":"onap |
+ |.policies.Optimization:0.0.0","metadata":{}},"onap |
+ |.policies.optimization.OptimizationPolicy":{"prope |
+ |rties":{"policyType":{"name":"policyType","type":" |
+ |list","typeVersion":"0.0.0","description":"type |
+ |of a policy","required":true,"entry_schema":{"type |
+ |":"string","typeVersion":"0.0.0","constraints":[{" |
+ |valid_values":["placement_optimization"]}]}},"obje |
+ |ctiveParameter":{"name":"objectiveParameter","type |
+ |":"policy.data.objectiveParameter_properties","typ |
+ |eVersion":"0.0.0","required":true},"identity":{"na |
+ |me":"identity","type":"string","typeVersion":"0.0. |
+ |0","required":true},"objective":{"name":"objective |
+ |","type":"list","typeVersion":"0.0.0","required":t |
+ |rue,"entry_schema":{"type":"string","typeVersion": |
+ |"0.0.0","constraints":[{"valid_values":["minimize" |
+ |,"maximize"]}]}},"policyScope":{"name":"policyScop |
+ |e","type":"list","typeVersion":"0.0.0","descriptio |
+ |n":"scope where the policy is applicable","require |
+ |d":true,"entry_schema":{"type":"string","typeVersi |
+ |on":"0.0.0"}}},"name":"onap.policies.optimization. |
+ |OptimizationPolicy","version":"1.0.0","derived_fro |
+ |m":"onap.policies.Optimization:0.0.0","metadata":{ |
+ |}},"onap.policies.optimization.PciPolicy":{"proper |
+ |ties":{"policyType":{"name":"policyType","type":"l |
+ |ist","typeVersion":"0.0.0","description":"type of |
+ |a policy","required":true,"entry_schema":{"type":" |
+ |string","typeVersion":"0.0.0","constraints":[{"val |
+ |id_values":["pciPolicy"]}]}},"identity":{"name":"i |
+ |dentity","type":"string","typeVersion":"0.0.0","re |
+ |quired":true},"pciProperties":{"name":"pciProperti |
+ |es","type":"list","typeVersion":"0.0.0","required" |
+ |:false,"entry_schema":{"type":"policy.data.pciProp |
+ |erties_properties","typeVersion":"0.0.0"}},"policy |
+ |Scope":{"name":"policyScope","type":"list","typeVe |
+ |rsion":"0.0.0","description":"scope where the |
+ |policy is applicable","required":true,"entry_schem |
+ |a":{"type":"string","typeVersion":"0.0.0"}},"resou |
+ |rces":{"name":"resources","type":"list","typeVersi |
+ |on":"0.0.0","required":true,"entry_schema":{"type" |
+ |:"string","typeVersion":"0.0.0"}}},"name":"onap.po |
+ |licies.optimization.PciPolicy","version":"1.0.0"," |
+ |derived_from":"onap.policies.Optimization:0.0.0"," |
+ |metadata":{}},"onap.policies.optimization.QueryPol |
+ |icy":{"properties":{"policyScope":{"name":"policyS |
+ |cope","type":"list","typeVersion":"0.0.0","descrip |
+ |tion":"scope where the policy is applicable","requ |
+ |ired":true,"entry_schema":{"type":"string","typeVe |
+ |rsion":"0.0.0"}},"identity":{"name":"identity","ty |
+ |pe":"string","typeVersion":"0.0.0","required":true |
+ |},"queryProperties":{"name":"queryProperties","typ |
+ |e":"list","typeVersion":"0.0.0","required":true,"e |
+ |ntry_schema":{"type":"policy.data.queryProperties_ |
+ |properties","typeVersion":"0.0.0"}},"policyType":{ |
+ |"name":"policyType","type":"list","typeVersion":"0 |
+ |.0.0","description":"type of a policy","required": |
+ |true,"entry_schema":{"type":"string","typeVersion" |
+ |:"0.0.0","constraints":[{"valid_values":["request_ |
+ |param_query"]}]}}},"name":"onap.policies.optimizat |
+ |ion.QueryPolicy","version":"1.0.0","derived_from": |
+ |"onap.policies.Optimization:0.0.0","metadata":{}}, |
+ |"onap.policies.optimization.SubscriberPolicy":{"pr |
+ |operties":{"policyScope":{"name":"policyScope","ty |
+ |pe":"list","typeVersion":"0.0.0","description":"sc |
+ |ope where the policy is applicable","required":tru |
+ |e,"entry_schema":{"type":"string","typeVersion":"0 |
+ |.0.0"}},"properties":{"name":"properties","type":" |
+ |policy.data.properties_properties","typeVersion":" |
+ |0.0.0","required":true},"identity":{"name":"identi |
+ |ty","type":"string","typeVersion":"0.0.0","require |
+ |d":true},"policyType":{"name":"policyType","type": |
+ |"list","typeVersion":"0.0.0","description":"type |
+ |of a policy","required":true,"entry_schema":{"type |
+ |":"string","typeVersion":"0.0.0","constraints":[{" |
+ |valid_values":["subscriberPolicy"]}]}}},"name":"on |
+ |ap.policies.optimization.SubscriberPolicy","versio |
+ |n":"1.0.0","derived_from":"onap.policies.Optimizat |
+ |ion:0.0.0","metadata":{}},"onap.policies.optimizat |
+ |ion.Vim_fit":{"properties":{"identity":{"name":"id |
+ |entity","type":"string","typeVersion":"0.0.0","req |
+ |uired":true},"policyScope":{"name":"policyScope"," |
+ |type":"list","typeVersion":"0.0.0","description":" |
+ |scope where the policy is applicable","required":t |
+ |rue,"entry_schema":{"type":"string","typeVersion": |
+ |"0.0.0"}},"resources":{"name":"resources","type":" |
+ |list","typeVersion":"0.0.0","required":true,"entry |
+ |_schema":{"type":"string","typeVersion":"0.0.0"}}, |
+ |"capacityProperties":{"name":"capacityProperties", |
+ |"type":"policy.data.capacityProperties_properties" |
+ |,"typeVersion":"0.0.0","required":true},"applicabl |
+ |eResources":{"name":"applicableResources","type":" |
+ |list","typeVersion":"0.0.0","required":true,"entry |
+ |_schema":{"type":"string","typeVersion":"0.0.0","c |
+ |onstraints":[{"valid_values":["any","all"]}]}},"po |
+ |licyType":{"name":"policyType","type":"list","type |
+ |Version":"0.0.0","description":"type of a policy", |
+ |"required":true,"entry_schema":{"type":"string","t |
+ |ypeVersion":"0.0.0","constraints":[{"valid_values" |
+ |:["vim_fit"]}]}}},"name":"onap.policies.optimizati |
+ |on.Vim_fit","version":"1.0.0","derived_from":"onap |
+ |.policies.Optimization:0.0.0","metadata":{}},"onap |
+ |.policies.optimization.VnfPolicy":{"properties":{" |
+ |identity":{"name":"identity","type":"string","type |
+ |Version":"0.0.0","required":true},"policyScope":{" |
+ |name":"policyScope","type":"list","typeVersion":"0 |
+ |.0.0","description":"scope where the policy is app |
+ |licable","required":true,"entry_schema":{"type":"s |
+ |tring","typeVersion":"0.0.0"}},"vnfProperties":{"n |
+ |ame":"vnfProperties","type":"list","typeVersion":" |
+ |0.0.0","required":true,"entry_schema":{"type":"pol |
+ |icy.data.vnfProperties_properties","typeVersion":" |
+ |0.0.0"}},"applicableResources":{"name":"applicable |
+ |Resources","type":"list","typeVersion":"0.0.0","re |
+ |quired":true,"entry_schema":{"type":"string","type |
+ |Version":"0.0.0","constraints":[{"valid_values":[" |
+ |any","all"]}]}},"policyType":{"name":"policyType", |
+ |"type":"list","typeVersion":"0.0.0","description": |
+ |"type of a policy","required":true,"entry_schema": |
+ |{"type":"string","typeVersion":"0.0.0","constraint |
+ |s":[{"valid_values":["vnfPolicy"]}]}},"resources": |
+ |{"name":"resources","type":"list","typeVersion":"0 |
+ |.0.0","required":true,"entry_schema":{"type":"stri |
+ |ng","typeVersion":"0.0.0"}}},"name":"onap.policies |
+ |.optimization.VnfPolicy","version":"1.0.0","derive |
+ |d_from":"onap.policies.Optimization:0.0.0","metada |
+ |ta":{}}}] |
+ +----------------------------------------------------+
+ |ToscaServiceTemplateSimple |
+ +----------------------------------------------------+
+ |1.0.0 |
+ +----------------------------------------------------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-moco.json
new file mode 100644
index 00000000..6323a4ca
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-moco.json
@@ -0,0 +1,43 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "tosca_definitions_version" : "tosca_simple_yaml_1_0_0",
+ "policy_types" : [ {
+ "onap.policies.monitoring.cdap.tca.hi.lo.app" : {
+ "properties" : {
+ "tca_policy" : {
+ "name" : "tca_policy",
+ "type" : "map",
+ "typeVersion" : "0.0.0",
+ "description" : "TCA Policy JSON",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "onap.datatypes.monitoring.tca_policy",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Monitoring:0.0.0",
+ "metadata" : { }
+ }
+ } ],
+ "name" : "ToscaServiceTemplateSimple",
+ "version" : "1.0.0"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-sample.yaml
new file mode 100644
index 00000000..08fca73f
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-schema-elalto-sample.yaml
@@ -0,0 +1,42 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: policy-type-list
+version: onap-elalto
+samples:
+ sample1:
+ name: policy-type-list
+ input: --policy-type-id onap.policies.monitoring.cdap.tca.hi.lo.app -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: policy-type-list-schema-elalto-moco.json
+ output: |
+ +----------------------------------------------------+
+ |Type properties |
+ +----------------------------------------------------+
+ |tosca_simple_yaml_1_0_0 |
+ +----------------------------------------------------+
+ |[{"onap.policies.monitoring.cdap.tca.hi.lo.app":{" |
+ |properties":{"tca_policy":{"name":"tca_policy","ty |
+ |pe":"map","typeVersion":"0.0.0","description":"TCA |
+ | Policy JSON","required":false,"entry_schema":{"ty |
+ |pe":"onap.datatypes.monitoring.tca_policy","typeVe |
+ |rsion":"0.0.0"}}},"name":"onap.policies.monitoring |
+ |.cdap.tca.hi.lo.app","version":"1.0.0","derived_fr |
+ |om":"onap.policies.Monitoring:0.0.0","metadata":{} |
+ |}}] |
+ +----------------------------------------------------+
+ |ToscaServiceTemplateSimple |
+ +----------------------------------------------------+
+ |1.0.0 |
+ +----------------------------------------------------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-moco.json
new file mode 100644
index 00000000..45b7591e
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-moco.json
@@ -0,0 +1,43 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "tosca_definitions_version" : "tosca_simple_yaml_1_0_0",
+ "policy_types" : [ {
+ "onap.policies.monitoring.cdap.tca.hi.lo.app" : {
+ "properties" : {
+ "tca_policy" : {
+ "name" : "tca_policy",
+ "type" : "map",
+ "typeVersion" : "0.0.0",
+ "description" : "TCA Policy JSON",
+ "required" : false,
+ "entry_schema" : {
+ "type" : "onap.datatypes.monitoring.tca_policy",
+ "typeVersion" : "0.0.0"
+ }
+ }
+ },
+ "name" : "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version" : "1.0.0",
+ "derived_from" : "onap.policies.Monitoring:0.0.0",
+ "metadata" : { }
+ }
+ } ],
+ "name" : "ToscaServiceTemplateSimple",
+ "version" : "1.0.0"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-sample.yaml
new file mode 100644
index 00000000..845abd67
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-type-list-with-version-schema-elalto-sample.yaml
@@ -0,0 +1,42 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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_sample_version: 1.0
+name: policy-type-list-with-version
+version: onap-elalto
+samples:
+ sample1:
+ name: policy-type-list-with-version
+ input: --policy-type-id onap.policies.monitoring.cdap.tca.hi.lo.app --version-id 1.0.0 -m https://172.16.0.82:6969 -u healthcheck -p zb!XztG34
+ moco: policy-type-list-with-version-schema-elalto-moco.json
+ output: |
+ +----------------------------------------------------+
+ |Type properties |
+ +----------------------------------------------------+
+ |tosca_simple_yaml_1_0_0 |
+ +----------------------------------------------------+
+ |[{"onap.policies.monitoring.cdap.tca.hi.lo.app":{" |
+ |properties":{"tca_policy":{"name":"tca_policy","ty |
+ |pe":"map","typeVersion":"0.0.0","description":"TCA |
+ | Policy JSON","required":false,"entry_schema":{"ty |
+ |pe":"onap.datatypes.monitoring.tca_policy","typeVe |
+ |rsion":"0.0.0"}}},"name":"onap.policies.monitoring |
+ |.cdap.tca.hi.lo.app","version":"1.0.0","derived_fr |
+ |om":"onap.policies.Monitoring:0.0.0","metadata":{} |
+ |}}] |
+ +----------------------------------------------------+
+ |ToscaServiceTemplateSimple |
+ +----------------------------------------------------+
+ |1.0.0 |
+ +----------------------------------------------------+
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/create-operational-policy-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/create-operational-policy-schema-elalto.yaml
new file mode 100644
index 00000000..8aca4449
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/create-operational-policy-schema-elalto.yaml
@@ -0,0 +1,75 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: create-operational-policy
+description: Create a new operational policy.
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: policy-id
+ description: ID
+ type: string
+ long_option: policy-id
+ short_option: x
+ is_optional: false
+ - name: content
+ description: Operational policy in encoded format
+ type: string
+ long_option: content
+ short_option: y
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: policy-id
+ description: ID of policy
+ scope: short
+ type: string
+ - name: policy-version
+ description: Version of policy
+ scope: short
+ type: string
+ - name: content
+ description: Content of policy
+ scope: short
+ type: string
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies
+ method: POST
+ body: '{"policy-id":"${policy-id}","content":"${content}"}'
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+
+ success_codes:
+ - 200
+
+ result_map:
+ policy-id: $b{$.policy-id}
+ policy-version: $b{$.policy-version}
+ content: $b{$.content} \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/delete-operational-policy-with-version-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/delete-operational-policy-with-version-schema-elalto.yaml
new file mode 100644
index 00000000..0e8a5613
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/delete-operational-policy-with-version-schema-elalto.yaml
@@ -0,0 +1,74 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: delete-operational-policy-with-version
+description: Delete a particular version of a specified operational policy.
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: policy-id
+ description: ID of policy
+ type: string
+ long_option: policy-id
+ short_option: x
+ is_optional: false
+ - name: policy-version
+ description: Version of policy
+ type: string
+ long_option: policy-version
+ short_option: y
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: policy-id
+ description: ID of policy
+ scope: short
+ type: string
+ - name: policy-version
+ description: Version of policy
+ scope: short
+ type: string
+ - name: content
+ description: Content of policy
+ scope: short
+ type: string
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/${policy-id}/versions/${policy-version}
+ method: DELETE
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+
+ success_codes:
+ - 200
+
+ result_map:
+ policy-id: $b{$.policy-id}
+ policy-version: $b{$.policy-version}
+ content: $b{$.content}
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-latest-version-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-latest-version-schema-elalto.yaml
new file mode 100644
index 00000000..9f5985ca
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-latest-version-schema-elalto.yaml
@@ -0,0 +1,68 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: get-operational-policy-with-latest-version
+description: Retrieve the latest version of a particular operational policy.
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: policy-id
+ description: ID of policy
+ type: string
+ long_option: policy-id
+ short_option: x
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: policy-id
+ description: ID of policy
+ scope: short
+ type: string
+ - name: policy-version
+ description: Version of policy
+ scope: short
+ type: string
+ - name: content
+ description: Content of policy
+ scope: short
+ type: string
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/${policy-id}/versions/latest
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+
+ success_codes:
+ - 200
+
+ result_map:
+ policy-id: $b{$.policy-id}
+ policy-version: $b{$.policy-version}
+ content: $b{$.content}
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-version-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-version-schema-elalto.yaml
new file mode 100644
index 00000000..f24bb111
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/get-operational-policy-with-version-schema-elalto.yaml
@@ -0,0 +1,74 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: get-operational-policy-with-version
+description: Retrieve one version of a particular operational policy.
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: policy-id
+ description: ID of policy
+ type: string
+ long_option: policy-id
+ short_option: x
+ is_optional: false
+ - name: policy-version
+ description: Version of policy
+ type: string
+ long_option: policy-version
+ short_option: y
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: policy-id
+ description: ID of policy
+ scope: short
+ type: string
+ - name: policy-version
+ description: Version of policy
+ scope: short
+ type: string
+ - name: content
+ description: Content of policy
+ scope: short
+ type: string
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes/onap.policies.controlloop.Operational/versions/1.0.0/policies/${policy-id}/versions/${policy-version}
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+
+ success_codes:
+ - 200
+
+ result_map:
+ policy-id: $b{$.policy-id}
+ policy-version: $b{$.policy-version}
+ content: $b{$.content}
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-healthcheck-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-healthcheck-schema-elalto.yaml
new file mode 100644
index 00000000..67937dd5
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-healthcheck-schema-elalto.yaml
@@ -0,0 +1,69 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: policy-healthcheck
+description: Returns healthy status of the Policy API component
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: portrait
+ attributes:
+ - name: name
+ description: name
+ scope: short
+ type: string
+ - name: url
+ description: url
+ scope: short
+ type: string
+ - name: healthy
+ description: health check status
+ scope: short
+ type: string
+ - name: code
+ description: response code
+ scope: short
+ type: string
+ - name: message
+ description: health check message
+ scope: short
+ type: string
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/healthcheck
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+ success_codes:
+ - 200
+
+ result_map:
+ name: $b{$.name}
+ url: $b{$.url}
+ healthy: $b{$.healthy}
+ code: $b{$.code}
+ message: $b{$.message}
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-all-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-all-schema-elalto.yaml
new file mode 100644
index 00000000..9aa77141
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-all-schema-elalto.yaml
@@ -0,0 +1,49 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: policy-type-list-all
+description: Retrieve existing policy types
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: Type properties
+ description: Policy type properties
+ scope: short
+ type: json
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+ success_codes:
+ - 200
+
+ result_map:
+ Type properties: $b{$.[*]}
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-elalto.yaml
new file mode 100644
index 00000000..a7e32765
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-schema-elalto.yaml
@@ -0,0 +1,58 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: policy-type-list
+description: Retrieve existing policy types
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: policy-type-id
+ description: Policy type ID
+ type: string
+ long_option: policy-type-id
+ short_option: x
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: Type properties
+ description: Policy type properties
+ scope: short
+ type: json
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes/${policy-type-id}
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+
+ success_codes:
+ - 200
+
+ result_map:
+ Type properties: $b{$.[*]}
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-elalto.yaml
new file mode 100644
index 00000000..5b484de8
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-type-list-with-version-schema-elalto.yaml
@@ -0,0 +1,63 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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: policy-type-list-with-version
+description: Retrieve one particular version of a policy type
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: policy-type-id
+ description: Policy type ID
+ type: string
+ long_option: policy-type-id
+ short_option: x
+ is_optional: false
+ - name: version-id
+ description: Policy type version ID
+ type: string
+ long_option: version-id
+ short_option: y
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: Type properties
+ description: Policy type properties
+ scope: short
+ type: json
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/policytypes/${policy-type-id}/versions/${version-id}
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+ success_codes:
+ - 200
+
+ result_map:
+ Type properties: $b{$.[*]}
diff --git a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
index 884cde12..40ccf5c4 100644
--- a/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
+++ b/profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java
@@ -206,10 +206,10 @@ public class OpenCommandShellCmd extends OnapCommand {
pr.setStderr(stderrStream);
OnapCommandExecutionStore.getStore().storeExectutionDebug(this.getExecutionContext(), pr.toString());
- } else {
- this.getResult().setDebugInfo(pr.toString());
}
+ this.getResult().setDebugInfo(pr.toString());
+
pr.run();
} catch (Exception e) {
throw new OnapCommandExecutionFailed(this.getName(), e);