From dev-return-51222-apmail-cloudstack-dev-archive=cloudstack.apache.org@cloudstack.apache.org Thu Jan 30 21:03:52 2014 Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F66D10B9D for ; Thu, 30 Jan 2014 21:03:52 +0000 (UTC) Received: (qmail 37261 invoked by uid 500); 30 Jan 2014 21:03:51 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 37163 invoked by uid 500); 30 Jan 2014 21:03:51 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 37155 invoked by uid 99); 30 Jan 2014 21:03:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 21:03:51 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Alena.Prokharchyk@citrix.com designates 66.165.176.89 as permitted sender) Received: from [66.165.176.89] (HELO SMTP.CITRIX.COM) (66.165.176.89) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 21:03:47 +0000 X-IronPort-AV: E=Sophos;i="4.95,752,1384300800"; d="scan'208";a="98267626" Received: from sjcpex01cl03.citrite.net ([10.216.14.145]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/AES128-SHA; 30 Jan 2014 21:03:22 +0000 Received: from SJCPEX01CL02.citrite.net ([169.254.2.110]) by SJCPEX01CL03.citrite.net ([10.216.14.145]) with mapi id 14.02.0342.004; Thu, 30 Jan 2014 13:03:21 -0800 From: Alena Prokharchyk To: "dev@cloudstack.apache.org" Subject: Re: git commit: updated refs/heads/master to cb073e0 Thread-Topic: git commit: updated refs/heads/master to cb073e0 Thread-Index: AQHPHfwumFkAASmAJ0aBsqRB4G3ocZqeRHIA//99OQA= Date: Thu, 30 Jan 2014 21:03:20 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.13.107.79] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Yes, will fix that in a min. -Alena. On 1/30/14, 12:52 PM, "Wei ZHOU" wrote: >Alena, > >Should the line > sb.and("zoneId", sb.entity().getZoneId(), SearchCriteria.Op.LIKE); >be SearchCriteria.Op.EQ ? > > > > >2014-01-30 > >> Updated Branches: >> refs/heads/master 13e6c2fe7 -> cb073e063 >> >> >> listAutoscaleVmProfiles: added zoneId to the list of optional api >> parameters >> >> >> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo >> Commit:=20 >>http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb073e06 >> Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb073e06 >> Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb073e06 >> >> Branch: refs/heads/master >> Commit: cb073e063450097f348fd2afd4006487ca99919a >> Parents: 13e6c2f >> Author: Alena Prokharchyk >> Authored: Thu Jan 30 11:57:12 2014 -0800 >> Committer: Alena Prokharchyk >> Committed: Thu Jan 30 12:36:56 2014 -0800 >> >> ---------------------------------------------------------------------- >> .../command/user/autoscale/ListAutoScaleVmProfilesCmd.java | 8 >>++++++++ >> server/src/com/cloud/network/as/AutoScaleManagerImpl.java | 6 ++++++ >> 2 files changed, 14 insertions(+) >> ---------------------------------------------------------------------- >> >> >> >>=20 >>http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb073e06/api/src/o >>rg/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCm >>d.java >> ---------------------------------------------------------------------- >> diff --git >>=20 >>a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleV >>mProfilesCmd.java >>=20 >>b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleV >>mProfilesCmd.java >> index 34c2543..5b4a46e 100644 >> --- >>=20 >>a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleV >>mProfilesCmd.java >> +++ >>=20 >>b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleV >>mProfilesCmd.java >> @@ -27,6 +27,7 @@ import >> org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; >> import org.apache.cloudstack.api.response.ListResponse; >> import org.apache.cloudstack.api.response.ServiceOfferingResponse; >> import org.apache.cloudstack.api.response.TemplateResponse; >> +import org.apache.cloudstack.api.response.ZoneResponse; >> import org.apache.log4j.Logger; >> >> import com.cloud.network.as.AutoScaleVmProfile; >> @@ -53,6 +54,9 @@ public class ListAutoScaleVmProfilesCmd extends >> BaseListProjectAndAccountResourc >> @Parameter(name =3D ApiConstants.OTHER_DEPLOY_PARAMS, type =3D >> CommandType.STRING, description =3D "the otherdeployparameters of the >> autoscale vm profile") >> private String otherDeployParams; >> >> + @Parameter(name =3D ApiConstants.ZONE_ID, type =3D CommandType.UUID= , >> entityType =3D ZoneResponse.class, since =3D "4.4", description =3D >>"availability >> zone for the auto deployed virtual machine") >> + private Long zoneId; >> + >> // /////////////////////////////////////////////////// >> // ///////////////// Accessors /////////////////////// >> // /////////////////////////////////////////////////// >> @@ -73,10 +77,14 @@ public class ListAutoScaleVmProfilesCmd extends >> BaseListProjectAndAccountResourc >> return serviceOffId; >> } >> >> + public Long getZoneId() { >> + return zoneId; >> + } >> // /////////////////////////////////////////////////// >> // ///////////// API Implementation/////////////////// >> // /////////////////////////////////////////////////// >> >> + >> @Override >> public String getCommandName() { >> return s_name; >> >> >>=20 >>http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb073e06/server/sr >>c/com/cloud/network/as/AutoScaleManagerImpl.java >> ---------------------------------------------------------------------- >> diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java >> b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java >> index 7492c9a..7eeec9c 100644 >> --- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java >> +++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java >> @@ -438,6 +438,7 @@ public class AutoScaleManagerImpl extends >> ManagerBase implements AutoScale >> Long templateId =3D cmd.getTemplateId(); >> String otherDeployParams =3D cmd.getOtherDeployParams(); >> Long serviceOffId =3D cmd.getServiceOfferingId(); >> + Long zoneId =3D cmd.getZoneId(); >> >> SearchWrapper searchWrapper =3D new >> SearchWrapper(_autoScaleVmProfileDao, >> AutoScaleVmProfileVO.class, cmd, cmd.getId()); >> SearchBuilder sb =3D >> searchWrapper.getSearchBuilder(); >> @@ -446,6 +447,7 @@ public class AutoScaleManagerImpl extends >> ManagerBase implements AutoScale >> sb.and("templateId", sb.entity().getTemplateId(), >> SearchCriteria.Op.EQ); >> sb.and("serviceOfferingId", sb.entity().getServiceOfferingId(), >> SearchCriteria.Op.EQ); >> sb.and("otherDeployParams", sb.entity().getOtherDeployParams(), >> SearchCriteria.Op.LIKE); >> + sb.and("zoneId", sb.entity().getZoneId(), >>SearchCriteria.Op.LIKE); >> SearchCriteria sc =3D >> searchWrapper.buildSearchCriteria(); >> >> if (id !=3D null) { >> @@ -462,6 +464,10 @@ public class AutoScaleManagerImpl extends >> ManagerBase implements AutoScale >> sc.setParameters("serviceOfferingId", serviceOffId); >> } >> >> + if (zoneId !=3D null) { >> + sc.setParameters("zoneId", zoneId); >> + } >> + >> return searchWrapper.search(); >> } >> >> >>