diff options
author | ruilin cai <ruilin.cai@huawei.com> | 2023-03-20 14:24:26 -0400 |
---|---|---|
committer | Ruilin Cai <ruilin.cai@huawei.com> | 2023-06-16 19:05:52 +0000 |
commit | 5420b338d60f93bfe7455221942f285e76b23972 (patch) | |
tree | a60ec4234e10cbe3984ac3e7ecb2f066131c6bbb | |
parent | eabafbb72311a849c2179741e65ed6c324f0f9ca (diff) |
Add interfaces in actn-client and modified pom files
Change-Id: Ia9e905cde40e3d70777c98285f1f703b51f1decf
Signed-off-by: ruilin cai <ruilin.cai@huawei.com>
Issue-ID: INT-2213
8 files changed, 230 insertions, 5 deletions
diff --git a/actn-interface-tools/actn-client/pom.xml b/actn-interface-tools/actn-client/pom.xml index a2d0782..9450159 100644 --- a/actn-interface-tools/actn-client/pom.xml +++ b/actn-interface-tools/actn-client/pom.xml @@ -36,6 +36,8 @@ <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> <onos-yang-tools-version>2.6.1</onos-yang-tools-version> + <jackson.version>2.11.0</jackson.version> + <guava.version>22.0</guava.version> </properties> <dependencies> <dependency> @@ -43,6 +45,62 @@ <artifactId>actn-model</artifactId> <version>1.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.11.0</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${guava.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + <!-- jackson-databind --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>${jackson.version}</version> + </dependency> + + <!-- jackson-core --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>${jackson.version}</version> + </dependency> + <!-- jackson-annotations --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>${jackson.version}</version> + </dependency> + + <dependency> + <groupId>com.squareup.retrofit2</groupId> + <artifactId>retrofit</artifactId> + <version>2.7.2</version> + </dependency> + <dependency> + <groupId>com.squareup.retrofit2</groupId> + <artifactId>converter-jackson</artifactId> + <version>2.3.0</version> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>4.5.13</version> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>javax.annotation-api</artifactId> + <version>1.3.2</version> + </dependency> </dependencies> </project>
\ No newline at end of file diff --git a/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/ActnDataConverter.java b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/ActnDataConverter.java new file mode 100644 index 0000000..e6eb42d --- /dev/null +++ b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/ActnDataConverter.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START======================================================= + * Actn Interface Tools + * ================================================================================ + * Copyright (C) 2023 Huawei Canada Limited. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.onap.integration.actninterfacetools.actnclient.api; + + +import org.onosproject.yang.gen.v11.ietfethtranservice.rev20210111.ietfethtranservice.DefaultEthtSvc; +import org.onosproject.yang.gen.v11.ietfnetwork.rev20180226.ietfnetwork.networks.Network; +import org.onosproject.yang.gen.v11.ietfte.rev20210220.ietfte.tunnelsgrouping.tunnels.DefaultTunnel; +public abstract class ActnDataConverter { + CustomerOtnTopology convertActnOtnTopology(Network actnOtnTopology) throws Exception { + throw new Exception("unsupported method"); + } + CustomerOtnTunnel convertActnOtnTunnel(DefaultTunnel actnOtnTunnel) throws Exception { + throw new Exception("unsupported method"); + } + DefaultTunnel convertActnOtnTunnel(CustomerOtnTunnel customerOtnTunnel) throws Exception { + throw new Exception("unsupported method"); + } + CustomerEthService convertActnEthService(DefaultEthtSvc actnEthService) throws Exception { + throw new Exception("unsupported method"); + } + DefaultEthtSvc convertActnEthService(CustomerEthService customerEthService) throws Exception { + throw new Exception("unsupported method"); + } +} diff --git a/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/ActnInterface.java b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/ActnInterface.java new file mode 100644 index 0000000..5325807 --- /dev/null +++ b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/ActnInterface.java @@ -0,0 +1,33 @@ +/* + * ============LICENSE_START======================================================= + * Actn Interface Tools + * ================================================================================ + * Copyright (C) 2023 Huawei Canada Limited. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.onap.integration.actninterfacetools.actnclient.api; + +public interface ActnInterface { + CustomerTopology getNetworkTopology(String topologyId); + + void createOtnTunnel(CustomerOtnTunnel customerOtnTunnel); + + CustomerOtnTunnel getOtnTunnel(String actnOtnTunnelId); + + void createEthService(CustomerEthService customerEthService); + + CustomerEthService getEthService(String actnEthServiceId); +} + diff --git a/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerEthService.java b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerEthService.java new file mode 100644 index 0000000..9c4aede --- /dev/null +++ b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerEthService.java @@ -0,0 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Actn Interface Tools + * ================================================================================ + * Copyright (C) 2023 Huawei Canada Limited. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.onap.integration.actninterfacetools.actnclient.api; + +public abstract class CustomerEthService { +} diff --git a/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerOtnTopology.java b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerOtnTopology.java new file mode 100644 index 0000000..d57c0f7 --- /dev/null +++ b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerOtnTopology.java @@ -0,0 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Actn Interface Tools + * ================================================================================ + * Copyright (C) 2023 Huawei Canada Limited. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.onap.integration.actninterfacetools.actnclient.api; + +public abstract class CustomerOtnTopology extends CustomerTopology{ +} diff --git a/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerOtnTunnel.java b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerOtnTunnel.java new file mode 100644 index 0000000..4390c57 --- /dev/null +++ b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerOtnTunnel.java @@ -0,0 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Actn Interface Tools + * ================================================================================ + * Copyright (C) 2023 Huawei Canada Limited. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.onap.integration.actninterfacetools.actnclient.api; + +public abstract class CustomerOtnTunnel { +} diff --git a/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerTopology.java b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerTopology.java new file mode 100644 index 0000000..a9cd142 --- /dev/null +++ b/actn-interface-tools/actn-client/src/main/java/org/onap/integration/actninterfacetools/actnclient/api/CustomerTopology.java @@ -0,0 +1,23 @@ +/* + * ============LICENSE_START======================================================= + * Actn Interface Tools + * ================================================================================ + * Copyright (C) 2023 Huawei Canada Limited. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ +package org.onap.integration.actninterfacetools.actnclient.api; + +public abstract class CustomerTopology { +} diff --git a/actn-interface-tools/actn-model/pom.xml b/actn-interface-tools/actn-model/pom.xml index 4ec713a..a4a53b5 100644 --- a/actn-interface-tools/actn-model/pom.xml +++ b/actn-interface-tools/actn-model/pom.xml @@ -39,11 +39,11 @@ <onos-yang-tools-version>2.6.1</onos-yang-tools-version> </properties> <dependencies> - <dependency> - <groupId>org.onosproject</groupId> - <artifactId>onos-apps-yang</artifactId> - <version>1.11.0-SNAPSHOT</version> - </dependency> +<!-- <dependency>--> +<!-- <groupId>org.onosproject</groupId>--> +<!-- <artifactId>onos-apps-yang</artifactId>--> +<!-- <version>1.11.0-SNAPSHOT</version>--> +<!-- </dependency>--> <dependency> <groupId>org.onosproject</groupId> |