summaryrefslogtreecommitdiffstats
path: root/esr-mgr
diff options
context:
space:
mode:
Diffstat (limited to 'esr-mgr')
-rw-r--r--esr-mgr/pom.xml19
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java2
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java4
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/Relationship.java58
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/RelationshipData.java47
-rw-r--r--esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java30
6 files changed, 138 insertions, 22 deletions
diff --git a/esr-mgr/pom.xml b/esr-mgr/pom.xml
index 33a0c1c..586c6c4 100644
--- a/esr-mgr/pom.xml
+++ b/esr-mgr/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright 2016-2017 ZTE Corporation.
+ Copyright 2016-2018 ZTE Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -129,6 +129,12 @@
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
@@ -148,17 +154,6 @@
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.9.4</version>
- <exclusions>
- <exclusion>
- <groupId>com.github.roskart.dropwizard-jaxws</groupId>
- <artifactId>dropwizard-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<!-- jersey -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java
index 10d8a9f..401a1b7 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysApp.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016-2017 ZTE Corporation.
+ * Copyright 2016-2018 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java
index dd0a136..4b64cf0 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/ExtsysAppConfiguration.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2016-2017 ZTE Corporation.
+ * Copyright 2016-2018 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,10 +19,8 @@ package org.onap.aai.esr;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import org.hibernate.validator.constraints.NotEmpty;
-import org.jvnet.hk2.annotations.Service;
import javax.validation.Valid;
-@Service
public class ExtsysAppConfiguration extends Configuration {
@NotEmpty
private String template;
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/Relationship.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/Relationship.java
new file mode 100644
index 0000000..92967d8
--- /dev/null
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/Relationship.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2018 ZTE Corporation.
+ *
+ * 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.aai.esr.entity.aai;
+
+import java.io.Serializable;
+import java.util.List;
+import com.google.gson.annotations.SerializedName;
+
+public class Relationship implements Serializable{
+
+ public static final long serialVersionUID = 1L;
+
+ @SerializedName("related-to")
+ private String relatedTo;
+
+ @SerializedName("related-link")
+ private String relatedLink;
+
+ @SerializedName("relationship-data")
+ private List<RelationshipData> relationshipData;
+
+ public String getRelatedTo() {
+ return relatedTo;
+ }
+
+ public void setRelatedTo(String relatedTo) {
+ this.relatedTo = relatedTo;
+ }
+
+ public String getRelatedLink() {
+ return relatedLink;
+ }
+
+ public void setRelatedLink(String relatedLink) {
+ this.relatedLink = relatedLink;
+ }
+
+ public List<RelationshipData> getRelationshipData() {
+ return relationshipData;
+ }
+
+ public void setRelationshipData(List<RelationshipData> relationshipData) {
+ this.relationshipData = relationshipData;
+ }
+}
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/RelationshipData.java b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/RelationshipData.java
new file mode 100644
index 0000000..96462d7
--- /dev/null
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/entity/aai/RelationshipData.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 ZTE Corporation.
+ *
+ * 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.aai.esr.entity.aai;
+
+import java.io.Serializable;
+import com.google.gson.annotations.SerializedName;
+
+public class RelationshipData implements Serializable{
+
+ public static final long serialVersionUID = 1L;
+
+ @SerializedName("relationship-key")
+ private String relationshipKey;
+
+ @SerializedName("relationship-value")
+ private String relationshipValue;
+
+ public String getRelationshipKey() {
+ return relationshipKey;
+ }
+
+ public void setRelationshipKey(String relationshipKey) {
+ this.relationshipKey = relationshipKey;
+ }
+
+ public String getRelationshipValue() {
+ return relationshipValue;
+ }
+
+ public void setRelationshipValue(String relationshipValue) {
+ this.relationshipValue = relationshipValue;
+ }
+
+}
diff --git a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java
index 43b9837..e5f6531 100644
--- a/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java
+++ b/esr-mgr/src/main/java/org/onap/aai/esr/externalservice/aai/ICloudRegion.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2017-2018 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,14 +26,14 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import org.onap.aai.esr.entity.aai.CloudRegionDetail;
+import org.onap.aai.esr.entity.aai.Relationship;
import org.onap.aai.esr.exception.ExtsysException;
-
-@Path("/cloud-regions")
+@Path("/")
public interface ICloudRegion {
@PUT
- @Path("/cloud-region/{cloud_owner}/{cloud_region_id}")
+ @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public void registerVIMService(@HeaderParam("X-TransactionId") String transactionId,
@@ -42,7 +42,7 @@ public interface ICloudRegion {
CloudRegionDetail cloudRegion) throws ExtsysException;
@GET
- @Path("/cloud-region/{cloud_owner}/{cloud_region_id}?depth=all")
+ @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}?depth=all")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public String queryVIMDetail(@HeaderParam("X-TransactionId") String transactionId,
@@ -51,6 +51,7 @@ public interface ICloudRegion {
throws ExtsysException;
@GET
+ @Path("/cloud-regions")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public String queryVIMList(@HeaderParam("X-TransactionId") String transactionId,
@@ -58,11 +59,28 @@ public interface ICloudRegion {
throws ExtsysException;
@DELETE
- @Path("/cloud-region/{cloud_owner}/{cloud_region_id}")
+ @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public void deleteVim(@HeaderParam("X-TransactionId") String transactionId,
@HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization,
@PathParam("cloud_owner") String cloud_owner, @PathParam("cloud_region_id") String cloud_region_id,
@QueryParam("resource-version") String resourceVersion) throws ExtsysException;
+
+ @PUT
+ @Path("/cloud-regions/cloud-region/{cloud_owner}/{cloud_region_id}/relationship-list/relationship")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public void putRelationship(@HeaderParam("X-TransactionId") String transactionId,
+ @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization,
+ @PathParam("cloud_owner") String cloud_owner, @PathParam("cloud_region_id") String cloud_region_id,
+ Relationship relationship) throws ExtsysException;
+
+ @GET
+ @Path("/complexes")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public String queryComplexList(@HeaderParam("X-TransactionId") String transactionId,
+ @HeaderParam("X-FromAppId") String fromApp, @HeaderParam("Authorization") String authorization)
+ throws ExtsysException;
}