summaryrefslogtreecommitdiffstats
path: root/config-provisioning/src/main/java/com/yahoo/config/provision/SystemName.java
blob: 36be370720675835ee0ff43e7da1efae74e499d1 (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 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;

/**
 * Systems in hosted Vespa
 *
 * @author mpolden
 */
public enum SystemName {

    /** System for continuous deployment where a pre-test of hosted Vespa combined with a verified Vespa version */
    cd,

    /** Production system */
    main;

    public static SystemName defaultSystem() {
        return main;
    }

    public static SystemName from(String value) {
        switch (value) {
            case "cd": return cd;
            case "main": return main;
            default: throw new IllegalArgumentException(String.format("'%s' is not a valid system", value));
        }
    }

}