incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [2/3] git commit: Use the name of the network (or uuid) as display text of the nicira logical switch.
Date Mon, 30 Jul 2012 13:18:13 GMT
Use the name of the network (or uuid) as display text of the nicira logical switch.


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

Branch: refs/heads/master
Commit: b4bcd7f3fe1ade1e4db745ad959b9e1e3493e585
Parents: 236f63f
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Mon Jul 30 15:07:48 2012 +0200
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Mon Jul 30 15:17:46 2012 +0200

----------------------------------------------------------------------
 .../network/guru/NiciraNvpGuestNetworkGuru.java    |    6 +++---
 .../cloud/network/resource/NiciraNvpResource.java  |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b4bcd7f3/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
index 3bac88b..6cafe36 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
@@ -160,9 +160,9 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
         }
         
         // Name is either the given name or the uuid
-        String name = implemented.getName();
+        String name = network.getName();
         if (name == null || name.isEmpty()) {
-            name = implemented.getUuid();
+            name = ((NetworkVO)network).getUuid();
         }
         if (name.length() > 40 ) {
             name = name.substring(0, 39); // max length 40
@@ -179,7 +179,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
         String transportzoneuuid = niciraNvpHost.getDetail("transportzoneuuid");
         String transportzoneisotype = niciraNvpHost.getDetail("transportzoneisotype");
         
-        CreateLogicalSwitchCommand cmd = new CreateLogicalSwitchCommand(transportzoneuuid,
transportzoneisotype, network.getName(), 
+        CreateLogicalSwitchCommand cmd = new CreateLogicalSwitchCommand(transportzoneuuid,
transportzoneisotype, name,
                 context.getDomain().getName() + "-" + context.getAccount().getAccountName());
         CreateLogicalSwitchAnswer answer = (CreateLogicalSwitchAnswer) _agentMgr.easySend(niciraNvpHost.getId(),
cmd);
         

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b4bcd7f3/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java
b/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java
index ae7b37e..69fd26f 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java
@@ -170,7 +170,7 @@ public class NiciraNvpResource implements ServerResource {
     
     private Answer executeRequest(CreateLogicalSwitchCommand cmd) {
         LogicalSwitch logicalSwitch = new LogicalSwitch();
-        logicalSwitch.setDisplay_name("lswitch-" + cmd.getOwnerName());
+        logicalSwitch.setDisplay_name("lswitch-" + cmd.getName());
         logicalSwitch.setPort_isolation_enabled(false);
 
         // Set transport binding


Mime
View raw message