From b1c8c69a309848b184a23648d7905216be840ff6 Mon Sep 17 00:00:00 2001 From: Benjamin Weder Date: Sat, 18 Nov 2023 14:50:54 +0100 Subject: [PATCH] Avoid unmutable list for OpenStack IA --- .../files/OpenStack_CloudProviderInterface.war | 4 ++-- .../openstack/OpenStackCloudProviderInterfaceEndpoint.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/files/OpenStack_CloudProviderInterface.war b/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/files/OpenStack_CloudProviderInterface.war index e543a38..6501932 100644 --- a/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/files/OpenStack_CloudProviderInterface.war +++ b/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/files/OpenStack_CloudProviderInterface.war @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8118a4bd617947959c135ab1e3408b49341fae98cce9c8a0c9d5078323a19097 -size 34360570 +oid sha256:04779551b50b6c84d9c4bfd8039553f5d0f6afa774945f40c8b2a7f94089276a +size 34360626 diff --git a/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/source/src/main/java/org/opentosca/artifacttemplates/openstack/OpenStackCloudProviderInterfaceEndpoint.java b/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/source/src/main/java/org/opentosca/artifacttemplates/openstack/OpenStackCloudProviderInterfaceEndpoint.java index 0c71413..6982722 100644 --- a/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/source/src/main/java/org/opentosca/artifacttemplates/openstack/OpenStackCloudProviderInterfaceEndpoint.java +++ b/artifacttemplates/http%3A%2F%2Fopentosca.org%2Fartifacttemplates/OpenStack_CloudProviderInterfaceIA-w2/source/src/main/java/org/opentosca/artifacttemplates/openstack/OpenStackCloudProviderInterfaceEndpoint.java @@ -1,6 +1,7 @@ package org.opentosca.artifacttemplates.openstack; import java.net.URL; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -167,7 +168,7 @@ public void createVM(@RequestPayload CreateVMRequest request, MessageContext mes logger.info("Created new security group with name: {}", securityGroup); // open ports within security group - List ports = Arrays.asList(request.getVMOpenPorts().split(",")); + List ports = new ArrayList<>(List.of(request.getVMOpenPorts().split(","))); if (!ports.contains("22")){ // add SSH port if not defined ports.add("22");