From 5ebd693acfb9a1af649e674a7de355fec01f1f3e Mon Sep 17 00:00:00 2001 From: nvazquez Date: Mon, 23 Sep 2024 12:56:51 -0300 Subject: [PATCH 01/85] Add Netris module and Add netris provider --- .../cloud/network/netris/NetrisProvider.java | 28 ++++ .../service/NetworkOrchestrationService.java | 3 + .../network/element/NetrisProviderVO.java | 144 ++++++++++++++++++ .../META-INF/db/schema-41910to42000.sql | 18 +++ plugins/network-elements/netris/pom.xml | 34 +++++ .../api/command/AddNetrisProviderCmd.java | 45 ++++++ .../api/response/NetrisProviderResponse.java | 99 ++++++++++++ .../service/NetrisProviderService.java | 25 +++ .../service/NetrisProviderServiceImpl.java | 40 +++++ .../cloudstack/netris/module.properties | 21 +++ .../netris/spring-netris-context.xml | 30 ++++ plugins/pom.xml | 1 + tools/apidoc/gen_toc.py | 1 + 13 files changed, 489 insertions(+) create mode 100644 api/src/main/java/com/cloud/network/netris/NetrisProvider.java create mode 100644 engine/schema/src/main/java/com/cloud/network/element/NetrisProviderVO.java create mode 100644 plugins/network-elements/netris/pom.xml create mode 100644 plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/command/AddNetrisProviderCmd.java create mode 100644 plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/response/NetrisProviderResponse.java create mode 100644 plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderService.java create mode 100644 plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderServiceImpl.java create mode 100644 plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/module.properties create mode 100644 plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/spring-netris-context.xml diff --git a/api/src/main/java/com/cloud/network/netris/NetrisProvider.java b/api/src/main/java/com/cloud/network/netris/NetrisProvider.java new file mode 100644 index 000000000000..b7892484bb97 --- /dev/null +++ b/api/src/main/java/com/cloud/network/netris/NetrisProvider.java @@ -0,0 +1,28 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package com.cloud.network.netris; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface NetrisProvider extends InternalIdentity, Identity { + long getZoneId(); + String getName(); + String getHostname(); + String getPort(); + String getUsername(); +} diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java index 8463d9cee986..adce5f2f8b43 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java @@ -112,6 +112,9 @@ public interface NetworkOrchestrationService { static final ConfigKey NSX_ENABLED = new ConfigKey<>(Boolean.class, "nsx.plugin.enable", "Advanced", "false", "Indicates whether to enable the NSX plugin", false, ConfigKey.Scope.Zone, null); + ConfigKey NETRIS_ENABLED = new ConfigKey<>(Boolean.class, "netris.plugin.enable", "Advanced", "false", + "Indicates whether to enable the Netris plugin", false, ConfigKey.Scope.Zone, null); + List setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault) throws ConcurrentOperationException; diff --git a/engine/schema/src/main/java/com/cloud/network/element/NetrisProviderVO.java b/engine/schema/src/main/java/com/cloud/network/element/NetrisProviderVO.java new file mode 100644 index 000000000000..3a759bceb11e --- /dev/null +++ b/engine/schema/src/main/java/com/cloud/network/element/NetrisProviderVO.java @@ -0,0 +1,144 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package com.cloud.network.element; + +import com.cloud.network.netris.NetrisProvider; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import java.util.UUID; + +@Entity +@Table(name = "netris_providers") +public class NetrisProviderVO implements NetrisProvider { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + long id; + + @Column(name = "uuid") + private String uuid; + + @Column(name = "name") + private String name; + + @Column(name = "zone_id") + private long zoneId; + + @Column(name = "host_id") + private long hostId; + + @Column(name = "hostname") + private String hostname; + + @Column(name = "port") + private String port; + + @Column(name = "username") + private String username; + + @Column(name = "password") + private String password; + + public NetrisProviderVO() { + this.uuid = UUID.randomUUID().toString(); + } + + @Override + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + @Override + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + @Override + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public long getZoneId() { + return zoneId; + } + + public void setZoneId(long zoneId) { + this.zoneId = zoneId; + } + + public long getHostId() { + return hostId; + } + + public void setHostId(long hostId) { + this.hostId = hostId; + } + + @Override + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + @Override + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + @Override + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql b/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql index c36b71c2f250..7a1a3678973d 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql @@ -425,3 +425,21 @@ INSERT IGNORE INTO `cloud`.`guest_os_hypervisor` (uuid, hypervisor_type, hypervi CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.vm_instance', 'delete_protection', 'boolean DEFAULT FALSE COMMENT "delete protection for vm" '); CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.volumes', 'delete_protection', 'boolean DEFAULT FALSE COMMENT "delete protection for volumes" '); + +-- Netris Plugin +CREATE TABLE `cloud`.`netris_providers` ( + `id` bigint unsigned NOT NULL auto_increment COMMENT 'id', + `uuid` varchar(40), + `zone_id` bigint unsigned NOT NULL COMMENT 'Zone ID', + `host_id` bigint unsigned NOT NULL COMMENT 'Host ID', + `name` varchar(40), + `hostname` varchar(255) NOT NULL, + `port` varchar(255), + `username` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `created` datetime NOT NULL COMMENT 'date created', + `removed` datetime COMMENT 'date removed if not null', + PRIMARY KEY (`id`), + CONSTRAINT `fk_netris_providers__zone_id` FOREIGN KEY `fk_netris_providers__zone_id` (`zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE, + INDEX `i_netris_providers__zone_id`(`zone_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/plugins/network-elements/netris/pom.xml b/plugins/network-elements/netris/pom.xml new file mode 100644 index 000000000000..a1ff7264a4f7 --- /dev/null +++ b/plugins/network-elements/netris/pom.xml @@ -0,0 +1,34 @@ + + + 4.0.0 + cloud-plugin-network-netris + Apache CloudStack Plugin - Netris + + + org.apache.cloudstack + cloudstack-plugins + 4.20.0.0-SNAPSHOT + ../../pom.xml + + + + diff --git a/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/command/AddNetrisProviderCmd.java b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/command/AddNetrisProviderCmd.java new file mode 100644 index 000000000000..f7068793b807 --- /dev/null +++ b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/command/AddNetrisProviderCmd.java @@ -0,0 +1,45 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.api.command; + +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.NetworkRuleConflictException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.NetrisProviderResponse; +import org.apache.cloudstack.context.CallContext; + +@APICommand(name = AddNetrisProviderCmd.APINAME, description = "Add Netris Provider to CloudStack", + responseObject = NetrisProviderResponse.class, requestHasSensitiveInfo = false, + responseHasSensitiveInfo = false, since = "4.20") +public class AddNetrisProviderCmd extends BaseCmd { + public static final String APINAME = "addNetrisProvider"; + + @Override + public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { + + } + + @Override + public long getEntityOwnerId() { + return CallContext.current().getCallingAccount().getId(); + } +} diff --git a/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/response/NetrisProviderResponse.java b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/response/NetrisProviderResponse.java new file mode 100644 index 000000000000..be8b72261bbb --- /dev/null +++ b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/api/response/NetrisProviderResponse.java @@ -0,0 +1,99 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.api.response; + +import com.cloud.network.netris.NetrisProvider; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +@EntityReference(value = {NetrisProvider.class}) +public class NetrisProviderResponse extends BaseResponse { + @SerializedName(ApiConstants.NAME) + @Param(description = "Netris Provider name") + private String name; + + @SerializedName(ApiConstants.ZONE_ID) + @Param(description = "Zone ID to which the Netris Provider is associated with") + private String zoneId; + + @SerializedName(ApiConstants.ZONE_NAME) + @Param(description = "Zone name to which the Netris Provider is associated with") + private String zoneName; + + @SerializedName(ApiConstants.HOST_NAME) + @Param(description = "Netris Provider hostname or IP address") + private String hostname; + + @SerializedName(ApiConstants.PORT) + @Param(description = "Netris Provider port") + private String port; + + @SerializedName(ApiConstants.USERNAME) + @Param(description = "Netris Provider username") + private String username; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getZoneId() { + return zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getZoneName() { + return zoneName; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } +} diff --git a/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderService.java b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderService.java new file mode 100644 index 000000000000..a7c608597914 --- /dev/null +++ b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderService.java @@ -0,0 +1,25 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.service; + +import com.cloud.network.netris.NetrisProvider; +import com.cloud.utils.component.PluggableService; +import org.apache.cloudstack.api.command.AddNetrisProviderCmd; + +public interface NetrisProviderService extends PluggableService { + NetrisProvider addProvider(AddNetrisProviderCmd cmd); +} diff --git a/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderServiceImpl.java b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderServiceImpl.java new file mode 100644 index 000000000000..5ebb0673a9cd --- /dev/null +++ b/plugins/network-elements/netris/src/main/java/org/apache/cloudstack/service/NetrisProviderServiceImpl.java @@ -0,0 +1,40 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.service; + +import com.cloud.network.netris.NetrisProvider; +import org.apache.cloudstack.api.command.AddNetrisProviderCmd; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; + +import java.util.ArrayList; +import java.util.List; + +public class NetrisProviderServiceImpl implements NetrisProviderService { + @Override + public NetrisProvider addProvider(AddNetrisProviderCmd cmd) { + return null; + } + + @Override + public List> getCommands() { + List> cmdList = new ArrayList<>(); + if (Boolean.TRUE.equals(NetworkOrchestrationService.NETRIS_ENABLED.value())) { + cmdList.add(AddNetrisProviderCmd.class); + } + return cmdList; + } +} diff --git a/plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/module.properties b/plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/module.properties new file mode 100644 index 000000000000..0670b1629f4e --- /dev/null +++ b/plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/module.properties @@ -0,0 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name=netris +parent=network diff --git a/plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/spring-netris-context.xml b/plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/spring-netris-context.xml new file mode 100644 index 000000000000..f0dfe703a2b7 --- /dev/null +++ b/plugins/network-elements/netris/src/main/resources/META-INF/cloudstack/netris/spring-netris-context.xml @@ -0,0 +1,30 @@ + + + + + diff --git a/plugins/pom.xml b/plugins/pom.xml index d9d04631874b..e237c1e0b2e5 100755 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -105,6 +105,7 @@ network-elements/elastic-loadbalancer network-elements/globodns network-elements/internal-loadbalancer + network-elements/netris network-elements/netscaler network-elements/nicira-nvp network-elements/opendaylight diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py index 8d28749a637b..946d155e04d8 100644 --- a/tools/apidoc/gen_toc.py +++ b/tools/apidoc/gen_toc.py @@ -256,6 +256,7 @@ 'deleteASNRange': 'AS Number Range', 'listASNumbers': 'AS Number', 'releaseASNumber': 'AS Number', + 'addNsxProvider': 'Netris', } From d5cdc62e91cea1305d0c8c84ae3a12910906b20d Mon Sep 17 00:00:00 2001 From: nvazquez Date: Mon, 23 Sep 2024 12:58:18 -0300 Subject: [PATCH 02/85] Fix --- tools/apidoc/gen_toc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py index 946d155e04d8..49ce94e86fa3 100644 --- a/tools/apidoc/gen_toc.py +++ b/tools/apidoc/gen_toc.py @@ -256,7 +256,7 @@ 'deleteASNRange': 'AS Number Range', 'listASNumbers': 'AS Number', 'releaseASNumber': 'AS Number', - 'addNsxProvider': 'Netris', + 'addNetrisProvider': 'Netris', } From 5ef984c60391952a01333c820e2d37cd66109e7f Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 23 Sep 2024 12:20:38 -0400 Subject: [PATCH 03/85] Add Netris Provider to the zone creation wizard --- ui/public/locales/en.json | 12 ++++ .../infra/zone/ZoneWizardNetworkSetupStep.vue | 67 ++++++++++++++++++- .../ZoneWizardPhysicalNetworkSetupStep.vue | 1 + 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 881a490f66b7..0606c5098234 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -1492,6 +1492,13 @@ "label.nat": "BigSwitch BCF NAT enabled", "label.ncc": "NCC", "label.netmask": "Netmask", +"label.netris": "Netris", +"label.netris.provider": "Netris Provider", +"label.netris.provider.name": "Netris provider name", +"label.netris.provider.hostname": "Netris provider hostname", +"label.netris.provider.port": "Netris provider port", +"label.netris.provider.username": "Netris provider username", +"label.netris.provider.password": "Netris provider password", "label.netscaler": "NetScaler", "label.netscaler.mpx": "NetScaler MPX LoadBalancer", "label.netscaler.sdx": "NetScaler SDX LoadBalancer", @@ -3213,6 +3220,7 @@ "message.import.volume": "Please specify the domain, account or project name.
If not set, the volume will be imported for the caller.", "message.info.cloudian.console": "Cloudian Management Console should open in another window.", "message.installwizard.cloudstack.helptext.website": " * Project website:\t ", +"message.infra.setup.netris.description": "This zone must contain a Netris provider because the isolation method is Netris", "message.infra.setup.nsx.description": "This zone must contain an NSX provider because the isolation method is NSX", "message.infra.setup.tungsten.description": "This zone must contain a Tungsten-Fabric provider because the isolation method is TF", "message.installwizard.cloudstack.helptext.document": " * Documentation:\t ", @@ -3230,6 +3238,10 @@ "message.installwizard.tooltip.configureguesttraffic.guestgateway": "The gateway that the guests should use.", "message.installwizard.tooltip.configureguesttraffic.guestnetmask": "The netmask in use on the subnet that the guests should use.", "message.installwizard.tooltip.configureguesttraffic.gueststartip": "The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR.", +"message.installwizard.tooltip.netris.provider.name": "Netris Provider name is required", +"message.installwizard.tooltip.netris.provider.hostname": "Netris Provider hostname / IP address not provided", +"message.installwizard.tooltip.netris.provider.username": "Netris Provider username not provided", +"message.installwizard.tooltip.netris.provider.password": "Netris Provider password not provided", "message.installwizard.tooltip.nsx.provider.hostname": "NSX Provider hostname / IP address not provided", "message.installwizard.tooltip.nsx.provider.username": "NSX Provider username not provided", "message.installwizard.tooltip.nsx.provider.password": "NSX Provider password not provided", diff --git a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue index 24efe448b252..dc1ec709fb18 100644 --- a/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardNetworkSetupStep.vue @@ -88,6 +88,18 @@ :isFixError="isFixError" /> + +
-
{{ isNsxZone }}
network.isolationMethod === 'NETRIS') + isNetris = netrisIdx > -1 + } + return isNetris + }, allSteps () { - console.log(this.isNsxZone) const steps = [] steps.push({ title: 'label.physical.network', @@ -233,6 +253,12 @@ export default { formKey: 'nsx' }) } + if (this.isNetrisZone) { + steps.push({ + title: 'label.netris.provider', + formKey: 'netris' + }) + } if (this.havingNetscaler) { steps.push({ title: 'label.netScaler', @@ -440,6 +466,42 @@ export default { ] return fields }, + netrisFields () { + const fields = [ + { + title: 'label.netris.provider.name', + key: 'netrisName', + placeHolder: 'message.installwizard.tooltip.netris.provider.name', + required: true + }, + { + title: 'label.netris.provider.hostname', + key: 'netrisHostname', + placeHolder: 'message.installwizard.tooltip.netris.provider.hostname', + required: true + }, + { + title: 'label.netris.provider.port', + key: 'netrisPort', + placeHolder: 'message.installwizard.tooltip.netris.provider.port', + required: false + }, + { + title: 'label.netris.provider.username', + key: 'username', + placeHolder: 'message.installwizard.tooltip.netris.provider.username', + required: true + }, + { + title: 'label.netris.provider.password', + key: 'password', + placeHolder: 'message.installwizard.tooltip.netris.provider.password', + required: true, + password: true + } + ] + return fields + }, guestTrafficFields () { const fields = [ { @@ -510,6 +572,7 @@ export default { podSetupDescription: 'message.add.pod.during.zone.creation', tungstenSetupDescription: 'message.infra.setup.tungsten.description', nsxSetupDescription: 'message.infra.setup.nsx.description', + netrisSetupDescription: 'message.infra.setup.netris.description', netscalerSetupDescription: 'label.please.specify.netscaler.info', storageTrafficDescription: 'label.zonewizard.traffictype.storage', podFields: [ diff --git a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue index 1117cb6ec014..bb6975f0ccec 100644 --- a/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue +++ b/ui/src/views/infra/zone/ZoneWizardPhysicalNetworkSetupStep.vue @@ -67,6 +67,7 @@ VCS TF NSX + NETRIS