mirror of https://github.com/apache/cloudstack.git
CS-14687: When a valid instance id that does not belong to the current user is passed to ec2-stop-instances,ec2-start-instances,ec2-terminate-instances, api does not return anythin
Changes: Throw error if LookUpInstances fails to list the Vm by id.
This commit is contained in:
parent
3d0811ecb7
commit
4c163bfab0
|
|
@ -1795,6 +1795,11 @@ public class EC2Engine {
|
|||
}
|
||||
instances.addInstance(ec2Vm);
|
||||
}
|
||||
}else{
|
||||
if(instanceId != null){
|
||||
//no such instance found
|
||||
throw new EC2ServiceException(ServerError.InternalError, "Instance:" + instanceId + " not found");
|
||||
}
|
||||
}
|
||||
return instances;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue