Updated Branches: refs/heads/master a4e61b71c -> 6137d327a
API changes for createAffinityGroup Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/119c5cea Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/119c5cea Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/119c5cea Branch: refs/heads/master Commit: 119c5ceada2ed40d65c723176a4d5f3af43a9026 Parents: a4e61b7 Author: Prachi Damle <[email protected]> Authored: Mon Feb 25 10:23:15 2013 -0800 Committer: Prachi Damle <[email protected]> Committed: Thu Apr 11 13:22:26 2013 -0700 ---------------------------------------------------------------------- api/src/org/apache/cloudstack/api/BaseCmd.java | 9 +++++---- client/tomcatconf/commands.properties.in | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/119c5cea/api/src/org/apache/cloudstack/api/BaseCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/BaseCmd.java b/api/src/org/apache/cloudstack/api/BaseCmd.java index 8fef422..c94f3fb 100644 --- a/api/src/org/apache/cloudstack/api/BaseCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseCmd.java @@ -27,6 +27,7 @@ import java.util.regex.Pattern; import javax.inject.Inject; +import org.apache.cloudstack.affinity.AffinityGroupService; import org.apache.cloudstack.query.QueryService; import org.apache.cloudstack.usage.UsageService; import org.apache.log4j.Logger; @@ -60,7 +61,6 @@ import com.cloud.projects.ProjectService; import com.cloud.resource.ResourceService; import com.cloud.server.ManagementService; import com.cloud.server.TaggedResourceService; -import com.cloud.storage.DataStoreProviderApiService; import com.cloud.storage.StorageService; import com.cloud.storage.VolumeApiService; import com.cloud.storage.snapshot.SnapshotService; @@ -132,6 +132,7 @@ public abstract class BaseCmd { @Inject public VMSnapshotService _vmSnapshotService; @Inject public DataStoreProviderApiService dataStoreProviderApiService; @Inject public VpcProvisioningService _vpcProvSvc; + @Inject public AffinityGroupService _affinityGroupService; public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException; @@ -154,7 +155,7 @@ public abstract class BaseCmd { /** * For commands the API framework needs to know the owner of the object being acted upon. This method is * used to determine that information. - * + * * @return the id of the account that owns the object being acted upon */ public abstract long getEntityOwnerId(); @@ -467,7 +468,7 @@ public abstract class BaseCmd { if (!enabledOnly || account.getState() == Account.State.enabled) { return account.getId(); } else { - throw new PermissionDeniedException("Can't add resources to the account id=" + account.getId() + " in state=" + account.getState() + " as it's no longer active"); + throw new PermissionDeniedException("Can't add resources to the account id=" + account.getId() + " in state=" + account.getState() + " as it's no longer active"); } } else { // idList is not used anywhere, so removed it now @@ -484,7 +485,7 @@ public abstract class BaseCmd { return project.getProjectAccountId(); } else { PermissionDeniedException ex = new PermissionDeniedException("Can't add resources to the project with specified projectId in state=" + project.getState() + " as it's no longer active"); - ex.addProxyObject(project, projectId, "projectId"); + ex.addProxyObject(project, projectId, "projectId"); throw ex; } } else { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/119c5cea/client/tomcatconf/commands.properties.in ---------------------------------------------------------------------- diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index 163c2ce..e4823d9 100644 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -568,3 +568,6 @@ revertToSnapshot=15 #### Baremetal commands addBaremetalHost=1 + +#### Affinity group commands +createAffinityGroup=15
