cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ro...@apache.org
Subject [cloudstack] branch master updated: CLOUDSTACK-10364: Change the "setXXX" method names to "generateXXX" (#2601)
Date Tue, 01 May 2018 15:17:58 GMT
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new 503b2c6  CLOUDSTACK-10364: Change the "setXXX" method names to "generateXXX" (#2601)
503b2c6 is described below

commit 503b2c649c342ab7c463eb02cb5513c818281c6c
Author: Kui LIU <brucekuiliu@gmail.com>
AuthorDate: Tue May 1 17:17:54 2018 +0200

    CLOUDSTACK-10364: Change the "setXXX" method names to "generateXXX" (#2601)
    
    The three methods are named as "setXXX", actually, they are not simple setter or getter.
    They are further renamed as "generateXXX" with dahn's comments.
---
 .../java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java   | 8 ++++----
 .../main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
index 11b22c4..88e473d 100644
--- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
+++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
@@ -298,11 +298,11 @@ public class BridgeVifDriver extends VifDriverBase {
         Script.runSimpleBashScript("test -d /sys/class/net/" + iface.getBrName() + "/brif/"
+ iface.getDevName() + " && brctl delif " + iface.getBrName() + " " + iface.getDevName());
     }
 
-    private String setVnetBrName(String pifName, String vnetId) {
+    private String generateVnetBrName(String pifName, String vnetId) {
         return "br" + pifName + "-" + vnetId;
     }
 
-    private String setVxnetBrName(String pifName, String vnetId) {
+    private String generateVxnetBrName(String pifName, String vnetId) {
         return "brvx-" + vnetId;
     }
 
@@ -317,9 +317,9 @@ public class BridgeVifDriver extends VifDriverBase {
         }
         String brName = "";
         if (protocol.equals(Networks.BroadcastDomainType.Vxlan.scheme())) {
-            brName = setVxnetBrName(nic, vNetId);
+            brName = generateVxnetBrName(nic, vNetId);
         } else {
-            brName = setVnetBrName(nic, vNetId);
+            brName = generateVnetBrName(nic, vNetId);
         }
         createVnet(vNetId, nic, brName, protocol);
         return brName;
diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
index 8e73d85..5f21b96 100644
--- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
+++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
@@ -168,12 +168,12 @@ public class IvsVifDriver extends VifDriverBase {
             }
         }
         String brName = "";
-        brName = setVnetBrName(nic, vNetId);
+        brName = generateVnetBrName(nic, vNetId);
         createVnet(vNetId, nic, brName, protocol);
         return brName;
     }
 
-    private String setVnetBrName(String pifName, String vnetId) {
+    private String generateVnetBrName(String pifName, String vnetId) {
         return "br" + pifName + "-" + vnetId;
     }
 

-- 
To stop receiving notification emails like this one, please contact
rohit@apache.org.

Mime
View raw message