cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [15/21] git commit: updated refs/heads/4.2 to 51707d8
Date Tue, 03 Sep 2013 23:41:44 GMT
CLOUDSTACK-4089: UI > zone wizard > VMware hypervisor > physical network > edit
Public/Guest traffic type > vSwitchType dropdown > set default option upon configuration
'vmware.use.dvswtich' and 'vmware.use.nexus.vswitch'.
(cherry picked from commit 8d60e4436bbc71f62c52b2d3861ecad1cd82596b)

Signed-off-by: animesh <animesh@apache.org>


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

Branch: refs/heads/4.2
Commit: 38a7aba1c0ed3535031b35b2502f297c15a056ee
Parents: 655c375
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Aug 30 14:52:44 2013 -0700
Committer: animesh <animesh@apache.org>
Committed: Tue Sep 3 16:29:16 2013 -0700

----------------------------------------------------------------------
 ui/scripts/ui-custom/zoneWizard.js | 40 ++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/38a7aba1/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 254ea63..a1c5803 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -309,7 +309,45 @@
 	                }	                
 	            };  
             	
-            	if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {
+            	if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {    
       		
+            		if(trafficData.vSwitchType == null) {
+            			 var useDvs = false;
+                         $.ajax({
+                             url: createURL('listConfigurations'),
+                             data: {
+                                 name: 'vmware.use.dvswitch'
+                             },
+                             async: false,
+                             success: function(json) {
+                                 if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
+                                     useDvs = true;
+                                 }
+                             }
+                         });    
+                         if (useDvs == true) { 
+                        	 var useNexusDvs = false;                                      
     
+                             $.ajax({
+                                 url: createURL('listConfigurations'),
+                                 data: {
+                                     name: 'vmware.use.nexus.vswitch'
+                                 },
+                                 async: false,
+                                 success: function(json) {
+                                     if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
+                                         useNexusDvs = true;
+                                     }
+                                 }
+                             });
+                             if (useNexusDvs == true) {
+                            	 trafficData.vSwitchType = 'nexusdvs';
+                             } else {
+                            	 trafficData.vSwitchType = 'vmwaredvs';
+                             }   
+                         } else { //useDvs == false
+                        	 trafficData.vSwitchType = 'vmwaresvs';
+                         }                         
+            		}
+            		
             		$.extend(fields, {
             		    vSwitchType: {
             		        label: 'vSwitch Type',


Mime
View raw message