diff options
Diffstat (limited to 'aai-service')
-rw-r--r-- | aai-service/features/ccsdk-aai-service/pom.xml | 95 | ||||
-rwxr-xr-x | aai-service/features/features-aai-service/pom.xml | 46 | ||||
-rwxr-xr-x | aai-service/features/pom.xml | 6 | ||||
-rwxr-xr-x | aai-service/installer/pom.xml | 6 | ||||
-rwxr-xr-x | aai-service/pom.xml | 6 | ||||
-rwxr-xr-x | aai-service/provider/pom.xml | 307 | ||||
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java | 10 | ||||
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java | 3 |
8 files changed, 239 insertions, 240 deletions
diff --git a/aai-service/features/ccsdk-aai-service/pom.xml b/aai-service/features/ccsdk-aai-service/pom.xml index e7460112b..a633b2476 100644 --- a/aai-service/features/ccsdk-aai-service/pom.xml +++ b/aai-service/features/ccsdk-aai-service/pom.xml @@ -1,57 +1,42 @@ <?xml version="1.0" encoding="UTF-8"?> -<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.ccsdk.parent</groupId> - <artifactId>single-feature-parent</artifactId> - <version>1.2.0-SNAPSHOT</version> - <relativePath /> - </parent> - - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>ccsdk-aai-service</artifactId> - <version>0.4.0-SNAPSHOT</version> - <packaging>feature</packaging> - - <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> - - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>mdsal-artifacts</artifactId> - <version>${odl.mdsal.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - <dependency> - <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>mdsal-model-artifacts</artifactId> - <version>${odl.mdsal.model.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>ccsdk-sli</artifactId> - <type>xml</type> - <classifier>features</classifier> - </dependency> - - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>aai-service-provider</artifactId> - <version>${project.version}</version> - </dependency> - - - </dependencies> +<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.ccsdk.parent</groupId> + <artifactId>single-feature-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>ccsdk-aai-service</artifactId> + <version>0.4.1-SNAPSHOT</version> + <packaging>feature</packaging> + + <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> + + + <properties> + <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version> + </properties> + + <dependencies> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>ccsdk-sli</artifactId> + <version>${ccsdk.sli.core.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>aai-service-provider</artifactId> + <version>${project.version}</version> + </dependency> + + + </dependencies> </project> diff --git a/aai-service/features/features-aai-service/pom.xml b/aai-service/features/features-aai-service/pom.xml index 742e006db..3e4748a99 100755 --- a/aai-service/features/features-aai-service/pom.xml +++ b/aai-service/features/features-aai-service/pom.xml @@ -1,29 +1,33 @@ <?xml version="1.0" encoding="UTF-8"?> <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> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>feature-repo-parent</artifactId> - <version>1.2.0-SNAPSHOT</version> - <relativePath/> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>feature-repo-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>features-aai-service</artifactId> - <version>0.4.0-SNAPSHOT</version> - <packaging>feature</packaging> + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>features-aai-service</artifactId> + <version>0.4.1-SNAPSHOT</version> + <packaging>feature</packaging> - <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> + <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>ccsdk-aai-service</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>features</classifier> - </dependency> + <properties> + <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version> + </properties> - </dependencies> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>ccsdk-aai-service</artifactId> + <version>${project.version}</version> + <type>xml</type> + <classifier>features</classifier> + </dependency> + + </dependencies> </project> diff --git a/aai-service/features/pom.xml b/aai-service/features/pom.xml index 787c56234..1c34eb4a3 100755 --- a/aai-service/features/pom.xml +++ b/aai-service/features/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.2.0-SNAPSHOT</version> - <relativePath /> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.adaptors</groupId> <artifactId>aai-service-features</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> diff --git a/aai-service/installer/pom.xml b/aai-service/installer/pom.xml index dbc793fc8..c480fb38a 100755 --- a/aai-service/installer/pom.xml +++ b/aai-service/installer/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.2.0-SNAPSHOT</version> - <relativePath /> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.adaptors</groupId> <artifactId>aai-service-installer</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> diff --git a/aai-service/pom.xml b/aai-service/pom.xml index 7b1d5535a..b28dea668 100755 --- a/aai-service/pom.xml +++ b/aai-service/pom.xml @@ -5,13 +5,13 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.2.0-SNAPSHOT</version> - <relativePath /> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.adaptors</groupId> <artifactId>aai-service</artifactId> - <version>0.4.0-SNAPSHOT</version> + <version>0.4.1-SNAPSHOT</version> <packaging>pom</packaging> <name>ccsdk-sli-adaptors :: aai-service</name> diff --git a/aai-service/provider/pom.xml b/aai-service/provider/pom.xml index 441143263..cbf161d6f 100755 --- a/aai-service/provider/pom.xml +++ b/aai-service/provider/pom.xml @@ -1,157 +1,168 @@ <?xml version="1.0" encoding="UTF-8"?> -<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> +<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.ccsdk.parent</groupId> - <artifactId>binding-parent</artifactId> - <version>1.2.0-SNAPSHOT</version> - <relativePath /> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath/> + </parent> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>aai-service-provider</artifactId> - <version>0.4.0-SNAPSHOT</version> - <packaging>bundle</packaging> + <groupId>org.onap.ccsdk.sli.adaptors</groupId> + <artifactId>aai-service-provider</artifactId> + <version>0.4.1-SNAPSHOT</version> + <packaging>bundle</packaging> - <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> - <url>http://maven.apache.org</url> + <name>ccsdk-sli-adaptors :: aai-service :: ${project.artifactId}</name> + <url>http://maven.apache.org</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <ccsdk.sli.adaptors.version>${project.version}</ccsdk.sli.adaptors.version> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-core-artifacts</artifactId> + <version>${ccsdk.sli.core.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-common</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>sli-provider</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>utils-provider</artifactId> - <version>${sdnctl.sli.version}</version> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.core</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl-over-slf4j</artifactId> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-client</artifactId> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-core</artifactId> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - <version>${apache.httpcomponents.core.version}</version> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>${apache.httpcomponents.client.version}</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.module</groupId> - <artifactId>jackson-module-jaxb-annotations</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-common</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>utils-provider</artifactId> + <version>${sdnctl.sli.version}</version> + </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + </dependency> + <dependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-client</artifactId> + </dependency> + <dependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + <version>${apache.httpcomponents.core.version}</version> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>${apache.httpcomponents.client.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.module</groupId> + <artifactId>jackson-module-jaxb-annotations</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </dependency> - <dependency> - <groupId>org.jsoup</groupId> - <artifactId>jsoup</artifactId> - <version>1.8.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>4.3.5.RELEASE</version> - <scope>test</scope> - </dependency> - </dependencies> + <dependency> + <groupId>org.jsoup</groupId> + <artifactId>jsoup</artifactId> + <version>1.8.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>4.3.5.RELEASE</version> + <scope>test</scope> + </dependency> + </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.jvnet.jaxb2.maven2</groupId> - <artifactId>maven-jaxb2-plugin</artifactId> - <version>0.13.1</version> - <executions> - <execution> - <id>gen-xjc</id> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - <configuration> - <schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory> - <schemaIncludes> - <value>aai_schema_v14.xsd</value> - </schemaIncludes> - <bindingIncludes> - <include>aai-schema-bindings.xjb</include> - </bindingIncludes> - <generateDirectory>${project.build.directory}/generated-sources/main/java</generateDirectory> - <generatePackage>org.onap.aai.inventory.v14</generatePackage> - <extension>true</extension> - <args> - <arg>-Xannotate</arg> - </args> - <plugins> - <plugin> - <groupId>org.jvnet.jaxb2_commons</groupId> - <artifactId>jaxb2-basics-annotate</artifactId> - <version>0.6.4</version> - </plugin> - </plugins> - </configuration> - </plugin> - </plugins> - </build> + <build> + <plugins> + <plugin> + <groupId>org.jvnet.jaxb2.maven2</groupId> + <artifactId>maven-jaxb2-plugin</artifactId> + <version>0.13.1</version> + <executions> + <execution> + <id>gen-xjc</id> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + <configuration> + <schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory> + <schemaIncludes> + <value>aai_schema_v14.xsd</value> + </schemaIncludes> + <bindingIncludes> + <include>aai-schema-bindings.xjb</include> + </bindingIncludes> + <generateDirectory>${project.build.directory}/generated-sources/main/java</generateDirectory> + <generatePackage>org.onap.aai.inventory.v14</generatePackage> + <extension>true</extension> + <args> + <arg>-Xannotate</arg> + </args> + <plugins> + <plugin> + <groupId>org.jvnet.jaxb2_commons</groupId> + <artifactId>jaxb2-basics-annotate</artifactId> + <version>0.6.4</version> + </plugin> + </plugins> + </configuration> + </plugin> + </plugins> + </build> </project> diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java index cf1392f67..a3aecda14 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java @@ -44,7 +44,6 @@ import java.security.NoSuchAlgorithmException; import java.text.SimpleDateFormat; import java.util.Properties; -import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; @@ -82,6 +81,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { private String userPassword; private final String applicationId; private static final String HTTP_URL_CONNECTION_RESULT="HttpURLConnection result: {} : {}"; + private static final String ENTRY_DOESNT_EXIST="Entry does not exist."; /** * class Constructor @@ -281,7 +281,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, responseMessage, mapper.writeValueAsString(response)); } } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) { - LOGwriteEndingTrace(responseCode, responseMessage, "Entry does not exist."); + LOGwriteEndingTrace(responseCode, responseMessage, ENTRY_DOESNT_EXIST); ErrorResponse errorresponse = null; try { errorresponse = mapper.readValue(reader, ErrorResponse.class); @@ -289,7 +289,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { errorresponse = new ErrorResponse(); RequestError requestError = new RequestError(); ServiceException serviceException = new ServiceException(); - serviceException.setText("Entry does not exist."); + serviceException.setText(ENTRY_DOESNT_EXIST); requestError.setServiceException(serviceException); errorresponse.setRequestError(requestError ); } @@ -501,7 +501,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { LOGwriteEndingTrace(responseCode, responseMessage, stringBuilder.toString()); response = true; } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) { - LOGwriteEndingTrace(responseCode, responseMessage, "Entry does not exist."); + LOGwriteEndingTrace(responseCode, responseMessage, ENTRY_DOESNT_EXIST); response = false; } else { ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class); @@ -574,7 +574,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { response = mapper.readValue(reader, clas); LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response)); } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) { - LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist."); + LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", ENTRY_DOESNT_EXIST); return response; } else { BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) ); diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java index 82df69818..c66ae06f4 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIRequest.java @@ -433,8 +433,7 @@ public abstract class AAIRequest { if(clazz == null) { return null; } - GenericRequest request = new GenericRequest(clazz); - return request; + return new GenericRequest(clazz); } public static Map<String, String> splitQuery(String query) throws UnsupportedEncodingException { |