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/dea9bf7d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dea9bf7d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dea9bf7d

Branch: refs/heads/affinity_groups
Commit: dea9bf7dc6921a8842b8cdf5f485491477e02158
Parents: 051d367
Author: Prachi Damle <pra...@cloud.com>
Authored: Fri Mar 22 14:57:27 2013 -0700
Committer: Prachi Damle <pra...@cloud.com>
Committed: Fri Mar 29 10:52:44 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/dea9bf7d/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/dea9bf7d/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/dea9bf7d/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 23892e1..43cce4a 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -229,6 +229,11 @@
         <artifactId>cloud-plugin-storage-volume-default</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/dea9bf7d/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/dea9bf7d/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);

Reply via email to