aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java5
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/BpelRestClient.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java8
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/resources/application-local.yaml10
-rw-r--r--adapters/mso-openstack-adapters/src/main/resources/application.yaml30
7 files changed, 43 insertions, 26 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
index 3ec02bfb0e..10dbbf1396 100644
--- a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
@@ -53,6 +53,11 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, R__CloudConfigMigration.class);
@JsonProperty("cloud_config")
private CloudConfig cloudConfig;
+
+ @Override
+ public boolean isUndo(){
+ return false;
+ }
@Override
public void migrate(Connection connection) throws Exception {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/BpelRestClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/BpelRestClient.java
index cf11ab94c1..6c646f3e63 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/BpelRestClient.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/BpelRestClient.java
@@ -69,7 +69,7 @@ public class BpelRestClient {
private static final String RETRY_COUNT_PROPERTY = PROPERTY_DOMAIN+".retrycount";
private static final String RETRY_INTERVAL_PROPERTY = PROPERTY_DOMAIN+".retryinterval";
private static final String RETRY_LIST_PROPERTY = PROPERTY_DOMAIN+".retrylist";
- private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+ private static final String ENCRYPTION_KEY_PROP = PROPERTY_DOMAIN + ".encryptionKey";
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, BpelRestClient.class);
@Autowired
@@ -123,7 +123,7 @@ public class BpelRestClient {
retryCount = env.getProperty(RETRY_COUNT_PROPERTY, Integer.class, DEFAULT_RETRY_COUNT);
retryInterval = env.getProperty(RETRY_INTERVAL_PROPERTY, Integer.class, DEFAULT_RETRY_INTERVAL);
setRetryList(env.getProperty(RETRY_LIST_PROPERTY, DEFAULT_RETRY_LIST));
- credentials = getEncryptedProperty(BPEL_AUTH_PROPERTY, DEFAULT_CREDENTIALS, ENCRYPTION_KEY);
+ credentials = getEncryptedProperty(BPEL_AUTH_PROPERTY, DEFAULT_CREDENTIALS, env.getProperty(ENCRYPTION_KEY_PROP));
}
public int getSocketTimeout() {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
index b47905d134..6578912b9a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java
@@ -65,14 +65,14 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA,MsoNetworkAdapterAsyncImpl.class);
private static final MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.network.bpelauth";
- private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+ private static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
private static final String NETWORK_EXCEPTION_MSG="Got a NetworkException on createNetwork: ";
private static final String CREATE_NETWORK_ERROR_MSG="Error sending createNetwork notification ";
private static final String CREATE_NETWORK_EXCEPTON_MSG="Exception sending createNetwork notification";
private static final String MSO_INTERNAL_ERROR_MSG="MsoInternalError";
@Autowired
private Environment environment;
-
+
@Autowired
private MsoNetworkAdapter networkAdapter;
/**
@@ -619,7 +619,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
Map <String, Object> reqCtx = bp.getRequestContext ();
Map <String, List <String>> headers = new HashMap <> ();
- String userCredentials = this.getEncryptedProperty (BPEL_AUTH_PROP, "", ENCRYPTION_KEY);
+ String userCredentials = this.getEncryptedProperty (BPEL_AUTH_PROP, "", ENCRYPTION_KEY_PROP);
String basicAuth = "Basic " + DatatypeConverter.printBase64Binary (userCredentials.getBytes ());
reqCtx.put (MessageContext.HTTP_REQUEST_HEADERS, headers);
@@ -635,7 +635,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
public String getEncryptedProperty(String key, String defaultValue, String encryptionKey) {
try {
- return CryptoUtils.decrypt(this.environment.getProperty(key), encryptionKey);
+ return CryptoUtils.decrypt(this.environment.getProperty(key), this.environment.getProperty(encryptionKey));
} catch (GeneralSecurityException e) {
LOGGER.debug("Exception while decrypting property: " + this.environment.getProperty(key), e);
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java
index 6383f57693..5fa21c64b1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/BpelRestClient.java
@@ -68,7 +68,7 @@ public class BpelRestClient {
private static final String RETRY_COUNT_PROPERTY = PROPERTY_DOMAIN+".retrycount";
private static final String RETRY_INTERVAL_PROPERTY = PROPERTY_DOMAIN+".retryinterval";
private static final String RETRY_LIST_PROPERTY = PROPERTY_DOMAIN+".retrylist";
- private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+ private static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, BpelRestClient.class);
/** Default socket timeout (in seconds) */
@@ -122,7 +122,7 @@ public class BpelRestClient {
retryCount = env.getProperty(RETRY_COUNT_PROPERTY, Integer.class, DEFAULT_RETRY_COUNT);
retryInterval = env.getProperty(RETRY_INTERVAL_PROPERTY, Integer.class, DEFAULT_RETRY_INTERVAL);
setRetryList(env.getProperty(RETRY_LIST_PROPERTY, DEFAULT_RETRY_LIST));
- credentials = getEncryptedProperty(BPEL_AUTH_PROPERTY, DEFAULT_CREDENTIALS, ENCRYPTION_KEY);
+ credentials = getEncryptedProperty(BPEL_AUTH_PROPERTY, DEFAULT_CREDENTIALS, ENCRYPTION_KEY_PROP);
}
public int getSocketTimeout() {
@@ -285,7 +285,7 @@ public class BpelRestClient {
private String getEncryptedProperty(String key, String defaultValue, String encryptionKey) {
if (env.getProperty(key) != null) {
try {
- return CryptoUtils.decrypt(env.getProperty(key), encryptionKey);
+ return CryptoUtils.decrypt(env.getProperty(key), env.getProperty(encryptionKey));
} catch (GeneralSecurityException e) {
LOGGER.debug("Exception while decrypting property: " + env.getProperty(key), e);
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index 95135f579d..bd0dc378d2 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -62,7 +62,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, MsoVnfAdapterAsyncImpl.class);
private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.vnf.bpelauth";
- private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+ private static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
@Autowired
private Environment environment;
@@ -640,7 +640,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
Map <String, Object> reqCtx = bp.getRequestContext ();
Map <String, List <String>> headers = new HashMap <> ();
- String userCredentials = this.getEncryptedProperty(BPEL_AUTH_PROP, "", ENCRYPTION_KEY);
+ String userCredentials = this.getEncryptedProperty(BPEL_AUTH_PROP, "", ENCRYPTION_KEY_PROP);
String basicAuth = "Basic " + DatatypeConverter.printBase64Binary (userCredentials.getBytes ());
reqCtx.put (MessageContext.HTTP_REQUEST_HEADERS, headers);
@@ -655,7 +655,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
public String getEncryptedProperty(String key, String defaultValue, String encryptionKey) {
try {
- return CryptoUtils.decrypt(this.environment.getProperty(key), encryptionKey);
+ return CryptoUtils.decrypt(this.environment.getProperty(key), this.environment.getProperty(encryptionKey));
} catch (GeneralSecurityException e) {
LOGGER.debug("Exception while decrypting property: " + this.environment.getProperty(key), e);
}
diff --git a/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml b/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
index 469744d2de..e07492e56c 100644
--- a/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
+++ b/adapters/mso-openstack-adapters/src/main/resources/application-local.yaml
@@ -7,7 +7,7 @@ org:
default_keystone_url_version: /v2.0
default_keystone_reg_ex: "/[vV][0-9]"
vnf:
- bpelauth: d95a1aa9bd4d39f3ec23cb5ed2358f5f75fa14bc8c978664355661c0858d2505
+ bpelauth: 1DDAD7A55A230BB446AA2125053EFB46455F43E48B60155E1C53236E175DFC722A6BE120F6DB390C60034C7564AEB653EA
checkRequiredParameters: true
addGetFilesOnVolumeReq: false
sockettimeout: 30
@@ -16,12 +16,13 @@ org:
retryinterval: -15
retrylist: 408,429,500,502,503,504,900
network:
- bpelauth: d95a1aa9bd4d39f3ec23cb5ed2358f5f75fa14bc8c978664355661c0858d2505
+ bpelauth: 1DDAD7A55A230BB446AA2125053EFB46455F43E48B60155E1C53236E175DFC722A6BE120F6DB390C60034C7564AEB653EA
sockettimeout: 5
connecttimeout: 5
retrycount: 5
retryinterval: -15
retrylist: 408,429,500,502,503,504,900
+ encryptionKey: aa3871669d893c7fb8abbcda31b88b4f
tenant:
default_x_aic_orm_client_string: ECOMP-MSO
default_keystone_url_version: /v2.0
@@ -66,7 +67,7 @@ mso:
# H2
spring:
datasource:
- url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
+ jdbc-url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
username: sa
password: sa
driver-class-name: org.h2.Driver
@@ -110,9 +111,6 @@ spring:
password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
role: ACTUATOR
-#Actuator
-management:
- context-path: /manage
flyway:
outOfOrder: true
diff --git a/adapters/mso-openstack-adapters/src/main/resources/application.yaml b/adapters/mso-openstack-adapters/src/main/resources/application.yaml
index 4b2cf8eb60..88099be07f 100644
--- a/adapters/mso-openstack-adapters/src/main/resources/application.yaml
+++ b/adapters/mso-openstack-adapters/src/main/resources/application.yaml
@@ -17,15 +17,10 @@ mso:
# CatalogDB
spring:
datasource:
- url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
+ jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: org.mariadb.jdbc.Driver
- dbcp2:
- initial-size: 5
- max-total: 20
- validation-query: select 1
- test-on-borrow: true
jpa:
show-sql: true
hibernate:
@@ -36,11 +31,30 @@ spring:
#Actuator
-management:
- context-path: /manage
+management:
+ endpoints:
+ web:
+ base-path: /manage
+ server:
+ servlet:
+ context-path: /manage
+ metrics:
+ se-global-registry: false
+ export:
+ prometheus:
+ enabled: true # Whether exporting of metrics to Prometheus is enabled.
+ step: 1m # Step size (i.e. reporting frequency) to use.
+
flyway:
outOfOrder: true
ignoreMissingMigrations: true
baseline-on-migrate: true
validate-on-migrate: false
+
+org:
+ onap:
+ so:
+ adapters:
+ network:
+ encryptionKey: aa3871669d893c7fb8abbcda31b88b4f