Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E416C115C5 for ; Thu, 11 Sep 2014 19:00:11 +0000 (UTC) Received: (qmail 51445 invoked by uid 500); 11 Sep 2014 19:00:11 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 51416 invoked by uid 500); 11 Sep 2014 19:00:11 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 51407 invoked by uid 99); 11 Sep 2014 19:00:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2014 19:00:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4F3AC9BD33E; Thu, 11 Sep 2014 19:00:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 3077510 Date: Thu, 11 Sep 2014 19:00:11 +0000 (UTC) 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 Authored: Mon Jun 2 17:59:59 2014 +0100 Committer: Brian Federle 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",