All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testifyproject.github.dockerjava.api.model.SELContext Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package org.testifyproject.testifyproject.github.dockerjava.api.model;

/**
 * The context mode of bound volume in SELinux.
 * Host path shared - can be used by all containers, private - by only this container
 *
 * @see http://www.projectatomic.org.testifyproject.testifyproject/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/
 * @since 1.17
 */
public enum SELContext {
    /** no selinux */
    none(""),

    /** z option */
    shared("z"),

    /** Z option */
    single("Z");

    /**
     * The org.testifyproject.testifyprojectfault {@link SELContext}: {@link #none}
     */
    public static final SELContext DEFAULT = none;

    private String value;

    SELContext(String v) {
        this.value = v;
    }

    @Override
    public String toString() {
        return value;
    }

    public static SELContext fromString(String p) {
        switch (p) {
        case "z":
            return shared;
        case "Z":
            return single;
        }
        return none;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy