diff options
14 files changed, 34 insertions, 29 deletions
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java index 61c1eb8..2f2fe45 100755 --- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java +++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java @@ -66,8 +66,9 @@ public class AafAuthProvider implements AuthenticationProvider { sessionId = webAuthDetails.getRemoteAddress() + ":" + webAuthDetails.getSessionId();
}
}
- if ((env.getProperty(AafProperties.aafEnabled.toString(), Boolean.class, true)) && (clientCache.authenticate(name, password, sessionId) != AuthorizationResult.Authenticated)) {
- return null;
+ if ((env.getProperty(AafProperties.aafEnabled.toString(), Boolean.class, true))
+ && (clientCache.authenticate(name, password, sessionId) != AuthorizationResult.Authenticated)) {
+ return null;
}
return new UsernamePasswordAuthenticationToken(name, password, new ArrayList<>());
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java index 1ce581a..72ea552 100755 --- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java +++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java @@ -139,11 +139,11 @@ public class AafClientCache { }
permissions = cache.get(getCacheKey(auth));
if ((permissions == null) && (!auth.get("password").equals(""))) {
- permissions = getPermissionsFromAaf(auth);
- if (permissions != null) {
- cache.put(getCacheKey(auth), permissions);
- }
+ permissions = getPermissionsFromAaf(auth);
+ if (permissions != null) {
+ cache.put(getCacheKey(auth), permissions);
}
+ }
}
return permissions;
}
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java index 02d8886..788cf60 100644 --- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java +++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java @@ -69,7 +69,7 @@ public class CmsoClientFilters implements ClientRequestFilter, ClientResponseFil String transactionId = (String) headers.getFirst(MessageHeaders.HeadersEnum.TransactionID.toString()); String mdcId = MDC.get(MDC_KEY_REQUEST_ID); if ((transactionId == null || transactionId.equals("")) && (mdcId != null)) { - headers.add(HeadersEnum.TransactionID.toString(), mdcId); + headers.add(HeadersEnum.TransactionID.toString(), mdcId); } headers.add(HeadersEnum.FromAppID.toString(), appId); } diff --git a/cmso-robot/docker/Dockerfile b/cmso-robot/docker/Dockerfile index 70f0578..c91692c 100644 --- a/cmso-robot/docker/Dockerfile +++ b/cmso-robot/docker/Dockerfile @@ -13,14 +13,14 @@ ENV http_proxy=$HTTP_PROXY ENV https_proxy=$HTTPS_PROXY RUN test -n "$" && echo "Acquire::Proxy \"http://$http_proxy\";" > /etc/apt/apt.conf.d/02proxy || true && \ - apt-get update && \ - apt-get install -y software-properties-common vim && \ - add-apt-repository ppa:jonathonf/python-3.6 && \ - apt-get update && \ - apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv && \ - python3.6 -m pip install pip --upgrade && \ - python3.6 -m pip install wheel && \ - apt-get install \ +apt-get update && \ +apt-get install -y software-properties-common vim && \ +add-apt-repository ppa:deadsnakes/ppa && \ +apt-get update && \ +apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv && \ +python3.6 -m pip install pip --upgrade && \ +python3.6 -m pip install wheel && \ +apt-get install \ --no-install-recommends \ --assume-yes \ chromium-browser \ diff --git a/cmso-service/src/main/java/org/onap/observations/Mdc.java b/cmso-service/src/main/java/org/onap/observations/Mdc.java index d6e729e..3885a52 100644 --- a/cmso-service/src/main/java/org/onap/observations/Mdc.java +++ b/cmso-service/src/main/java/org/onap/observations/Mdc.java @@ -175,7 +175,7 @@ public class Mdc { * @return the map */ public static Map<String, String> save() { - return MDC.getCopyOfContextMap(); + return MDC.getCopyOfContextMap(); } /** diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/common/Mdc.java b/cmso-service/src/main/java/org/onap/optf/cmso/common/Mdc.java index 503f42c..5e2ebcf 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/common/Mdc.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/common/Mdc.java @@ -40,6 +40,7 @@ import static com.att.eelf.configuration.Configuration.MDC_RESPONSE_DESC; import static com.att.eelf.configuration.Configuration.MDC_STATUS_CODE;
import static com.att.eelf.configuration.Configuration.MDC_TARGET_ENTITY;
import static com.att.eelf.configuration.Configuration.MDC_TARGET_SERVICE_NAME;
+
import com.att.eelf.utils.Stopwatch;
import java.net.URI;
import java.util.Date;
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/CmsoClient.java b/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/CmsoClient.java index f6197a3..9dfffb4 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/CmsoClient.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/CmsoClient.java @@ -181,7 +181,8 @@ public class CmsoClient { updateScheduleStatus(cmSchedule, schedule);
}
- private void processScheduleResponse200(ChangeManagementSchedule cmSchedule, Schedule schedule, Response response){
+ private void processScheduleResponse200(ChangeManagementSchedule cmSchedule, Schedule schedule,
+ Response response) {
JsonNode node = response.readEntity(JsonNode.class);
log.info("Message returned from VID callback: " + node.toString());
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/DispatchJob.java b/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/DispatchJob.java index f663240..ebbc178 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/DispatchJob.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/dispatcher/DispatchJob.java @@ -140,8 +140,10 @@ public class DispatchJob { // Validate ticket is still active with tm
//
// TODO
- if (cmSchedule.getTmChangeId() != null && !cmSchedule.getTmChangeId().equals("") && !isChangeApproved(schedule, cmSchedule, scheduleImmediateEnabled)) {
- return false;
+ if (cmSchedule.getTmChangeId() != null
+ && !cmSchedule.getTmChangeId().equals("")
+ && !isChangeApproved(schedule, cmSchedule, scheduleImmediateEnabled)) {
+ return false;
}
// *******************************************************************
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java b/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java index 804fe68..192239b 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/filters/CmsoClientFilters.java @@ -73,7 +73,7 @@ public class CmsoClientFilters implements ClientRequestFilter, ClientResponseFil String transactionId = (String) headers.getFirst(MessageHeaders.HeadersEnum.TransactionID.toString()); String mdcId = MDC.get(MDC_KEY_REQUEST_ID); if ((transactionId == null || "".equals(transactionId)) && (mdcId != null)) { - headers.add(HeadersEnum.TransactionID.toString(), mdcId); + headers.add(HeadersEnum.TransactionID.toString(), mdcId); } headers.add(HeadersEnum.FromAppID.toString(), appId); } diff --git a/cmso-sonar/docker/integration/cmso-optimizer/etc/startJacocoService.sh b/cmso-sonar/docker/integration/cmso-optimizer/etc/startJacocoService.sh index b8b8d3b..b4be6b1 100644..100755 --- a/cmso-sonar/docker/integration/cmso-optimizer/etc/startJacocoService.sh +++ b/cmso-sonar/docker/integration/cmso-optimizer/etc/startJacocoService.sh @@ -2,7 +2,7 @@ apt update apt install wget apt install unzip --assume-yes -wget http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar +wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar unzip org.jacoco.agent-0.8.2.jar cp org.jacoco.agent-0.8.2/jacocoagent.jar . ls -l diff --git a/cmso-sonar/docker/integration/cmso-service/etc/startJacocoService.sh b/cmso-sonar/docker/integration/cmso-service/etc/startJacocoService.sh index 5d65a7f..f049e5c 100644..100755 --- a/cmso-sonar/docker/integration/cmso-service/etc/startJacocoService.sh +++ b/cmso-sonar/docker/integration/cmso-service/etc/startJacocoService.sh @@ -2,7 +2,7 @@ apt update apt install wget apt install unzip --assume-yes -wget http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar +wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar unzip org.jacoco.agent-0.8.2.jar cp org.jacoco.agent-0.8.2/jacocoagent.jar . ls -l diff --git a/cmso-sonar/docker/integration/cmso-ticketmgt/etc/startJacocoService.sh b/cmso-sonar/docker/integration/cmso-ticketmgt/etc/startJacocoService.sh index ef087fe..1331bcf 100644..100755 --- a/cmso-sonar/docker/integration/cmso-ticketmgt/etc/startJacocoService.sh +++ b/cmso-sonar/docker/integration/cmso-ticketmgt/etc/startJacocoService.sh @@ -2,7 +2,7 @@ apt update apt install wget apt install unzip --assume-yes -wget http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar +wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar unzip org.jacoco.agent-0.8.2.jar cp org.jacoco.agent-0.8.2/jacocoagent.jar . ls -l diff --git a/cmso-sonar/docker/integration/cmso-topology/etc/startJacocoService.sh b/cmso-sonar/docker/integration/cmso-topology/etc/startJacocoService.sh index 0717d68..8c7df11 100644..100755 --- a/cmso-sonar/docker/integration/cmso-topology/etc/startJacocoService.sh +++ b/cmso-sonar/docker/integration/cmso-topology/etc/startJacocoService.sh @@ -2,7 +2,7 @@ apt update apt install wget apt install unzip --assume-yes -wget http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar +wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2.jar unzip org.jacoco.agent-0.8.2.jar cp org.jacoco.agent-0.8.2/jacocoagent.jar . ls -l diff --git a/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java b/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java index 67894eb..feb20d6 100755 --- a/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java +++ b/cmso-topology/src/main/java/org/onap/optf/cmso/aaf/AafClientCache.java @@ -138,11 +138,11 @@ public class AafClientCache { cacheAge = now;
}
permissions = cache.get(getCacheKey(auth));
- if ((permissions == null)&&(!auth.get("password").equals(""))) {
- permissions = getPermissionsFromAaf(auth);
- if (permissions != null) {
- cache.put(getCacheKey(auth), permissions);
- }
+ if ((permissions == null) && (!auth.get("password").equals(""))) {
+ permissions = getPermissionsFromAaf(auth);
+ if (permissions != null) {
+ cache.put(getCacheKey(auth), permissions);
+ }
}
}
return permissions;
|