cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/master to 8297445
Date Mon, 27 May 2013 13:02:14 GMT
Updated Branches:
  refs/heads/master fac59a742 -> 82974458a


CLOUDSTACK-2672: Adding isVolatile parameter in service offering response object
Signed off by :- Nitin Mehta <nitin.mehta@citrix.com>


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

Branch: refs/heads/master
Commit: 82974458a675c52e888c91f569f0f1ca278197d7
Parents: fac59a7
Author: Harikrishna Patnala <harikrishna.patnala@citrix.com>
Authored: Mon May 27 18:24:35 2013 +0530
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Mon May 27 18:25:29 2013 +0530

----------------------------------------------------------------------
 .../api/response/ServiceOfferingResponse.java      |   11 +++++++++++
 .../api/query/dao/ServiceOfferingJoinDaoImpl.java  |    1 +
 .../cloud/api/query/vo/ServiceOfferingJoinVO.java  |   11 +++++++++++
 setup/db/db/schema-410to420.sql                    |    1 +
 4 files changed, 24 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/82974458/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
index 08ebbb0..31533f8 100644
--- a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java
@@ -60,6 +60,9 @@ public class ServiceOfferingResponse extends BaseResponse {
     @SerializedName("limitcpuuse") @Param(description="restrict the CPU usage to committed
service offering")
     private Boolean limitCpuUse;
 
+    @SerializedName("isvolatile") @Param(description="true if the vm needs to be volatile,
i.e., on every reboot of vm from API root disk is discarded and creates a new root disk")
+    private Boolean isVolatile;
+
     @SerializedName("tags") @Param(description="the tags for the service offering")
     private String tags;
 
@@ -237,4 +240,12 @@ public class ServiceOfferingResponse extends BaseResponse {
     public void setDeploymentPlanner(String deploymentPlanner) {
         this.deploymentPlanner = deploymentPlanner;
     }
+
+    public boolean getVolatileVm() {
+        return isVolatile;
+    }
+
+    public void setVolatileVm(boolean isVolatile) {
+        this.isVolatile = isVolatile;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/82974458/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
index ce20562..56e4d0a 100644
--- a/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java
@@ -68,6 +68,7 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo
                 : ServiceOffering.StorageType.shared.toString());
         offeringResponse.setOfferHa(offering.isOfferHA());
         offeringResponse.setLimitCpuUse(offering.isLimitCpuUse());
+        offeringResponse.setVolatileVm(offering.getVolatileVm());
         offeringResponse.setTags(offering.getTags());
         offeringResponse.setDomain(offering.getDomainName());
         offeringResponse.setDomainId(offering.getDomainUuid());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/82974458/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java b/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
index 598e1d1..e87a101 100644
--- a/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java
@@ -75,6 +75,9 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
     @Column(name="limit_cpu_use")
     private boolean limitCpuUse;
 
+    @Column(name="is_volatile")
+    private boolean volatileVm;
+
     @Column(name="host_tag")
     private String hostTag;
 
@@ -318,5 +321,13 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
         this.deploymentPlanner = deploymentPlanner;
     }
 
+    public boolean getVolatileVm() {
+        return volatileVm;
+    }
+
+    public void setVolatileVm(boolean volatileVm) {
+        this.volatileVm = volatileVm;
+    }
+
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/82974458/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 1c9a8c1..348523f 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -1026,6 +1026,7 @@ CREATE VIEW `cloud`.`service_offering_view` AS
         service_offering.default_use,
         service_offering.vm_type,
         service_offering.sort_key,
+        service_offering.is_volatile,
         service_offering.deployment_planner,
         domain.id domain_id,
         domain.uuid domain_uuid,


Mime
View raw message