diff --git a/build.gradle b/build.gradle index aef023504e34f9508c38876712c96e484eb646b6..c86e5bab4c79e3dd99857539fde275bf28afbc4c 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ repositories { mavenCentral() } -version = '1.4.4-SNAPSHOT' +version = '1.4.4' group = 'net.geant.nmaas' sourceCompatibility = 1.8 diff --git a/build_and_publish.sh b/build_and_publish.sh index 9ece99d6cf65fd5383c73d162c9ae43f41551a51..de54720eef343ba6d6c53ecd44813a122a4f0cdd 100644 --- a/build_and_publish.sh +++ b/build_and_publish.sh @@ -1,6 +1,6 @@ #!/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 .. diff --git a/src/main/java/net/geant/nmaas/orchestration/DefaultAppLifecycleManager.java b/src/main/java/net/geant/nmaas/orchestration/DefaultAppLifecycleManager.java index 17338cb21aa9f7365e0e36c5c7b4ff84dcee3dcc..2f0488821a68b27e12b7607ac4d7b29337d5b4ac 100644 --- a/src/main/java/net/geant/nmaas/orchestration/DefaultAppLifecycleManager.java +++ b/src/main/java/net/geant/nmaas/orchestration/DefaultAppLifecycleManager.java @@ -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"); } } diff --git a/src/main/java/net/geant/nmaas/portal/api/market/ApplicationController.java b/src/main/java/net/geant/nmaas/portal/api/market/ApplicationController.java index 18e9010653a323365b977e0c57e3f184b6c29894..c37269ea135491c4b600fda4bb6a60081389c628 100644 --- a/src/main/java/net/geant/nmaas/portal/api/market/ApplicationController.java +++ b/src/main/java/net/geant/nmaas/portal/api/market/ApplicationController.java @@ -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); } diff --git a/src/main/java/net/geant/nmaas/portal/service/impl/ApplicationServiceImpl.java b/src/main/java/net/geant/nmaas/portal/service/impl/ApplicationServiceImpl.java index d47ea16c65115bdaaa93b198b5d8b78f9f67b12d..dcc19e55482c8e0640d7a408c4689a7a80761a20 100644 --- a/src/main/java/net/geant/nmaas/portal/service/impl/ApplicationServiceImpl.java +++ b/src/main/java/net/geant/nmaas/portal/service/impl/ApplicationServiceImpl.java @@ -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; diff --git a/src/main/resources/changelog.json b/src/main/resources/changelog.json index 9aba1b838674d3ea6ed9d289b3f293654e14a172..992e64e844df5f5f9f7fab634fc8a81a71f0d875 100644 --- a/src/main/resources/changelog.json +++ b/src/main/resources/changelog.json @@ -1,4 +1,25 @@ {"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)",