cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From du...@apache.org
Subject [3/6] git commit: updated refs/heads/ldapplugin to 7ded3c8
Date Sat, 31 Aug 2013 20:55:40 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'.


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

Branch: refs/heads/ldapplugin
Commit: 94cd470a0ae52ca79b703b251c973a465232366c
Parents: d4d42bb
Author: Jessica Wang <jessicawang@apache.org>
Authored: Fri Aug 30 14:52:44 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Fri Aug 30 14:56:29 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/94cd470a/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