cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.3-forward to b1ec82c
Date Wed, 29 Jan 2014 16:56:46 GMT
Updated Branches:
  refs/heads/4.3-forward caf17c2f4 -> b1ec82cde


Revert "CLOUDSTACK-5979 vlan parsing fixed"

This reverts commit caf17c2f46bf317ec8966b08aaff728a73fda14a.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b1ec82cd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b1ec82cd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b1ec82cd

Branch: refs/heads/4.3-forward
Commit: b1ec82cdecece8b29bc9234473ff9eb7d6abe143
Parents: caf17c2
Author: Daan Hoogland <dhoogland@schubergphilis.com>
Authored: Wed Jan 29 17:55:01 2014 +0100
Committer: Daan Hoogland <dhoogland@schubergphilis.com>
Committed: Wed Jan 29 17:55:01 2014 +0100

----------------------------------------------------------------------
 .../com/cloud/network/element/NiciraNvpElement.java | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1ec82cd/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
index c062abd..3e9e16a 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
@@ -259,20 +259,8 @@ NiciraNvpElementService, ResourceStateAdapter, IpDeployer {
                     + NetUtils.getCidrSize(sourceNatIp.getVlanNetmask());
             String internalCidr = network.getGateway() + "/"
                     + network.getCidr().split("/")[1];
-            // assuming a vlan:
-            String vtag = sourceNatIp.getVlanTag();
-            BroadcastDomainType tiep = null;
-            try {
-                tiep = BroadcastDomainType.getTypeOf(vtag);
-            } catch (URISyntaxException use) {
-                throw new CloudRuntimeException("vlantag for sourceNatIp is not valid: "
+ vtag, use);
-            }
-            if (tiep == BroadcastDomainType.Vlan) {
-                vtag = BroadcastDomainType.Vlan.getValueFrom(BroadcastDomainType.fromString(vtag));
-            } else if (!(tiep == BroadcastDomainType.UnDecided || tiep == BroadcastDomainType.Native))
{
-                throw new CloudRuntimeException("only vlans are supported for sourceNatIp,
at this moment: " + vtag);
-            }
-            long vlanid = (Vlan.UNTAGGED.equals(vtag)) ? 0 : Long.parseLong(vtag);
+            long vlanid = (Vlan.UNTAGGED.equals(sourceNatIp.getVlanTag())) ? 0
+                    : Long.parseLong(sourceNatIp.getVlanTag());
 
             CreateLogicalRouterCommand cmd = new CreateLogicalRouterCommand(
                     niciraNvpHost.getDetail("l3gatewayserviceuuid"), vlanid,


Mime
View raw message