From 098a1f677146bd70d81e81962e40d3edf5439ef3 Mon Sep 17 00:00:00 2001 From: Ryan Morgan Date: Wed, 9 Sep 2009 17:07:26 -0700 Subject: [PATCH] [HHQ-3248] Add support for ControlApi. --- ChangeLog | 3 + hqu/hqapi1/app/ControlController.groovy | 126 ++++++++++++++ src/org/hyperic/hq/hqapi1/ControlApi.java | 117 +++++++++++++ src/org/hyperic/hq/hqapi1/HQApi.java | 13 ++ .../hq/hqapi1/test/ControlAction_test.java | 35 ++++ .../hq/hqapi1/test/ControlExecute_test.java | 35 ++++ .../hq/hqapi1/test/ControlHistory_test.java | 35 ++++ .../hq/hqapi1/test/WADLControl_test.java | 61 +++++++ .../hq/hqapi1/tools/ControlCommand.java | 163 ++++++++++++++++++ src/org/hyperic/hq/hqapi1/tools/Shell.java | 1 + xsd/HQApi1.wadl | 73 ++++++++ xsd/HQApi1.xsd | 40 +++++ 12 files changed, 702 insertions(+) create mode 100644 hqu/hqapi1/app/ControlController.groovy create mode 100644 src/org/hyperic/hq/hqapi1/ControlApi.java create mode 100644 src/org/hyperic/hq/hqapi1/test/ControlAction_test.java create mode 100644 src/org/hyperic/hq/hqapi1/test/ControlExecute_test.java create mode 100644 src/org/hyperic/hq/hqapi1/test/ControlHistory_test.java create mode 100644 src/org/hyperic/hq/hqapi1/test/WADLControl_test.java create mode 100644 src/org/hyperic/hq/hqapi1/tools/ControlCommand.java diff --git a/ChangeLog b/ChangeLog index da13ad93..6bf5325b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ Changes in HQApi 3.0 + *) [HHQ-3248] Add ControlApi for running control actions and viewing control + action history. + *) [HHQ-3367] Trim whitespace from properties included in client.properties. *) [HHQ-3284] Add EventApi for gathering events globally or by resource. diff --git a/hqu/hqapi1/app/ControlController.groovy b/hqu/hqapi1/app/ControlController.groovy new file mode 100644 index 00000000..4b6926f5 --- /dev/null +++ b/hqu/hqapi1/app/ControlController.groovy @@ -0,0 +1,126 @@ +import org.hyperic.hq.hqapi1.ErrorCode; +import org.hyperic.hq.control.server.session.ControlScheduleManagerEJBImpl as CMan +import org.hyperic.util.pager.PageControl + +class ControlController extends ApiController { + + private Closure getHistoryXML(h) { + { doc -> + ControlHistory(scheduled: h.scheduled, + dateScheduled: h.dateScheduled, + endTime: h.endTime, + startTime: h.startTime, + status: h.status, + message: h.message, + description: h.description, + args: h.args, + action: h.action) + } + } + + private Closure getActionXML(action) { + { doc -> + Action(action) + } + } + + def actions(params) { + def failureXml = null + def resourceId = params.getOne('resourceId')?.toInteger() + + def resource = getResource(resourceId) + + def actions = [] + if (!resource) { + failureXml = getFailureXML(ErrorCode.OBJECT_NOT_FOUND, + "Resource id " + resourceId + " not found") + } else { + // TODO: Seems that permissions are not applied here. XXX: need test + actions = resource.getControlActions(user) + } + + renderXml() { + out << ControlActionResponse() { + if (failureXml) { + out << failureXml + } else { + // TODO: If resource has no actions should there be an error? + out << getSuccessXML() + for (action in actions.sort {a, b -> a <=> b}) { + out << getActionXML(action) + } + } + } + } + } + + def history(params) { + def failureXml = null + def resourceId = params.getOne('resourceId')?.toInteger() + + def resource = getResource(resourceId) + def history = [] + if (!resource) { + failureXml = getFailureXML(ErrorCode.OBJECT_NOT_FOUND, + "Resource id " + resourceId + " not found") + } else { + // TODO: This needs to be pulled into ResourceHelper + def cMan = CMan.one + history = cMan.findJobHistory(user, resource.entityId, + PageControl.PAGE_ALL) + } + + renderXml() { + out << ControlHistoryResponse() { + if (failureXml) { + out << failureXml + } else { + out << getSuccessXML() + for (h in history) { + out << getHistoryXML(h) + } + } + } + } + } + + def execute(params) { + def failureXml = null + def resourceId = params.getOne('resourceId')?.toInteger() + def action = params.getOne('action') + def arguments = params.get('arguments')?.join(",") + + def resource = getResource(resourceId) + if (!resource) { + failureXml = getFailureXML(ErrorCode.OBJECT_NOT_FOUND, + "Resource id " + resourceId + " not found") + } else if (!action) { + failureXml = getFailureXML(ErrorCode.INVALID_PARAMETERS, + "No action given") + } else { + try { + resource.runAction(user, action, arguments) + } catch (org.hyperic.hq.product.PluginException e) { + failureXml = getFailureXML(ErrorCode.NOT_SUPPORTED, + "Resource id " + resourceId + + " does not support action " + action) + } catch (org.hyperic.hq.authz.shared.PermissionException e) { + failureXml = getFailureXML(ErrorCode.PERMISSION_DENIED) + } catch (Exception e) { + failureXml = getFailureXML(ErrorCode.UNEXPECTED_ERROR, + "Unexpected error: " + e.getMessage()) + } + } + + renderXml() { + out << StatusResponse() { + if (failureXml) { + out << failureXml + } else { + out << getSuccessXML() + } + } + } + } +} + diff --git a/src/org/hyperic/hq/hqapi1/ControlApi.java b/src/org/hyperic/hq/hqapi1/ControlApi.java new file mode 100644 index 00000000..21d71c6a --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/ControlApi.java @@ -0,0 +1,117 @@ +/* + * + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2008, 2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + */ + +package org.hyperic.hq.hqapi1; + +import org.hyperic.hq.hqapi1.types.ControlHistoryResponse; +import org.hyperic.hq.hqapi1.types.Resource; +import org.hyperic.hq.hqapi1.types.ControlActionResponse; +import org.hyperic.hq.hqapi1.types.StatusResponse; + +import java.io.IOException; +import java.util.Map; +import java.util.HashMap; + +/** + * The Hyperic HQ Control API. + *

+ * This class provides access to the control actions within the HQ system. Each of + * the methods in this class return response objects that wrap the result of the + * method with a {@link org.hyperic.hq.hqapi1.types.ResponseStatus} and a + * {@link org.hyperic.hq.hqapi1.types.ServiceError} that indicates the error + * if the response status is {@link org.hyperic.hq.hqapi1.types.ResponseStatus#FAILURE}. + */ +public class ControlApi extends BaseApi { + + ControlApi(HQConnection conn) { + super(conn); + } + + /** + * Get the Control history for the given Resource. + * + * @param r The {@link org.hyperic.hq.hqapi1.types.Resource} to query. + * + * @return On {@link org.hyperic.hq.hqapi1.types.ResponseStatus#SUCCESS}, + * a list of {@link org.hyperic.hq.hqapi1.types.ControlHistory}'s are returned via + * {@link org.hyperic.hq.hqapi1.types.ControlHistoryResponse#getControlHistory()}. + * + * @throws IOException If a network error occurs while making the request. + */ + public ControlHistoryResponse getHistory(Resource r) + throws IOException + { + Map params = new HashMap(); + params.put("resourceId", new String[] { Integer.toString(r.getId())}); + + return doGet("control/history.hqu", params, ControlHistoryResponse.class); + } + + /** + * Get the Control actions for the given Resource. + * + * @param r The {@link org.hyperic.hq.hqapi1.types.Resource} to query. + * + * @return On {@link org.hyperic.hq.hqapi1.types.ResponseStatus#SUCCESS}, + * a list of actions are returned via + * {@link org.hyperic.hq.hqapi1.types.ControlActionResponse#getAction()}. + * + * @throws IOException If a network error occurs while making the request. + */ + public ControlActionResponse getActions(Resource r) + throws IOException + { + Map params = new HashMap(); + params.put("resourceId", new String[] { Integer.toString(r.getId())}); + + return doGet("control/actions.hqu", params, ControlActionResponse.class); + } + + /** + * Execute a Control action on the given Resource. + * + * @param r The {@link org.hyperic.hq.hqapi1.types.Resource} to execute the action on. + * @param action The action to run. + * @param arguments An array of arguments to pass to the action. + * + * @return {@link org.hyperic.hq.hqapi1.types.ResponseStatus#SUCCESS} + * if the action was executed successfully. + * + * @throws IOException If a network error occurs while making the request. + */ + public StatusResponse executeAction(Resource r, String action, + String[] arguments) + throws IOException + { + Map params = new HashMap(); + params.put("resourceId", new String[] { Integer.toString(r.getId())}); + params.put("action", new String[] { action }); + params.put("arguments", arguments); + + return doGet("control/execute.hqu", params, StatusResponse.class); + } +} diff --git a/src/org/hyperic/hq/hqapi1/HQApi.java b/src/org/hyperic/hq/hqapi1/HQApi.java index 263cfb1a..685a0b91 100644 --- a/src/org/hyperic/hq/hqapi1/HQApi.java +++ b/src/org/hyperic/hq/hqapi1/HQApi.java @@ -49,6 +49,7 @@ public class HQApi { private final AlertApi _alertApi; private final MetricDataApi _metricDataApi; private final EventApi _eventApi; + private final ControlApi _controlApi; /** * @param host The hostname of the HQ Server to connect to. @@ -76,6 +77,7 @@ public HQApi(String host, int port, boolean isSecure, String user, _alertApi = new AlertApi(connection); _metricDataApi = new MetricDataApi(connection); _eventApi = new EventApi(connection); + _controlApi = new ControlApi(connection); } /** @@ -208,8 +210,19 @@ public AlertApi getAlertApi() { /** * List events in HQ + * + * @return The API for finding Events. */ public EventApi getEventApi() { return _eventApi; } + + /** + * View actions, control history and issue commands on Resources. + * + * @return The API for viewing and issuing control actions. + */ + public ControlApi getControlApi() { + return _controlApi; + } } diff --git a/src/org/hyperic/hq/hqapi1/test/ControlAction_test.java b/src/org/hyperic/hq/hqapi1/test/ControlAction_test.java new file mode 100644 index 00000000..787a7d03 --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/test/ControlAction_test.java @@ -0,0 +1,35 @@ +/* + * + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2008, 2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + */ + +package org.hyperic.hq.hqapi1.test; + +public class ControlAction_test extends HQApiTestBase { + + public ControlAction_test(String name) { + super(name); + } +} diff --git a/src/org/hyperic/hq/hqapi1/test/ControlExecute_test.java b/src/org/hyperic/hq/hqapi1/test/ControlExecute_test.java new file mode 100644 index 00000000..7b8b4f6a --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/test/ControlExecute_test.java @@ -0,0 +1,35 @@ +/* + * + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2008, 2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + */ + +package org.hyperic.hq.hqapi1.test; + +public class ControlExecute_test extends HQApiTestBase { + + public ControlExecute_test(String name) { + super(name); + } +} diff --git a/src/org/hyperic/hq/hqapi1/test/ControlHistory_test.java b/src/org/hyperic/hq/hqapi1/test/ControlHistory_test.java new file mode 100644 index 00000000..c469eaa5 --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/test/ControlHistory_test.java @@ -0,0 +1,35 @@ +/* + * + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2008, 2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + */ + +package org.hyperic.hq.hqapi1.test; + +public class ControlHistory_test extends HQApiTestBase { + + public ControlHistory_test(String name) { + super(name); + } +} diff --git a/src/org/hyperic/hq/hqapi1/test/WADLControl_test.java b/src/org/hyperic/hq/hqapi1/test/WADLControl_test.java new file mode 100644 index 00000000..53248865 --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/test/WADLControl_test.java @@ -0,0 +1,61 @@ +/* + * + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2008, 2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + */ + +package org.hyperic.hq.hqapi1.test; + +import org.hyperic.hq.hqapi1.wadl.*; + +public class WADLControl_test extends WADLTestBase { + + public void testActions() throws Exception { + Endpoint.ControlActionsHqu actions = + new Endpoint.ControlActionsHqu(); + + ControlActionResponse response = + actions.getAsControlActionResponse(Integer.MAX_VALUE); + hqAssertFailure(response); // Id won't exist + } + + public void testHistory() throws Exception { + Endpoint.ControlHistoryHqu history = + new Endpoint.ControlHistoryHqu(); + + ControlHistoryResponse response = + history.getAsControlHistoryResponse(Integer.MAX_VALUE); + hqAssertFailure(response); // Id won't exist + } + + public void testExecute() throws Exception { + Endpoint.ControlExecuteHqu execute = + new Endpoint.ControlExecuteHqu(); + + StatusResponse response = + execute.getAsStatusResponse(Integer.MAX_VALUE, "none", + null); + hqAssertFailure(response); // Id won't exist + } +} diff --git a/src/org/hyperic/hq/hqapi1/tools/ControlCommand.java b/src/org/hyperic/hq/hqapi1/tools/ControlCommand.java new file mode 100644 index 00000000..831efd68 --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/tools/ControlCommand.java @@ -0,0 +1,163 @@ +/* + * + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2008, 2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + * + */ + +package org.hyperic.hq.hqapi1.tools; + +import joptsimple.OptionParser; +import joptsimple.OptionSet; + +import java.util.Arrays; +import java.util.Date; +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +import org.hyperic.hq.hqapi1.HQApi; +import org.hyperic.hq.hqapi1.ControlApi; +import org.hyperic.hq.hqapi1.ResourceApi; +import org.hyperic.hq.hqapi1.types.ResourceResponse; +import org.hyperic.hq.hqapi1.types.ControlActionResponse; +import org.hyperic.hq.hqapi1.types.StatusResponse; +import org.hyperic.hq.hqapi1.types.ControlHistoryResponse; +import org.hyperic.hq.hqapi1.types.ControlHistory; + +public class ControlCommand extends Command { + + private static String CMD_ACTIONS = "actions"; + private static String CMD_HISTORY = "history"; + private static String CMD_EXECUTE = "execute"; + + private static String[] COMMANDS = { CMD_ACTIONS, CMD_HISTORY, CMD_EXECUTE }; + + private static final String OPT_RESOURCE_ID = "resourceId"; + private static final String OPT_ACTION = "action"; + + private void printUsage() { + System.err.println("One of " + Arrays.toString(COMMANDS) + " required"); + } + + protected void handleCommand(String[] args) throws Exception { + if (args.length == 0) { + printUsage(); + System.exit(-1); + } + + if (args[0].equals(CMD_ACTIONS)) { + actions(trim(args)); + } else if (args[0].equals(CMD_HISTORY)){ + history(trim(args)); + } else if (args[0].equals(CMD_EXECUTE)) { + execute(trim(args)); + } else { + printUsage(); + System.exit(-1); + } + } + + private void actions(String[] args) throws Exception { + OptionParser p = getOptionParser(); + + p.accepts(OPT_RESOURCE_ID, "The resource id to get actions for"). + withRequiredArg().ofType(Integer.class); + + OptionSet options = getOptions(p, args); + + HQApi api = getApi(options); + ResourceApi rApi = api.getResourceApi(); + ControlApi cApi = api.getControlApi(); + + Integer resourceId = (Integer)getRequired(options, OPT_RESOURCE_ID); + ResourceResponse resourceResponse = rApi.getResource(resourceId, false, false); + checkSuccess(resourceResponse); + + ControlActionResponse response = cApi.getActions(resourceResponse.getResource()); + checkSuccess(response); + + System.out.println("Control actions for " + resourceResponse.getResource().getName()); + for (String action : response.getAction()) { + System.out.println(" - " + action); + } + } + + private void history(String[] args) throws Exception { + OptionParser p = getOptionParser(); + + p.accepts(OPT_RESOURCE_ID, "The resource id to get actions for"). + withRequiredArg().ofType(Integer.class); + + OptionSet options = getOptions(p, args); + + HQApi api = getApi(options); + ResourceApi rApi = api.getResourceApi(); + ControlApi cApi = api.getControlApi(); + + Integer resourceId = (Integer)getRequired(options, OPT_RESOURCE_ID); + ResourceResponse resourceResponse = rApi.getResource(resourceId, false, false); + checkSuccess(resourceResponse); + + ControlHistoryResponse response = cApi.getHistory(resourceResponse.getResource()); + checkSuccess(response); + + System.out.println("Control history for " + resourceResponse.getResource().getName()); + final DateFormat df = SimpleDateFormat.getInstance(); + for (ControlHistory h : response.getControlHistory()) { + System.out.println(df.format(new Date(h.getStartTime())) + + " action=" + h.getAction() + + " dur=" + (h.getEndTime() - h.getStartTime()) + + " status=" + h.getStatus()); + } + } + + private void execute(String[] args) throws Exception { + OptionParser p = getOptionParser(); + + p.accepts(OPT_RESOURCE_ID, "The resource id to get actions for"). + withRequiredArg().ofType(Integer.class); + + p.accepts(OPT_ACTION, "The control action to run") + .withRequiredArg().ofType(String.class); + + OptionSet options = getOptions(p, args); + + HQApi api = getApi(options); + ResourceApi rApi = api.getResourceApi(); + ControlApi cApi = api.getControlApi(); + + String action = (String)getRequired(options, OPT_ACTION); + Integer resourceId = (Integer)getRequired(options, OPT_RESOURCE_ID); + ResourceResponse resourceResponse = rApi.getResource(resourceId, false, false); + checkSuccess(resourceResponse); + + String[] arguments = options.nonOptionArguments(). + toArray(new String[options.nonOptionArguments().size()]); + StatusResponse response = cApi.executeAction(resourceResponse.getResource(), + action, arguments); + checkSuccess(response); + + System.out.println("Ran action '" + action + "' on " + + resourceResponse.getResource().getName()); + } +} diff --git a/src/org/hyperic/hq/hqapi1/tools/Shell.java b/src/org/hyperic/hq/hqapi1/tools/Shell.java index 6a01f8c3..7537fb72 100644 --- a/src/org/hyperic/hq/hqapi1/tools/Shell.java +++ b/src/org/hyperic/hq/hqapi1/tools/Shell.java @@ -51,6 +51,7 @@ public class Shell { _commands.put("serverConfig", new ServerConfigCommand()); _commands.put("alert", new AlertCommand()); _commands.put("event", new EventCommand()); + _commands.put("control", new ControlCommand()); } private static void printHelp() { diff --git a/xsd/HQApi1.wadl b/xsd/HQApi1.wadl index 37d0b49a..a52042d7 100644 --- a/xsd/HQApi1.wadl +++ b/xsd/HQApi1.wadl @@ -1525,6 +1525,79 @@ + + + + List available Control actions + + + + + + The id of the Resource to query for actions. + + + + + + + + + + + + List Control action history + + + + + + The id of the Resource to query for control history. + + + + + + + + + + + + Execute a Control action + + + + + + The id of the Resource to execute the action on. + + + + + The Control action to run. + + + + + Arguments to pass to the Control action. + + + + + + + + + diff --git a/xsd/HQApi1.xsd b/xsd/HQApi1.xsd index c244c5b1..578dd7c2 100644 --- a/xsd/HQApi1.xsd +++ b/xsd/HQApi1.xsd @@ -1019,4 +1019,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +