You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/04/11 22:24:52 UTC

[13/34] git commit: updated refs/heads/master to 6137d32

API changes to expose the commands


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

Branch: refs/heads/master
Commit: 708157d33fd32b186f59687d176b9251bdb7d23c
Parents: c8ae2a9
Author: Prachi Damle <pr...@cloud.com>
Authored: Fri Mar 22 14:57:27 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:22:59 2013 -0700

----------------------------------------------------------------------
 .../user/affinitygroup/CreateAffinityGroupCmd.java |    4 +-
 .../api/response/DeploymentPlannersResponse.java   |   37 +++++++++++++++
 client/pom.xml                                     |    5 ++
 client/tomcatconf/commands.properties.in           |    3 +
 .../affinity/AffinityGroupServiceImpl.java         |    2 +-
 5 files changed, 48 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/708157d3/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
index b465214..96de4aa 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
@@ -43,10 +43,10 @@ public class CreateAffinityGroupCmd extends BaseAsyncCreateCmd {
     // ////////////// API parameters /////////////////////
     // ///////////////////////////////////////////////////
 
-    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, required = true, description = "an account for the affinity group. Must be used with domainId.")
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an account for the affinity group. Must be used with domainId.")
     private String accountName;
 
-    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = true, description = "domainId of the account owning the affinity group", entityType = DomainResponse.class)
+    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, description = "domainId of the account owning the affinity group", entityType = DomainResponse.class)
     private Long domainId;
 
     @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "optional description of the affinity group")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/708157d3/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java b/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java
new file mode 100644
index 0000000..a37800f
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java
@@ -0,0 +1,37 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.api.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+
+public class DeploymentPlannersResponse extends BaseResponse {
+    @SerializedName(ApiConstants.NAME)
+    @Param(description = "Deployment Planner name")
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/708157d3/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index cd61dfc..08946b6 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -234,6 +234,11 @@
       <artifactId>cloud-plugin-snmp-alerts</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-plugin-host-anti-affinity</artifactId>
+      <version>${project.version}</version>
+    </dependency>
   </dependencies>
   <build>
     <defaultGoal>install</defaultGoal>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/708157d3/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index e4823d9..55fa599 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -571,3 +571,6 @@ addBaremetalHost=1
 
 #### Affinity group commands
 createAffinityGroup=15
+deleteAffinityGroup=15
+listAffinityGroups=15
+updateVMAffinityGroup=15

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/708157d3/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index f6c87cb..21052d0 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -231,7 +231,7 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
             return false;
         }
         if ((newState == State.Expunging)) {
-            // cleanup all affinity groups associated to the Expunged VM
+            // cleanup all affinity groups associations of the Expunged VM
             SearchCriteria<AffinityGroupVMMapVO> sc = _affinityGroupVMMapDao.createSearchCriteria();
             sc.addAnd("instanceId", SearchCriteria.Op.EQ, vo.getId());
             _affinityGroupVMMapDao.expunge(sc);