Search in sources :

Example 1 with ByCLI

use of hudson.slaves.OfflineCause.ByCLI in project hudson-2.x by hudson.

the class Computer method cliOffline.

/**
 * CLI command to mark the node offline.
 */
@CLIMethod(name = "offline-node")
public void cliOffline(@Option(name = "-m", usage = "Record the note about why you are disconnecting this node") String cause) throws ExecutionException, InterruptedException {
    checkPermission(Hudson.ADMINISTER);
    setTemporarilyOffline(true, new ByCLI(cause));
}
Also used : ByCLI(hudson.slaves.OfflineCause.ByCLI) CLIMethod(hudson.cli.declarative.CLIMethod)

Aggregations

CLIMethod (hudson.cli.declarative.CLIMethod)1 ByCLI (hudson.slaves.OfflineCause.ByCLI)1