diff --git a/src/main/java/net/geant/nmaas/orchestration/api/AppLifecycleManagerRestController.java b/src/main/java/net/geant/nmaas/orchestration/api/AppLifecycleManagerRestController.java index 983ae294c91f0fee9b96639db466e91c47905c80..beccf2ed97fdde74a3c2b7bb6b17af52468fe1f9 100644 --- a/src/main/java/net/geant/nmaas/orchestration/api/AppLifecycleManagerRestController.java +++ b/src/main/java/net/geant/nmaas/orchestration/api/AppLifecycleManagerRestController.java @@ -109,22 +109,5 @@ public class AppLifecycleManagerRestController { return ex.getMessage(); } - /** - * @param deploymentId unique identifier of the deployed user application - */ - @PutMapping("/{deploymentId}/scale-down") - public ResponseEntity<Void> scaleDownApp(@PathVariable String deploymentId) { - lifecycleManager.scaleDown(new Identifier(deploymentId)); - return ResponseEntity.ok().build(); - } - - /** - * @param deploymentId unique identifier of the deployed user application - */ - @PutMapping("/{deploymentId}/scale-up") - public ResponseEntity<Void> scaleUpApp(@PathVariable String deploymentId) { - lifecycleManager.scaleUp(new Identifier(deploymentId)); - return ResponseEntity.ok().build(); - } } diff --git a/src/main/java/net/geant/nmaas/portal/api/market/AppInstanceController.java b/src/main/java/net/geant/nmaas/portal/api/market/AppInstanceController.java index 81365d8a6ed7c899f34f4ee9eeff9ac7f03351a2..0e1299837301b3008a46f2eadc01e1320d339a2a 100644 --- a/src/main/java/net/geant/nmaas/portal/api/market/AppInstanceController.java +++ b/src/main/java/net/geant/nmaas/portal/api/market/AppInstanceController.java @@ -48,17 +48,11 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationEventPublisher; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; +import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -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.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.lang.reflect.Field; import java.security.Principal; @@ -763,5 +757,22 @@ public class AppInstanceController extends AppBaseController { } return pageable; } + /** + * @param deploymentId unique identifier of the deployed user application + */ + @PutMapping("/{deploymentId}/scale-down") + public ResponseEntity<Void> scaleDownApp(@PathVariable String deploymentId) { + appLifecycleManager.scaleDown(new Identifier(deploymentId)); + return ResponseEntity.ok().build(); + } + + /** + * @param deploymentId unique identifier of the deployed user application + */ + @PutMapping("/{deploymentId}/scale-up") + public ResponseEntity<Void> scaleUpApp(@PathVariable String deploymentId) { + appLifecycleManager.scaleUp(new Identifier(deploymentId)); + return ResponseEntity.ok().build(); + } } diff --git a/src/test/shell/data/i18n/de.json b/src/test/shell/data/i18n/de.json index 3ffdc078875ee593fa55b1a41b02ef5e4fcd45d6..44301c83bc7099100bdc69c426b620baa6455811 100644 --- a/src/test/shell/data/i18n/de.json +++ b/src/test/shell/data/i18n/de.json @@ -314,7 +314,9 @@ "RATING": "Rating", "POPULAR": "Popularity", "DATE" : "Date added" - } + }, + "SCALE_UP": "Fortsetzen", + "SCALE_DOWN": "Pause" }, "MONITOR": { "TITLE": "Überwachungsservice", diff --git a/src/test/shell/data/i18n/en.json b/src/test/shell/data/i18n/en.json index cfdd02ec48997398bb6d9c484267061957070b75..4b2db4c1f447c8ecdf16e0026a7c2be02df08e4d 100644 --- a/src/test/shell/data/i18n/en.json +++ b/src/test/shell/data/i18n/en.json @@ -315,7 +315,9 @@ "RATING": "Rating", "POPULAR": "Popularity", "DATE" : "Date added" - } + }, + "SCALE_UP": "Resume", + "SCALE_DOWN": "Pause" }, "MONITOR": { "TITLE": "Monitor service", diff --git a/src/test/shell/data/i18n/fr.json b/src/test/shell/data/i18n/fr.json index 9a29496335ad280ca8e8d34504c229bbb2d92115..f5e56f1a4130486eb6822df737d5a9c27c0af181 100644 --- a/src/test/shell/data/i18n/fr.json +++ b/src/test/shell/data/i18n/fr.json @@ -316,7 +316,9 @@ "RATING": "Rating", "POPULAR": "Popularity", "DATE" : "Date added" - } + }, + "SCALE_UP": "Reprende", + "SCALE_DOWN": "Pause" }, "MONITOR": { "TITLE": "Monitor service", diff --git a/src/test/shell/data/i18n/pl.json b/src/test/shell/data/i18n/pl.json index 5e12f67b165b2fe94e9424f245f152ccda23385e..445db45edbc3f347fc38679d31bc027f88a1f8a4 100644 --- a/src/test/shell/data/i18n/pl.json +++ b/src/test/shell/data/i18n/pl.json @@ -316,7 +316,9 @@ "RATING": "Ocena", "POPULAR": "Popularność", "DATE" : "Data dodania" - } + }, + "SCALE_UP": "Wznów", + "SCALE_DOWN": "Pauza" }, "MONITOR": { "TITLE": "Monitorowanie",