cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/5] git commit: updated refs/heads/master to 01ec8e6
Date Thu, 08 Dec 2016 18:57:34 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 11dd9fb1c -> 01ec8e67b


CLOUDSTACK-9269: Missing field for Switch type for Management and Storage traffic types

Showing vswitchtype for all traffic types in case of VMware.


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

Branch: refs/heads/master
Commit: 13e66c5e78db58e45124feba26fac88b9dc68b45
Parents: decb2e4
Author: Nitin Kumar Maharana <nitin.maharana@gmail.com>
Authored: Tue Feb 2 23:23:42 2016 +0530
Committer: Nitin Kumar Maharana <nitinkumar.maharana@accelerite.com>
Committed: Wed Dec 7 13:38:02 2016 +0530

----------------------------------------------------------------------
 ui/scripts/ui-custom/zoneWizard.js | 100 ++++++++++++++++----------------
 1 file changed, 49 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/13e66c5e/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index f8e8e20..e659df0 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -310,69 +310,67 @@
                 };
 
                 if(zoneType == 'Advanced') {
-                    if($trafficType.hasClass('guest') || $trafficType.hasClass('public'))
{
-                        if(trafficData.vSwitchType == null) {
-                             var useDvs = false;
+                    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.dvswitch'
+                                     name: 'vmware.use.nexus.vswitch'
                                  },
                                  async: false,
                                  success: function(json) {
                                      if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
-                                         useDvs = true;
+                                         useNexusDvs = 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';
-                                     fields.vSwitchName.defaultValue = 'epp0';
-                                 } else {
-                                     trafficData.vSwitchType = 'vmwaredvs';
-                                     fields.vSwitchName.defaultValue = 'dvSwitch0';
-                                 }
-                             } else { //useDvs == false
-                                 trafficData.vSwitchType = 'vmwaresvs';
-                                 fields.vSwitchName.defaultValue = 'vSwitch0';
+                             if (useNexusDvs == true) {
+                                 trafficData.vSwitchType = 'nexusdvs';
+                                 fields.vSwitchName.defaultValue = 'epp0';
+                             } else {
+                                 trafficData.vSwitchType = 'vmwaredvs';
+                                 fields.vSwitchName.defaultValue = 'dvSwitch0';
                              }
-                        }
-
-                        $.extend(fields, {
-                            vSwitchType: {
-                                    label: 'label.vSwitch.type',
-                                select: function (args) {
-                                    args.response.success({
-                                        data: [{
-                                            id: 'nexusdvs',
-                                            description: 'Cisco Nexus 1000v Distributed Virtual
Switch'
-                                        }, {
-                                            id: 'vmwaresvs',
-                                            description: 'VMware vNetwork Standard Virtual
Switch'
-                                        }, {
-                                            id: 'vmwaredvs',
-                                            description: 'VMware vNetwork Distributed Virtual
Switch'
-                                        }]
-                                    });
-                                },
-                                defaultValue: trafficData.vSwitchType
-                            }
-                        });
+                         } else { //useDvs == false
+                             trafficData.vSwitchType = 'vmwaresvs';
+                             fields.vSwitchName.defaultValue = 'vSwitch0';
+                         }
                     }
+
+                    $.extend(fields, {
+                        vSwitchType: {
+                                label: 'label.vSwitch.type',
+                            select: function (args) {
+                                args.response.success({
+                                    data: [{
+                                        id: 'nexusdvs',
+                                        description: 'Cisco Nexus 1000v Distributed Virtual
Switch'
+                                    }, {
+                                        id: 'vmwaresvs',
+                                        description: 'VMware vNetwork Standard Virtual Switch'
+                                    }, {
+                                        id: 'vmwaredvs',
+                                        description: 'VMware vNetwork Distributed Virtual
Switch'
+                                    }]
+                                });
+                            },
+                            defaultValue: trafficData.vSwitchType
+                        }
+                    });
                 }
             } else {
                 fields = {


Mime
View raw message