cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [2/4] git commit: updated refs/heads/master to 1acec83
Date Mon, 09 Sep 2013 20:58:20 GMT
Revert "uses of parseInt and parseLong secured"

This reverts commit f8fb422612f110512fd06ad392bf8896efb3d0b6.


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

Branch: refs/heads/master
Commit: 947f49d869fd01279d512e737de8fb384cff324f
Parents: f8fb422
Author: Daan Hoogland <daan@onecht.net>
Authored: Mon Sep 9 22:17:10 2013 +0200
Committer: Daan Hoogland <daan@onecht.net>
Committed: Mon Sep 9 22:17:10 2013 +0200

----------------------------------------------------------------------
 .../com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java  | 2 --
 .../src/com/cloud/network/resource/JuniperSrxResource.java    | 7 +++----
 .../src/com/cloud/network/guru/ExternalGuestNetworkGuru.java  | 2 --
 .../com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java  | 6 +++---
 4 files changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/947f49d8/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
index daf65a1..48233c4 100644
--- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
+++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
@@ -165,8 +165,6 @@ public class BigSwitchVnsGuestNetworkGuru extends GuestNetworkGuru {
             throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet
as a " +
                         "part of network " + network + " implement ", DataCenter.class, dcId);
         }
-        // when supporting more types of networks this need to become
-//        int vlan = Integer.parseInt(BroadcastDomainType.getValue(vnet));
         int vlan = Integer.parseInt(vnet);
 
         // Name is either the given name or the uuid

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/947f49d8/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
index 46ef332..3bcbf2d 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
@@ -65,7 +65,6 @@ import com.cloud.agent.api.to.IpAddressTO;
 import com.cloud.agent.api.to.PortForwardingRuleTO;
 import com.cloud.agent.api.to.StaticNatRuleTO;
 import com.cloud.host.Host;
-import com.cloud.network.Networks.BroadcastDomainType;
 import com.cloud.network.rules.FirewallRule;
 import com.cloud.network.rules.FirewallRule.Purpose;
 import com.cloud.resource.ServerResource;
@@ -699,7 +698,8 @@ public class JuniperSrxResource implements ServerResource {
             Long publicVlanTag = null;
             if (ip.getVlanId() != null && !ip.getVlanId().equals("untagged")) {
             	try {
-                    publicVlanTag = Long.parseLong(BroadcastDomainType.getValue(ip.getVlanId()));
+                    // TODO BroadcastDomain.getValue(ip.getVlanId) ???
+            		publicVlanTag = Long.parseLong(ip.getVlanId());
             	} catch (Exception e) {
             		throw new ExecutionException("Could not parse public VLAN tag: " + ip.getVlanId());
             	}
@@ -3581,8 +3581,7 @@ public class JuniperSrxResource implements ServerResource {
     	Long publicVlanTag = null;
     	if (!vlan.equals("untagged")) {
     		try {
-                // make sure this vlan is numeric
-                publicVlanTag = Long.parseLong(BroadcastDomainType.getValue(vlan));
+    			publicVlanTag = Long.parseLong(vlan);
     		} catch (Exception e) {
     			throw new ExecutionException("Unable to parse VLAN tag: " + vlan);
     		}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/947f49d8/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
index 55a33cc..79a4053 100644
--- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
@@ -143,8 +143,6 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
                 UseSystemGuestVlans.valueIn(config.getAccountId()));
 
             try {
-                // when supporting more types of networks this need to become
-//              int vlantag = Integer.parseInt(BroadcastDomainType.getValue(vnet));
                 vlanTag = Integer.parseInt(vnet);
             } catch (NumberFormatException e) {
                 throw new CloudRuntimeException("Obtained an invalid guest vlan tag. Exception:
" + e.getMessage());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/947f49d8/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
index ac34b49..1cd1deb 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java
@@ -499,10 +499,10 @@ public class HypervisorHostHelper {
 
             if(vlanId != null && !UNTAGGED_VLAN_NAME.equalsIgnoreCase(vlanId)) {
                 createGCTag = true;
-                vid = Integer.parseInt(BroadcastDomainType.getValue(vlanId));
+                vid = Integer.parseInt(vlanId);
             }
             if (secondaryvlanId != null) {
-                spvlanid = Integer.parseInt(BroadcastDomainType.getValue(secondaryvlanId));
+                spvlanid = Integer.parseInt(secondaryvlanId);
             }
         }
 
@@ -937,7 +937,7 @@ public class HypervisorHostHelper {
 
             if(vlanId != null && !UNTAGGED_VLAN_NAME.equalsIgnoreCase(vlanId) ) {
                 createGCTag = true;
-                vid = Integer.parseInt(BroadcastDomainType.getValue(vlanId));
+                vid = Integer.parseInt(vlanId);
             }
         }
 


Mime
View raw message