Skip to content

Commit 0d4147f

Browse files
authored
Netris Network Plugin Integration with CloudStack (#10458)
The Netris Plugin introduces Netris as a network service provider in CloudStack to be able to create and manage Virtual Private Clouds (VPCs) in CloudStack, being able to orchestrate the following network functionalities: - Network segmentation with Netris-VXLAN isolation method - Routing between "public" IP and network segments with an ACS ROUTED mode offering - SourceNAT, DNAT, 1:1 NAT between "public" IP and network segments with an ACS NATTED mode offering - Routing between VPC network segments (tiers in ACS nomenclature) - Access Lists (ACLs) between VPC tiers and "public" network (TCP, UDP, ICMP) both as global egress rules and "public" IP specific ingress rules. - ACLs between VPC network tiers (TCP, UDP, ICMP) - External load balancing – between VPC network tiers and "public" IP - Internal load balancing – between VPC network tiers - CloudStack Virtual Router services (DHCP, DNS, UserData, Password Injection, etc…)
1 parent ae50103 commit 0d4147f

File tree

249 files changed

+14202
-1259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+14202
-1259
lines changed

api/src/main/java/com/cloud/agent/api/to/FirewallRuleTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class FirewallRuleTO implements InternalIdentity {
4747
int[] srcPortRange;
4848
boolean revoked;
4949
boolean alreadyAdded;
50-
private List<String> sourceCidrList;
50+
protected List<String> sourceCidrList;
5151
private List<String> destCidrList;
5252
FirewallRule.Purpose purpose;
5353
private Integer icmpType;

api/src/main/java/com/cloud/agent/api/to/PortForwardingRuleTO.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import com.cloud.utils.net.NetUtils;
2222
import org.apache.commons.lang3.StringUtils;
2323

24-
import java.util.List;
25-
2624
/**
2725
* PortForwardingRuleTO specifies one port forwarding rule.
2826
*
@@ -32,8 +30,6 @@ public class PortForwardingRuleTO extends FirewallRuleTO {
3230
String dstIp;
3331
int[] dstPortRange;
3432

35-
List<String> sourceCidrList;
36-
3733
protected PortForwardingRuleTO() {
3834
super();
3935
}

api/src/main/java/com/cloud/configuration/ConfigurationService.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
package com.cloud.configuration;
1818

1919
import java.util.List;
20+
import java.util.Map;
21+
import java.util.Objects;
2022

23+
import com.cloud.network.Network;
24+
import org.apache.cloudstack.api.ApiConstants;
2125
import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd;
2226
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
2327
import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd;
@@ -373,4 +377,16 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
373377
List<? extends PortableIp> listPortableIps(long id);
374378

375379
Boolean isAccountAllowedToCreateOfferingsWithTags(IsAccountAllowedToCreateOfferingsWithTagsCmd cmd);
380+
381+
public static final Map<String, String> ProviderDetailKeyMap = Map.of(
382+
Network.Provider.Nsx.getName(), ApiConstants.NSX_DETAIL_KEY,
383+
Network.Provider.Netris.getName(), ApiConstants.NETRIS_DETAIL_KEY
384+
);
385+
386+
public static boolean IsIpRangeForProvider(Network.Provider provider) {
387+
if (Objects.isNull(provider)) {
388+
return false;
389+
}
390+
return ProviderDetailKeyMap.containsKey(provider.getName());
391+
}
376392
}

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@ public class EventTypes {
499499

500500
public static final String EVENT_ZONE_VLAN_ASSIGN = "ZONE.VLAN.ASSIGN";
501501
public static final String EVENT_ZONE_VLAN_RELEASE = "ZONE.VLAN.RELEASE";
502+
public static final String EVENT_ZONE_VXLAN_ASSIGN = "ZONE.VXLAN.ASSIGN";
503+
public static final String EVENT_ZONE_VXLAN_RELEASE = "ZONE.VXLAN.RELEASE";
502504

503505
// Projects
504506
public static final String EVENT_PROJECT_CREATE = "PROJECT.CREATE";

api/src/main/java/com/cloud/network/IpAddress.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ enum Purpose {
9999

100100
boolean isForSystemVms();
101101

102+
boolean isForRouter();
102103
}

api/src/main/java/com/cloud/network/Network.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public static class Provider {
206206
public static final Provider Tungsten = new Provider("Tungsten", false);
207207

208208
public static final Provider Nsx = new Provider("Nsx", false);
209+
public static final Provider Netris = new Provider("Netris", false);
209210

210211
private final String name;
211212
private final boolean isExternal;

api/src/main/java/com/cloud/network/Networks.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ public <T> URI toUri(T value) {
129129
UnDecided(null, null),
130130
OpenDaylight("opendaylight", String.class),
131131
TUNGSTEN("tf", String.class),
132-
NSX("nsx", String.class);
132+
NSX("nsx", String.class),
133+
Netris("netris", String.class);
133134

134135
private final String scheme;
135136
private final Class<?> type;

0 commit comments

Comments
 (0)