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 ca76028b193748dc1aa5763788e62f5b0512d737..81365d8a6ed7c899f34f4ee9eeff9ac7f03351a2 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 @@ -57,6 +57,7 @@ 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 java.lang.reflect.Field; @@ -252,7 +253,9 @@ public class AppInstanceController extends AppBaseController { @Transactional public Id createAppInstance(@RequestBody AppInstanceRequest appInstanceRequest, @NotNull Principal principal, - @PathVariable Long domainId) { + @PathVariable Long domainId, + @RequestParam(name = "clusterId",required = false) Long clusterId) { + log.error("Cluster = {}", clusterId); Application app = getApp(appInstanceRequest.getApplicationId()); Domain domain = domainService.findDomain(domainId) .orElseThrow(() -> new MissingElementException("Domain not found")); diff --git a/src/test/java/net/geant/nmaas/portal/api/market/AppInstanceControllerTest.java b/src/test/java/net/geant/nmaas/portal/api/market/AppInstanceControllerTest.java index 2faa5e053ba5dd25799e05cf608467f0513c0fa7..6cd0015acc4573aa191cb1c4aeb38e6971c9d33a 100644 --- a/src/test/java/net/geant/nmaas/portal/api/market/AppInstanceControllerTest.java +++ b/src/test/java/net/geant/nmaas/portal/api/market/AppInstanceControllerTest.java @@ -453,7 +453,7 @@ public class AppInstanceControllerTest { when(applicationService.findApplication(appInstanceRequest.getApplicationId())).thenReturn(Optional.of(application)); assertThrows(IllegalArgumentException.class, () -> { - this.appInstanceController.createAppInstance(appInstanceRequest, principal,domainId); + this.appInstanceController.createAppInstance(appInstanceRequest, principal,domainId, null); }); } diff --git a/src/test/shell/data/i18n/de.json b/src/test/shell/data/i18n/de.json index 70edc1e5f0effcc6a4a749085d10714231ee4403..3a07ad01ea518de6b8fadbe92c36b89fe0cf5d69 100644 --- a/src/test/shell/data/i18n/de.json +++ b/src/test/shell/data/i18n/de.json @@ -515,7 +515,9 @@ "DEPLOY_BUTTON": "Installieren", "USE_DEFAULT_VERSION": "Standardversion verwenden", "SELECT_VERSION": "Version auswählen", - "AUTO_UPGRADES_ENABLED": "Automatische upgrades aktivieren" + "AUTO_UPGRADES_ENABLED": "Automatische upgrades aktivieren", + "REMOTE_CLUSTER" : "Use remote cluster", + "SELECT_CLUSTER": "Remote location" }, "ADD_MEMBERS_MODAL": { "HEADER": "Add members", @@ -1321,6 +1323,8 @@ "DOMAIN_CREATION" : "Domain creation", "APPLICATION_DEPLOYMENT" : "Application deployment", "USER_ASSIGNMENT" : "User assignment", - "DOMAIN_GROUP_CHANGE" : "Domain group change" + "DOMAIN_GROUP_CHANGE" : "Domain group change", + "NEW" : "Add webhook", + "DETAILS" : "Webhooks details" } } diff --git a/src/test/shell/data/i18n/en.json b/src/test/shell/data/i18n/en.json index de426e285666e56fbbc1ebb030f4b45211b4deb0..6484fdeaec15e61cf86d41d39c73b4bec33e264e 100644 --- a/src/test/shell/data/i18n/en.json +++ b/src/test/shell/data/i18n/en.json @@ -517,7 +517,9 @@ "DEPLOY_BUTTON": "Deploy", "USE_DEFAULT_VERSION": "Use default version", "SELECT_VERSION": "Select version", - "AUTO_UPGRADES_ENABLED": "Enable automatic upgrades" + "AUTO_UPGRADES_ENABLED": "Enable automatic upgrades", + "REMOTE_CLUSTER" : "Use remote cluster", + "SELECT_CLUSTER": "Remote location" }, "ADD_MEMBERS_MODAL": { "HEADER": "Add members", @@ -1327,6 +1329,7 @@ "APPLICATION_DEPLOYMENT" : "Application deployment", "USER_ASSIGNMENT" : "User assignment", "DOMAIN_GROUP_CHANGE" : "Domain group change", - "NEW" : "Add webhook" + "NEW" : "Add webhook", + "DETAILS" : "Webhooks details" } } diff --git a/src/test/shell/data/i18n/fr.json b/src/test/shell/data/i18n/fr.json index 43daf12ffbcee7c27e02f9ca19a07af853b4f46b..449bdc580a1e0151fc743896e5d7a56e21695968 100644 --- a/src/test/shell/data/i18n/fr.json +++ b/src/test/shell/data/i18n/fr.json @@ -517,7 +517,9 @@ "DEPLOY_BUTTON": "Déployer", "USE_DEFAULT_VERSION": "Utiliser la version par défaut", "SELECT_VERSION": "Sélectionnez la version", - "AUTO_UPGRADES_ENABLED": "Activer les mises à jour automatiques" + "AUTO_UPGRADES_ENABLED": "Activer les mises à jour automatiques", + "REMOTE_CLUSTER" : "Use remote cluster", + "SELECT_CLUSTER": "Remote location" }, "ADD_MEMBERS_MODAL": { "HEADER": "Add members", @@ -1325,6 +1327,8 @@ "DOMAIN_CREATION" : "Domain creation", "APPLICATION_DEPLOYMENT" : "Application deployment", "USER_ASSIGNMENT" : "User assignment", - "DOMAIN_GROUP_CHANGE" : "Domain group change" + "DOMAIN_GROUP_CHANGE" : "Domain group change", + "NEW" : "Add webhook", + "DETAILS" : "Webhooks details" } } diff --git a/src/test/shell/data/i18n/pl.json b/src/test/shell/data/i18n/pl.json index 61ef098c7024e45f3d4cf9ae82b32b5de48c4166..ae51c715ddda44898afc023c818db0fb15c47109 100644 --- a/src/test/shell/data/i18n/pl.json +++ b/src/test/shell/data/i18n/pl.json @@ -516,7 +516,9 @@ "DEPLOY_BUTTON": "Uruchom", "USE_DEFAULT_VERSION": "Użyj domyślnej wersji", "SELECT_VERSION": "Wybierz wersję", - "AUTO_UPGRADES_ENABLED": "Włącz automatyczne aktualizacje" + "AUTO_UPGRADES_ENABLED": "Włącz automatyczne aktualizacje", + "REMOTE_CLUSTER" : "Uruchomienie na zewnęntrzym klastrze", + "SELECT_CLUSTER": "Zdalna lokalizacja" }, "ADD_MEMBERS_MODAL": { "HEADER": "Dodaj użytkowników", @@ -1324,6 +1326,8 @@ "DOMAIN_CREATION" : "Domain creation", "APPLICATION_DEPLOYMENT" : "Application deployment", "USER_ASSIGNMENT" : "User assignment", - "DOMAIN_GROUP_CHANGE" : "Domain group change" + "DOMAIN_GROUP_CHANGE" : "Domain group change", + "NEW" : "Add webhook", + "DETAILS" : "Webhooks details" } }