mirror of https://github.com/apache/cloudstack.git
Always set the response type on the command object so that the correct output is generated. Add both Strings and Longs to the login response (domainId and userId will be the Longs). Use the correct method name for ListSystemVMsCmd.
This commit is contained in:
parent
da660f2575
commit
0105aec338
|
|
@ -324,6 +324,7 @@ public class ApiServer implements HttpRequestHandler {
|
|||
Class<?> cmdClass = Class.forName(cmdClassName);
|
||||
BaseCmd cmdObj = (BaseCmd)cmdClass.newInstance();
|
||||
|
||||
cmdObj.setResponseType(responseType);
|
||||
// This is where the command is either serialized, or directly dispatched
|
||||
response = queueCommand(cmdObj, paramMap);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -285,8 +285,8 @@ public class ApiServlet extends HttpServlet {
|
|||
while (attrNames.hasMoreElements()) {
|
||||
String attrName = (String)attrNames.nextElement();
|
||||
Object attrObj = session.getAttribute(attrName);
|
||||
if (attrObj instanceof String) {
|
||||
sb.append(", \"" + attrName + "\" : \"" + (String)attrObj + "\"");
|
||||
if ((attrObj instanceof String) || (attrObj instanceof Long)) {
|
||||
sb.append(", \"" + attrName + "\" : \"" + attrObj.toString() + "\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import com.cloud.vm.SecondaryStorageVmVO;
|
|||
import com.cloud.vm.SystemVm;
|
||||
import com.cloud.vm.VMInstanceVO;
|
||||
|
||||
@Implementation(method="searchForSystemVms")
|
||||
@Implementation(method="searchForSystemVm")
|
||||
public class ListSystemVMsCmd extends BaseListCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListSystemVMsCmd.class.getName());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue