mirror of https://github.com/apache/cloudstack.git
fixing the build _ AffinityGroup command changes
This commit is contained in:
parent
96a64b933e
commit
af14699c4c
|
|
@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.AclEntityType;
|
||||
import org.apache.cloudstack.affinity.AffinityGroup;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
|
|
@ -34,7 +35,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "createAffinityGroup", responseObject = AffinityGroupResponse.class, description = "Creates an affinity/anti-affinity group")
|
||||
@APICommand(name = "createAffinityGroup", responseObject = AffinityGroupResponse.class, description = "Creates an affinity/anti-affinity group", entityType = { AclEntityType.AffinityGroup })
|
||||
public class CreateAffinityGroupCmd extends BaseAsyncCreateCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(CreateAffinityGroupCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.AclEntityType;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiCommandJobType;
|
||||
|
|
@ -34,7 +35,7 @@ import com.cloud.event.EventTypes;
|
|||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@APICommand(name = "deleteAffinityGroup", description = "Deletes affinity group", responseObject = SuccessResponse.class)
|
||||
@APICommand(name = "deleteAffinityGroup", description = "Deletes affinity group", responseObject = SuccessResponse.class, entityType = { AclEntityType.AffinityGroup })
|
||||
public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(DeleteAffinityGroupCmd.class.getName());
|
||||
private static final String s_name = "deleteaffinitygroupresponse";
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
package org.apache.cloudstack.api.command.user.affinitygroup;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.cloudstack.acl.AclEntityType;
|
||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiCommandJobType;
|
||||
|
|
@ -26,7 +27,7 @@ import org.apache.cloudstack.api.Parameter;
|
|||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
import org.apache.cloudstack.api.response.UserVmResponse;
|
||||
|
||||
@APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject = AffinityGroupResponse.class)
|
||||
@APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject = AffinityGroupResponse.class, entityType = { AclEntityType.AffinityGroup })
|
||||
public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListAffinityGroupsCmd.class.getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -372,4 +372,11 @@ public class MockAccountManager extends ManagerBase implements AccountManager {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName,
|
||||
ControlledEntity... entities) throws PermissionDeniedException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -344,4 +344,11 @@ public class MockAccountManagerImpl extends ManagerBase implements Manager, Acco
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName,
|
||||
ControlledEntity... entities) throws PermissionDeniedException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,7 +154,6 @@ public class RoleBasedEntityAccessChecker extends DomainChecker implements Secur
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ public class AclApiServiceImpl extends ManagerBase implements AclApiService, Man
|
|||
List<AclPolicy> policies = _iamSrv.listAclPolicies(accountId);
|
||||
AclPolicyPermission curPerm = null;
|
||||
for (AclPolicy policy : policies) {
|
||||
List<AclPolicyPermission> perms = _iamSrv.listPolicyPermissionByEntityType(policy.getId(), action,
|
||||
List<AclPolicyPermission> perms = _iamSrv.listPolicyPermissionByActionAndEntity(policy.getId(), action,
|
||||
entityType);
|
||||
if (perms == null || perms.size() == 0)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue