diff options
52 files changed, 2870 insertions, 24 deletions
diff --git a/deployment/zip/pom.xml b/deployment/zip/pom.xml index 6af31ca3..e9df195a 100644 --- a/deployment/zip/pom.xml +++ b/deployment/zip/pom.xml @@ -106,9 +106,11 @@ ant.copy(todir: "${deployUnzip}/conf") { fileset(dir: - "${project.build.directory}/../../../products/target/conf/") + "${project.build.directory}/../../../products/target/conf/", + erroronmissingdir: false) fileset(dir: - "${project.build.directory}/../../../profiles/target/conf/") + "${project.build.directory}/../../../profiles/target/conf/", + erroronmissingdir: false) fileset(file: "${basedir}/src/main/release/conf/*.properties") } @@ -116,7 +118,8 @@ ant.copy(todir: "${deployUnzip}/script") { fileset(dir: - "${project.build.directory}/../../../products/target/script/") + "${project.build.directory}/../../../products/target/script/", + erroronmissingdir: false) } ant.copy(todir: diff --git a/docs/architecture.rst b/docs/architecture.rst index aef51b61..81d0195f 100644 --- a/docs/architecture.rst +++ b/docs/architecture.rst @@ -12,7 +12,7 @@ Following diagram shows the high-level architecture of OCLIP. .. image:: images/portal-cli-arch.png * **Command Registrar** : Registrar keeps track of the commands registered in OCLIP and when user invokes the command, -it identify the corresponding command and helps to invoke the corresponding command plug-in. +it identifies the corresponding command and helps to invoke the corresponding command plug-in. * **Command Discoverer** : Discoverer discovers the commands both in plug-in format and YAML and automatically register them into Registrar. @@ -27,6 +27,6 @@ them into Registrar. * **Web Command Console** : Provides the interactive command line console from web-browser -* **Cache** : Provides an persistent storage for discoverer to store the meta-data about the discovered Commands. +* **Cache** : Provides persistent storage for discoverer to store the meta-data about the discovered Commands. * **open cli schemas** : Set of command YAML provides the CLI definitions. diff --git a/docs/cmd_help.rst b/docs/cmd_help.rst index f45d0f75..a3139452 100644 --- a/docs/cmd_help.rst +++ b/docs/cmd_help.rst @@ -85,7 +85,7 @@ Error:: usage: oclip basic-logout -Provides HTTP basic authorization support. As part of logout, it invalidate authoirzation key generated while login. +Provides HTTP basic authorization support. As part of logout, it invalidates authorization key generated while login. Product: open-cli @@ -140,7 +140,7 @@ Error:: usage: oclip catalog Provides catalog discovery support to find the base api path for given service from product's catalog service. -Any product want to support catalog, it could derive from this command. Currently ONAP uses it and create +If any product wants to support catalog, it could derive from this command. Currently ONAP uses it and creates derived command by using ONAP MSB service. diff --git a/docs/cmd_help_onap_amsterdam.rst b/docs/cmd_help_onap_amsterdam.rst index 1bc0985a..c18412d7 100644 --- a/docs/cmd_help_onap_amsterdam.rst +++ b/docs/cmd_help_onap_amsterdam.rst @@ -15,8 +15,8 @@ onap-amsterdam NOTE: EOL 01-Aug-2018 -ONAP Amsterdam was the first release of ONAP product after merging open-o and open-ecomp together. -It provides platform to creating and maintaining the network services for VoLTE and vCPE types and +ONAP Amsterdam is the first release of ONAP product after merging open-o and open-ecomp. +It provides platform to create and maintain the network services for VoLTE and vCPE types. CLI provides following commands for operating ONAP with this support. [1] basic-login 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/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/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java index 75bf5d18..0c7082f8 100644 --- a/main/src/main/java/org/onap/cli/main/OnapCli.java +++ b/main/src/main/java/org/onap/cli/main/OnapCli.java @@ -43,7 +43,6 @@ import org.onap.cli.fw.registrar.OnapCommandRegistrar; import org.onap.cli.fw.store.OnapCommandExecutionStore; import org.onap.cli.fw.store.OnapCommandExecutionStore.ExecutionStoreContext; import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils; -import org.onap.cli.fw.utils.OnapCommandUtils; import org.onap.cli.main.conf.OnapCliConstants; import org.onap.cli.main.interactive.StringCompleter; import org.onap.cli.main.utils.OnapCliArgsParser; 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/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/auth/pom.xml b/products/onap-elalto/auth/pom.xml new file mode 100644 index 00000000..5841e33a --- /dev/null +++ b/products/onap-elalto/auth/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-auth</artifactId> + <name>cli/products/onap-elalto/auth</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandElalto.java b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandElalto.java new file mode 100644 index 00000000..d4b23d46 --- /dev/null +++ b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLoginCommandElalto.java @@ -0,0 +1,24 @@ +/* + * 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.cmd.auth; + +import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand; +import org.onap.cli.fw.schema.OnapCommandSchema; + +@OnapCommandSchema(schema = "basic-login-onap-elalto.yaml") +public class OnapBasicAuthLoginCommandElalto extends BasicAuthLoginCommand { +} diff --git a/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandElalto.java b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandElalto.java new file mode 100644 index 00000000..38e93f1f --- /dev/null +++ b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapBasicAuthLogoutCommandElalto.java @@ -0,0 +1,24 @@ +/* + * 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.cmd.auth; + +import org.onap.cli.fw.http.cmd.BasicAuthLogoutCommand; +import org.onap.cli.fw.schema.OnapCommandSchema; + +@OnapCommandSchema(schema = "basic-logout-onap-elalto.yaml") +public class OnapBasicAuthLogoutCommandElalto extends BasicAuthLogoutCommand { +} diff --git a/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapPolicyBasicAuthLoginCommandElalto.java b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapPolicyBasicAuthLoginCommandElalto.java new file mode 100644 index 00000000..17d7d04a --- /dev/null +++ b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapPolicyBasicAuthLoginCommandElalto.java @@ -0,0 +1,24 @@ +/* + * 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.cmd.auth; + +import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand; +import org.onap.cli.fw.schema.OnapCommandSchema; + +@OnapCommandSchema(schema = "basic-login-onap-policy-elalto.yaml") +public class OnapPolicyBasicAuthLoginCommandElalto extends BasicAuthLoginCommand { +} diff --git a/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandElalto.java b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandElalto.java new file mode 100644 index 00000000..f0babea1 --- /dev/null +++ b/products/onap-elalto/auth/src/main/java/org/onap/cli/cmd/auth/OnapSdcBasicAuthLoginCommandElalto.java @@ -0,0 +1,24 @@ +/* + * 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.cmd.auth; + +import org.onap.cli.fw.http.cmd.BasicAuthLoginCommand; +import org.onap.cli.fw.schema.OnapCommandSchema; + +@OnapCommandSchema(schema = "basic-login-onap-sdc-elalto.yaml") +public class OnapSdcBasicAuthLoginCommandElalto extends BasicAuthLoginCommand { +} diff --git a/products/onap-elalto/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand b/products/onap-elalto/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand new file mode 100644 index 00000000..0447158b --- /dev/null +++ b/products/onap-elalto/auth/src/main/resources/META-INF/services/org.onap.cli.fw.cmd.OnapCommand @@ -0,0 +1,18 @@ +# 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. + +org.onap.cli.cmd.auth.OnapBasicAuthLoginCommandElalto +org.onap.cli.cmd.auth.OnapBasicAuthLogoutCommandElalto +org.onap.cli.cmd.auth.OnapSdcBasicAuthLoginCommandElalto +org.onap.cli.cmd.auth.OnapPolicyBasicAuthLoginCommandElalto diff --git a/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-elalto.yaml b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-elalto.yaml new file mode 100644 index 00000000..ccd67f55 --- /dev/null +++ b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-elalto.yaml @@ -0,0 +1,43 @@ +# 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: basic-login + +description: ONAP basic login auth command + +info: + product: onap-elalto + service: basic-auth + type: auth + author: ONAP CLI Team onap-discuss@lists.onap.org + +results: + direction: portrait + attributes: + - name: Authorization + description: Authorization + scope: short + type: string + - name: X-TransactionId + description: X-TransactionId + scope: short + type: string + default_value: req-$s{uuid} + - name: X-FromAppId + description: X-FromAppId + scope: short + type: string + default_value: ONAP CLI diff --git a/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-policy-elalto.yaml b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-policy-elalto.yaml new file mode 100644 index 00000000..0916c202 --- /dev/null +++ b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-policy-elalto.yaml @@ -0,0 +1,45 @@ +# 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-basic-login + +description: ONAP basic login auth command + + +info: + product: onap-elalto + service: policy-basic-auth + type: auth + author: ONAP CLI Team onap-discuss@lists.onap.org + + +results: + direction: portrait + attributes: + - name: Authorization + description: Authorization + scope: short + type: string + - name: Environment + description: Environment + scope: short + type: string + default_value: TEST + - name: ClientAuth + description: Client Auth + scope: short + type: string + default_value: cHl0aG9uOnRlc3Q= diff --git a/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-elalto.yaml b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-elalto.yaml new file mode 100644 index 00000000..55006d54 --- /dev/null +++ b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-login-onap-sdc-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: sdc-basic-login + +description: ONAP basic login auth command + + +info: + product: onap-elalto + service: sdc-basic-auth + type: auth + author: ONAP CLI Team onap-discuss@lists.onap.org + + +results: + direction: portrait + attributes: + - name: Authorization + description: Authorization + scope: short + type: string + - name: X-TransactionId + description: X-TransactionId + scope: short + type: string + default_value: req-$s{uuid} + - name: X-FromAppId + description: X-FromAppId + scope: short + type: string + default_value: ONAP CLI + - name: USER_ID + description: USER_ID for sdc + scope: short + type: string + default_value: ${host-username}
\ No newline at end of file diff --git a/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-logout-onap-elalto.yaml b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-logout-onap-elalto.yaml new file mode 100644 index 00000000..76789b0d --- /dev/null +++ b/products/onap-elalto/auth/src/main/resources/open-cli-schema/basic-logout-onap-elalto.yaml @@ -0,0 +1,34 @@ +# 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: basic-logout + +description: ONAP basic logout auth command + +info: + product: onap-elalto + service: basic-auth + type: auth + author: ONAP CLI Team onap-discuss@lists.onap.org + + +parameters: + - name: host-username + is_include: false + - name: host-password + is_include: false + - name: no-auth + is_include: false
\ No newline at end of file diff --git a/products/onap-elalto/catalog/pom.xml b/products/onap-elalto/catalog/pom.xml new file mode 100644 index 00000000..4a0e99b9 --- /dev/null +++ b/products/onap-elalto/catalog/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-catalog</artifactId> + <name>cli/products/onap-elalto/catalog</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/aai/pom.xml b/products/onap-elalto/features/aai/pom.xml new file mode 100644 index 00000000..e363b2ff --- /dev/null +++ b/products/onap-elalto/features/aai/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-aai</artifactId> + <name>cli/products/onap-elalto/features/aai</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> 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/msb/pom.xml b/products/onap-elalto/features/msb/pom.xml new file mode 100644 index 00000000..c288b7d8 --- /dev/null +++ b/products/onap-elalto/features/msb/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-msb</artifactId> + <name>cli/products/onap-elalto/features/msb</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/multicloud/pom.xml b/products/onap-elalto/features/multicloud/pom.xml new file mode 100644 index 00000000..6766bd68 --- /dev/null +++ b/products/onap-elalto/features/multicloud/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-multicloud</artifactId> + <name>cli/products/onap-elalto/features/multicloud</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/policy/pom.xml b/products/onap-elalto/features/policy/pom.xml new file mode 100644 index 00000000..36c69d74 --- /dev/null +++ b/products/onap-elalto/features/policy/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-policy</artifactId> + <name>cli/products/onap-elalto/features/policy</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> 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/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/products/onap-elalto/features/pom.xml b/products/onap-elalto/features/pom.xml new file mode 100644 index 00000000..5d64a0c2 --- /dev/null +++ b/products/onap-elalto/features/pom.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright © Intel Corporation 2019 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features</artifactId> + <name>cli/products/onap-elalto/features</name> + <packaging>pom</packaging> + + <modules> + <module>aai</module> + <module>msb</module> + <module>sdc</module> + <module>policy</module> + <module>multicloud</module> + <module>vfc</module> + <module>sdnc</module> + <module>so</module> + <module>vnfsdk</module> + </modules> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>3.1.0</version> + <executions> + <execution> + <id>copy-resource-script</id> + <phase>install</phase> + <goals> + <goal>copy-resources</goal> + </goals> + + <configuration> + <outputDirectory>../../../../products/target/script</outputDirectory> + <resources> + <resource> + <directory>${project.basedir}/src/main/resources/script</directory> + <includes> + <include>*.*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + <execution> + <id>copy-resource-conf</id> + <phase>install</phase> + <goals> + <goal>copy-resources</goal> + </goals> + + <configuration> + <outputDirectory>../../../../products/target/conf</outputDirectory> + <resources> + <resource> + <directory>${project.basedir}/src/main/resources/conf</directory> + <includes> + <include>*.*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <!-- copy to products dependencies --> + <outputDirectory>../../../../products/target/lib</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/products/onap-elalto/features/sdc/pom.xml b/products/onap-elalto/features/sdc/pom.xml new file mode 100644 index 00000000..f8a51ac2 --- /dev/null +++ b/products/onap-elalto/features/sdc/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-sdc</artifactId> + <name>cli/products/onap-elalto/features/sdc</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/sdnc/pom.xml b/products/onap-elalto/features/sdnc/pom.xml new file mode 100644 index 00000000..e0821699 --- /dev/null +++ b/products/onap-elalto/features/sdnc/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-sdnc</artifactId> + <name>cli/products/onap-elalto/features/sdnc</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/so/pom.xml b/products/onap-elalto/features/so/pom.xml new file mode 100644 index 00000000..70338a0e --- /dev/null +++ b/products/onap-elalto/features/so/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-so</artifactId> + <name>cli/products/onap-elalto/features/so</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/vfc/pom.xml b/products/onap-elalto/features/vfc/pom.xml new file mode 100644 index 00000000..cfc52606 --- /dev/null +++ b/products/onap-elalto/features/vfc/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-vfc</artifactId> + <name>cli/products/onap-elalto/features/vfc</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/features/vnfsdk/pom.xml b/products/onap-elalto/features/vnfsdk/pom.xml new file mode 100644 index 00000000..635d502c --- /dev/null +++ b/products/onap-elalto/features/vnfsdk/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2018 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products-onap-elalto-features</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto-features-vnfsdk</artifactId> + <name>cli/products/onap-elalto/features/vnfsdk</name> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> diff --git a/products/onap-elalto/pom.xml b/products/onap-elalto/pom.xml new file mode 100644 index 00000000..883f5558 --- /dev/null +++ b/products/onap-elalto/pom.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.cli</groupId> + <artifactId>cli-products</artifactId> + <version>4.0.0-SNAPSHOT</version> + </parent> + + <artifactId>cli-products-onap-elalto</artifactId> + <name>cli/products/onap-elalto</name> + <packaging>pom</packaging> + + <modules> + <module>auth</module> + <module>catalog</module> + <module>features</module> + </modules> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + </artifactItems> + <!-- copy to products dependencies --> + <outputDirectory>../../../products/target/lib</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/products/pom.xml b/products/pom.xml index b7e8f651..733a4be9 100644 --- a/products/pom.xml +++ b/products/pom.xml @@ -72,6 +72,15 @@ </modules> </profile> <profile> + <id>onap-elalto</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <modules> + <module>onap-elalto</module> + </modules> + </profile> + <profile> <id>eol</id> <activation> <activeByDefault>false</activeByDefault> |