cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/master to 3077510
Date Thu, 11 Sep 2014 19:00:11 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master a698c3e27 -> 307751083


CLOUDSTACK-6722: [OVS][UI] Network created with StretchedL2Subnet is not available for vm
deployement in other zones


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

Branch: refs/heads/master
Commit: 30775108386e5f9d6fa9749508252fccb43437f7
Parents: a698c3e
Author: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Authored: Mon Jun 2 17:59:59 2014 +0100
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Thu Sep 11 11:56:46 2014 -0700

----------------------------------------------------------------------
 ui/scripts/instanceWizard.js | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/30775108/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 5664cce..6708330 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -509,6 +509,47 @@
                         }
                     });
 
+                    //In addition to the networks in the current zone, find networks in other
zones that have stretchedL2subnet==true
+                    //capability and show them on the UI
+                    var allOtherAdvancedZones = [];
+                    $.ajax({
+                        url: createURL('listZones'),
+                        dataType: "json",
+                        async: false,
+                        success: function(json) {
+                            var result = $.grep(json.listzonesresponse.zone, function(zone)
{
+                               return (zone.networktype == 'Advanced');
+                            });
+                            $(result).each(function() {
+                                if (selectedZoneObj.id != this.id)
+                                    allOtherAdvancedZones.push(this);
+                            });
+                        }
+                    });
+                    if (allOtherAdvancedZones.length > 0) {
+                        for (var i = 0; i < allOtherAdvancedZones.length; i++) {
+                            var networkDataForZone = {
+                                zoneId: allOtherAdvancedZones[i].id,
+                                canusefordeploy: true
+                            };
+                            $.ajax({
+                                url: createURL('listNetworks'),
+                                data: networkDataForZone,
+                                async: false,
+                                success: function(json) {
+                                    var networksInThisZone = json.listnetworksresponse.network
? json.listnetworksresponse.network : [];
+                                    if (networksInThisZone.length > 0) {
+                                        for (var i = 0; i < networksInThisZone.length;
i++) {
+                                            if (networksInThisZone[i].strechedl2subnet) {
+                                                networkObjsToPopulate.push(networksInThisZone[i]);
+                                            }
+                                        }
+                                    }
+                                }
+                            });
+                        }
+                    }
+
                     $.ajax({
                         url: createURL("listNetworkOfferings"),
                         dataType: "json",


Mime
View raw message