Skip to content
Snippets Groups Projects
Commit 7aa592b5 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Updated core files for version 1.4.4 and solved minor Sonar smells

parent cc85ce43
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ repositories {
mavenCentral()
}
version = '1.4.4-SNAPSHOT'
version = '1.4.4'
group = 'net.geant.nmaas'
sourceCompatibility = 1.8
......
#!/bin/bash
TAG=1.4.3
TAG=1.4.4
PACKAGE=nmaas-platform
REPOSITORY=artifactory.geant.net/nmaas-docker-local
sudo docker build --rm -t $REPOSITORY/$PACKAGE:$TAG -f ./Dockerfile ..
......
......@@ -136,7 +136,7 @@ public class DefaultAppLifecycleManager implements AppLifecycleManager {
if (termsAcceptanceStatement != null && termsAcceptanceStatement.equalsIgnoreCase("yes")) {
// OK
log.info(String.format(
"Terms were accepted: application [%s], instance id [%s], content [%s], statement [%s], by [%s], at: [%s]",
"Application usage terms were accepted: application [%s], instance id [%s], content [%s], statement [%s], by [%s], at: [%s]",
appDeployment.getAppName(),
appDeployment.getInstanceId(),
termsContent,
......@@ -154,7 +154,7 @@ public class DefaultAppLifecycleManager implements AppLifecycleManager {
);
} else {
// Terms were not accepted by they should
throw new ProcessingException("Terms acceptance is required, however terms were not accepted");
throw new ProcessingException("Application usage terms acceptance is required, however terms were not accepted");
}
}
......
......@@ -8,19 +8,36 @@ import lombok.Setter;
import lombok.extern.log4j.Log4j2;
import net.geant.nmaas.notifications.MailAttributes;
import net.geant.nmaas.notifications.NotificationEvent;
import net.geant.nmaas.portal.api.domain.*;
import net.geant.nmaas.portal.api.domain.AppRateView;
import net.geant.nmaas.portal.api.domain.ApplicationBaseView;
import net.geant.nmaas.portal.api.domain.ApplicationStateChangeRequest;
import net.geant.nmaas.portal.api.domain.ApplicationView;
import net.geant.nmaas.portal.api.domain.Id;
import net.geant.nmaas.portal.api.domain.UserView;
import net.geant.nmaas.portal.api.exception.MarketException;
import net.geant.nmaas.portal.api.exception.MissingElementException;
import net.geant.nmaas.portal.api.exception.ProcessingException;
import net.geant.nmaas.portal.exceptions.ObjectAlreadyExistsException;
import net.geant.nmaas.portal.persistent.entity.*;
import net.geant.nmaas.portal.persistent.entity.Application;
import net.geant.nmaas.portal.persistent.entity.ApplicationBase;
import net.geant.nmaas.portal.persistent.entity.ApplicationState;
import net.geant.nmaas.portal.persistent.entity.ApplicationVersion;
import net.geant.nmaas.portal.persistent.entity.Role;
import net.geant.nmaas.portal.persistent.repositories.RatingRepository;
import net.geant.nmaas.portal.service.impl.ApplicationServiceImpl;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.security.Principal;
......@@ -287,7 +304,6 @@ public class ApplicationController extends AppBaseController {
/*
* Utilities
*/
private void sendMail(Application app, ApplicationStateChangeRequest stateChangeRequest){
MailAttributes mailAttributes = MailAttributes.builder()
.mailType(stateChangeRequest.getState().getMailType())
......@@ -302,7 +318,7 @@ public class ApplicationController extends AppBaseController {
}
private void applicationBaseOwnerCheck(ApplicationBase applicationBase, Principal principal) throws MarketException {
private void applicationBaseOwnerCheck(ApplicationBase applicationBase, Principal principal) {
boolean isSystemAdmin = this.getUser(principal.getName()).getRoles().stream()
.anyMatch(userRole -> userRole.getRole().equals(Role.ROLE_SYSTEM_ADMIN));
......@@ -314,7 +330,7 @@ public class ApplicationController extends AppBaseController {
}
}
private void applicationBaseOwnerCheck(String applicationBaseName, Principal principal) throws MarketException {
private void applicationBaseOwnerCheck(String applicationBaseName, Principal principal) {
ApplicationBase applicationBase = this.appBaseService.findByName(applicationBaseName);
this.applicationBaseOwnerCheck(applicationBase, principal);
}
......
......@@ -5,7 +5,6 @@ import freemarker.template.Template;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import net.geant.nmaas.nmservice.configuration.entities.ConfigFileTemplate;
import net.geant.nmaas.portal.api.domain.AppDeploymentSpecView;
import net.geant.nmaas.portal.api.exception.MissingElementException;
import net.geant.nmaas.portal.api.exception.ProcessingException;
import net.geant.nmaas.portal.events.ApplicationListUpdatedEvent;
......@@ -14,7 +13,6 @@ import net.geant.nmaas.portal.persistent.entity.Application;
import net.geant.nmaas.portal.persistent.entity.ApplicationState;
import net.geant.nmaas.portal.persistent.repositories.ApplicationRepository;
import net.geant.nmaas.portal.service.ApplicationService;
import org.modelmapper.ModelMapper;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
......
{"versions" : [
{
"verNo" : "1.4.4",
"date" : "(2021/09/27)",
"topic" : [
{
"title" : "Enhanced support for application management",
"tags" : "[Enhancement]",
"description" : "Added possibility to set users as application owners with specific set of permissions within the Portal."
},
{
"title" : "Support for local NMaaS deployments",
"tags" : "[Enhancement]",
"description" : "Added set of improvements to support local NMaaS deployments."
},
{
"title" : "Advanced support for specifying Helm chart repositories",
"tags" : "[Enhancement]",
"description" : "Added possibility to specify the URL of Helm chart repository for each application."
}
]
},
{
"verNo" : "1.4.3",
"date" : "(2021/07/20)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment