summaryrefslogtreecommitdiffstats
path: root/common/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/java')
-rw-r--r--common/src/main/java/org/onap/so/client/RestClientSSL.java14
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java1
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIObjectType.java4
3 files changed, 13 insertions, 6 deletions
diff --git a/common/src/main/java/org/onap/so/client/RestClientSSL.java b/common/src/main/java/org/onap/so/client/RestClientSSL.java
index abef417325..f5737b862c 100644
--- a/common/src/main/java/org/onap/so/client/RestClientSSL.java
+++ b/common/src/main/java/org/onap/so/client/RestClientSSL.java
@@ -33,9 +33,8 @@ import javax.ws.rs.client.ClientBuilder;
public abstract class RestClientSSL extends RestClient {
private static final String TRUE = "true";
- public static final String SSL_KEY_STORE_KEY = "javax.net.ssl.keyStore";
- public static final String SSL_KEY_STORE_PASSWORD_KEY = "javax.net.ssl.keyStorePassword";
- public static final String MSO_LOAD_SSL_CLIENT_KEYSTORE_KEY = "mso.load.ssl.client.keystore";
+ private static final String SSL_KEY_STORE_KEY = "javax.net.ssl.keyStore";
+ private static final String MSO_LOAD_SSL_CLIENT_KEYSTORE_KEY = "mso.load.ssl.client.keystore";
protected RestClientSSL(RestProperties props, Optional<URI> path) {
@@ -55,8 +54,7 @@ public abstract class RestClientSSL extends RestClient {
if (loadSSLKeyStore != null && loadSSLKeyStore.equalsIgnoreCase(TRUE)) {
KeyStore ks = getKeyStore();
if (ks != null) {
- client = ClientBuilder.newBuilder()
- .keyStore(ks, System.getProperty(RestClientSSL.SSL_KEY_STORE_PASSWORD_KEY)).build();
+ client = ClientBuilder.newBuilder().keyStore(ks, getSSlKeyStorePassword()).build();
logger.info("RestClientSSL not using default SSL context - setting keystore here.");
return client;
}
@@ -72,7 +70,7 @@ public abstract class RestClientSSL extends RestClient {
private KeyStore getKeyStore() {
KeyStore ks = null;
- char[] password = System.getProperty(RestClientSSL.SSL_KEY_STORE_PASSWORD_KEY).toCharArray();
+ char[] password = getSSlKeyStorePassword().toCharArray();
try (FileInputStream fis = new FileInputStream(
Paths.get(System.getProperty(RestClientSSL.SSL_KEY_STORE_KEY)).normalize().toString())) {
ks = KeyStore.getInstance(KeyStore.getDefaultType());
@@ -84,4 +82,8 @@ public abstract class RestClientSSL extends RestClient {
return ks;
}
+
+ private String getSSlKeyStorePassword() {
+ return System.getProperty("javax.net.ssl.keyStorePassword");
+ }
}
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java b/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java
index 923a6805aa..d02b482008 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIObjectPlurals.java
@@ -70,6 +70,7 @@ public class AAIObjectPlurals implements GraphInventoryObjectPlurals, Serializab
new AAIObjectPlurals(AAIObjectType.VSERVER.uriTemplate(), "/l-interfaces", "l-interface");
public static final AAIObjectPlurals SUB_L_INTERFACE =
new AAIObjectPlurals(AAIObjectType.L_INTERFACE.uriTemplate(), "/l-interfaces", "l-interface");
+ public static final AAIObjectPlurals PNF = new AAIObjectPlurals(AAINamespaceConstants.NETWORK, "/pnfs", "pnfs");
private final String uriTemplate;
private final String partialUri;
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java b/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java
index 2ce4d8c6bf..cd4e1125ce 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIObjectType.java
@@ -119,6 +119,10 @@ public class AAIObjectType implements GraphInventoryObjectType, Serializable {
new AAIObjectType(AAINamespaceConstants.CLOUD_INFRASTRUCTURE, Pserver.class);
public static final AAIObjectType SERVICE_SUBSCRIPTION =
new AAIObjectType(AAIObjectType.CUSTOMER.uriTemplate(), ServiceSubscription.class);
+
+ public static final AAIObjectType SERVICE_INSTANCE_METADATA = new AAIObjectType(
+ AAIObjectType.SERVICE_INSTANCE + "/metadata", org.onap.aai.domain.yang.v13.Metadata.class);
+
public static final AAIObjectType SERVICE_INSTANCE =
new AAIObjectType(AAIObjectType.SERVICE_SUBSCRIPTION.uriTemplate(), ServiceInstance.class);
public static final AAIObjectType PROJECT = new AAIObjectType(AAINamespaceConstants.BUSINESS, Project.class);