You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/12/28 11:22:35 UTC

[11/16] git commit: updated refs/heads/master to 67b753c

CLOUDSTACK-9074: API Changes: Add l2gatewayserviceuuid to NVP devices


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

Branch: refs/heads/master
Commit: 46f9fbabdf2fdb3aa7ca92fd8a54a9a0a9443f4d
Parents: 60f0065
Author: nvazquez <ni...@gmail.com>
Authored: Tue Dec 1 11:46:22 2015 -0800
Committer: nvazquez <ni...@gmail.com>
Committed: Thu Dec 24 16:07:06 2015 -0300

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/ApiConstants.java |  1 +
 .../classes/resources/messages.properties       |  1 +
 .../api/commands/AddNiciraNvpDeviceCmd.java     | 10 ++++++++++
 .../api/response/NiciraNvpDeviceResponse.java   |  7 +++++++
 ui/dictionary.jsp                               |  1 +
 ui/scripts/system.js                            | 21 ++++++++++++++++++--
 6 files changed, 39 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46f9fbab/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 742d2f4..4f68930 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -498,6 +498,7 @@ public class ApiConstants {
     public static final String NICIRA_NVP_TRANSPORT_ZONE_UUID = "transportzoneuuid";
     public static final String NICIRA_NVP_DEVICE_NAME = "niciradevicename";
     public static final String NICIRA_NVP_GATEWAYSERVICE_UUID = "l3gatewayserviceuuid";
+    public static final String NICIRA_NVP_L2_GATEWAYSERVICE_UUID = "l2gatewayserviceuuid";
     public static final String S3_ACCESS_KEY = "accesskey";
     public static final String S3_SECRET_KEY = "secretkey";
     public static final String S3_END_POINT = "endpoint";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46f9fbab/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index e7beaa9..a487ea7 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -942,6 +942,7 @@ label.nfs.storage=NFS Storage
 label.nfs=NFS
 label.nic.adapter.type=NIC adapter type
 label.nicira.controller.address=Controller Address
+label.nicira.l2gatewayserviceuuid=L2 Gateway Service Uuid
 label.nicira.l3gatewayserviceuuid=L3 Gateway Service Uuid
 label.nicira.transportzoneuuid=Transport Zone Uuid
 label.brocade.vcs.address=Vcs Switch Address

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46f9fbab/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java
index 1a9be28..1bde3b7 100644
--- a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java
+++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/commands/AddNiciraNvpDeviceCmd.java
@@ -80,6 +80,12 @@ public class AddNiciraNvpDeviceCmd extends BaseAsyncCmd {
                description = "The L3 Gateway Service UUID configured on the Nicira Controller")
     private String l3gatewayserviceuuid;
 
+    @Parameter(name = ApiConstants.NICIRA_NVP_L2_GATEWAYSERVICE_UUID,
+            type = CommandType.STRING,
+            required = false,
+            description = "The L2 Gateway Service UUID configured on the Nicira Controller")
+    private String l2gatewayserviceuuid;
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -108,6 +114,10 @@ public class AddNiciraNvpDeviceCmd extends BaseAsyncCmd {
         return l3gatewayserviceuuid;
     }
 
+    public String getL2GatewayServiceUuid() {
+        return l2gatewayserviceuuid;
+     }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46f9fbab/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java
index 46287aa..dedccef 100644
--- a/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java
+++ b/plugins/network-elements/nicira-nvp/src/main/java/com/cloud/api/response/NiciraNvpDeviceResponse.java
@@ -58,6 +58,10 @@ public class NiciraNvpDeviceResponse extends BaseResponse {
     @Param(description = "this L3 gateway service Uuid")
     private String l3GatewayServiceUuid;
 
+    @SerializedName(ApiConstants.NICIRA_NVP_L2_GATEWAYSERVICE_UUID)
+    @Param(description = "this L2 gateway service Uuid")
+    private String l2GatewayServiceUuid;
+
     public void setId(String nvpDeviceId) {
         this.id = nvpDeviceId;
     }
@@ -86,4 +90,7 @@ public class NiciraNvpDeviceResponse extends BaseResponse {
         this.l3GatewayServiceUuid = l3GatewayServiceUuid;
     }
 
+    public void setL2GatewayServiceUuid(final String l2GatewayServiceUuid) {
+        this.l2GatewayServiceUuid = l2GatewayServiceUuid;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46f9fbab/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index e82ae19..b97141c 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -934,6 +934,7 @@ dictionary = {
 'label.nfs.storage': '<fmt:message key="label.nfs.storage" />',
 'label.nic.adapter.type': '<fmt:message key="label.nic.adapter.type" />',
 'label.nicira.controller.address': '<fmt:message key="label.nicira.controller.address" />',
+'label.nicira.l2gatewayserviceuuid': '<fmt:message key="label.nicira.l2gatewayserviceuuid" />',
 'label.nicira.l3gatewayserviceuuid': '<fmt:message key="label.nicira.l3gatewayserviceuuid" />',
 'label.nicira.transportzoneuuid': '<fmt:message key="label.nicira.transportzoneuuid" />',
 'label.brocade.vcs.address': '<fmt:message key="label.brocade.vcs.address" />',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46f9fbab/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index af69359..faa388c 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -5774,6 +5774,9 @@
                                         },
                                         l3gatewayserviceuuid: {
                                             label: 'label.nicira.l3gatewayserviceuuid'
+                                        },
+										l2gatewayserviceuuid: {
+                                            label: 'label.nicira.l2gatewayserviceuuid'
                                         }
                                     }
                                 },
@@ -12539,6 +12542,9 @@
                         },
                         l3gatewayserviceuuid: {
                             label: 'label.nicira.l3gatewayserviceuuid'
+                        },
+						l2gatewayserviceuuid: {
+                            label: 'label.nicira.l2gatewayserviceuuid'
                         }
                     },
                     actions: {
@@ -12569,7 +12575,10 @@
                                     },
                                     l3gatewayserviceuuid: {
                                         label: 'label.nicira.l3gatewayserviceuuid'
-                                    }
+                                    },
+									l2gatewayserviceuuid: {
+										label: 'label.nicira.l2gatewayserviceuuid'
+									}
                                 }
                             },
                             action: function (args) {
@@ -12687,7 +12696,10 @@
                                     },
                                     l3gatewayserviceuuid: {
                                         label: 'label.nicira.l3gatewayserviceuuid'
-                                    }
+                                    },
+									l2gatewayserviceuuid: {
+										label: 'label.nicira.l2gatewayserviceuuid'
+									}
                                 }],
                                 dataProvider: function (args) {
                                     $.ajax({
@@ -20324,6 +20336,11 @@
         if (l3GatewayServiceUuid != null && l3GatewayServiceUuid.length > 0) {
             array1.push("&l3gatewayserviceuuid=" + todb(args.data.l3gatewayserviceuuid));
         }
+		
+		var l2GatewayServiceUuid = args.data.l2gatewayserviceuuid;
+        if (l2GatewayServiceUuid != null && l2GatewayServiceUuid.length > 0) {
+            array1.push("&l2gatewayserviceuuid=" + todb(args.data.l2gatewayserviceuuid));
+        }
 
         $.ajax({
             url: createURL(apiCmd + array1.join("")),