aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/ClusterControllerNodeState.java
blob: 8c829b607e899a16a20fbac50f0c0d4224a8da0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.orchestrator.controller;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * This denotes the different states passable through the set-node-state API against the ClusterController.
 * In the cluster controller, it maps to com.yahoo.vdslib.state.State. Consider using that instead (however
 * that class is already fairly complicated, and may perhaps best be screened from JSON annotations - the only
 * thing we need is the enum < - > String conversions).
 *
 * @author hakonhall
 */
public enum ClusterControllerNodeState {
    MAINTENANCE("maintenance"),
    UP("up"),
    DOWN("down");

    private final String wireName;

    ClusterControllerNodeState(final String wireName) {
        this.wireName = wireName;
    }

    @JsonValue
    public String getWireName() {
        return wireName;
    }
}