Package autotest.common

Examples of autotest.common.JsonRpcProxy


        params.put("id__in", ids);
        callRemove(params);
    }

    private void callRemove(JSONObject params) {
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
        rpcProxy.rpcCall("delete_recurring_runs", params,
                         new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                    NotifyManager.getInstance().showMessage("Recurring runs " +
                                                            "removed");
View Full Code Here


    }-*/;

    @SuppressWarnings("unused") // called from native
    private void initialize(String autotestServerUrl) {
        this.autotestServerUrl = autotestServerUrl;
        JsonRpcProxy proxy = JsonRpcProxy.createProxy(autotestServerUrl + JsonRpcProxy.TKO_BASE_URL,
                                                      true);
        JsonRpcProxy.setProxy(JsonRpcProxy.TKO_BASE_URL, proxy);
    }
View Full Code Here

        }
    }

    public static void callAbort(JSONObject params, final SimpleCallback onSuccess,
                                 final boolean showMessage) {
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
        rpcProxy.rpcCall("abort_host_queue_entries", params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                if (showMessage) {
                    NotifyManager.getInstance().showMessage("Jobs aborted");
                }
View Full Code Here

        callAbort(params, onSuccess, true);
    }

    public static void callReverify(JSONObject params, final SimpleCallback onSuccess,
                                    final String messagePrefix) {
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
        rpcProxy.rpcCall("reverify_hosts", params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {

                NotifyManager.getInstance().showMessage(
                        messagePrefix + " scheduled for reverification");
View Full Code Here

            profiles.set(profiles.size(), h.get("current_profile"));
        }
        args.put("hosts", hostnames);
        args.put("profiles", profiles);

        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
        rpcProxy.rpcCall("create_job", args, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                NotifyManager.getInstance().showMessage(messagePrefix + " scheduled for reinstall");
                if (listener != null) {
                    listener.onJobCreated((int) result.isNumber().doubleValue());
View Full Code Here

            return;
        }

        JSONObject params = new JSONObject();
        JSONArray array = new JSONArray();
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();

        array.set(0, reinstallTest.get("id"));
        params.put("tests", array);
        rpcProxy.rpcCall("generate_control_file", params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue controlInfo) {
                scheduleReinstallHelper(hosts, controlInfo.isObject(),
                                        messagePrefix, listener);
            }
View Full Code Here

            }
        });
    }

    public static void callModifyHosts(JSONObject params, final SimpleCallback onSuccess) {
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();
        rpcProxy.rpcCall("modify_hosts", params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                if (onSuccess != null) {
                    onSuccess.doCallback(null);
                }
View Full Code Here

        String functionName;
        if (reserve)
            functionName = "reserve_hosts";
        else
            functionName = "release_hosts";
        JsonRpcProxy rpcProxy = JsonRpcProxy.getProxy();

        rpcProxy.rpcCall(functionName, params, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                NotifyManager.getInstance().showMessage(message);
                callback.doCallback(null);
            }
View Full Code Here

TOP

Related Classes of autotest.common.JsonRpcProxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.