Reorganize imports.
This commit is contained in:
parent
e822d472f9
commit
41ae658e0c
16 changed files with 139 additions and 100 deletions
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.jdrupes.vmoperator.common;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* Some constants.
|
||||
*/
|
||||
|
|
@ -30,21 +31,48 @@ public class Constants {
|
|||
/** The Constant VM_OP_NAME. */
|
||||
public static final String VM_OP_NAME = "vm-operator";
|
||||
|
||||
/** The Constant VM_OP_GROUP. */
|
||||
public static final String VM_OP_GROUP = "vmoperator.jdrupes.org";
|
||||
/**
|
||||
* Constants related to the CRD.
|
||||
*/
|
||||
@SuppressWarnings("PMD.ShortClassName")
|
||||
public static class Crd {
|
||||
/** The Constant GROUP. */
|
||||
public static final String GROUP = "vmoperator.jdrupes.org";
|
||||
|
||||
/** The Constant VM_OP_KIND_VM. */
|
||||
public static final String VM_OP_KIND_VM = "VirtualMachine";
|
||||
/** The Constant KIND_VM. */
|
||||
public static final String KIND_VM = "VirtualMachine";
|
||||
|
||||
/** The Constant VM_OP_KIND_VM_POOL. */
|
||||
public static final String VM_OP_KIND_VM_POOL = "VmPool";
|
||||
/** The Constant KIND_VM_POOL. */
|
||||
public static final String KIND_VM_POOL = "VmPool";
|
||||
}
|
||||
|
||||
/** The Constant COMP_DISPLAY_SECRETS. */
|
||||
public static final String COMP_DISPLAY_SECRET = "display-secret";
|
||||
/**
|
||||
* Status related constants.
|
||||
*/
|
||||
public static class Status {
|
||||
/** The Constant LOGGED_IN_USER. */
|
||||
public static final String LOGGED_IN_USER = "loggedInUser";
|
||||
|
||||
/** The Constant DATA_DISPLAY_PASSWORD. */
|
||||
public static final String DATA_DISPLAY_PASSWORD = "display-password";
|
||||
/** The Constant CONSOLE_CLIENT. */
|
||||
public static final String CONSOLE_CLIENT = "consoleClient";
|
||||
|
||||
/** The Constant DATA_PASSWORD_EXPIRY. */
|
||||
public static final String DATA_PASSWORD_EXPIRY = "password-expiry";
|
||||
/** The Constant CONSOLE_USER. */
|
||||
public static final String CONSOLE_USER = "consoleUser";
|
||||
}
|
||||
|
||||
/**
|
||||
* DisplaySecret related constants.
|
||||
*/
|
||||
public static class DisplaySecret {
|
||||
|
||||
/** The Constant NAME. */
|
||||
public static final String NAME = "display-secret";
|
||||
|
||||
/** The Constant PASSWORD. */
|
||||
public static final String PASSWORD = "display-password";
|
||||
|
||||
/** The Constant EXPIRY. */
|
||||
public static final String EXPIRY = "password-expiry";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import java.util.Set;
|
|||
import java.util.function.Function;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import org.jdrupes.vmoperator.common.Constants.Status;
|
||||
import org.jdrupes.vmoperator.util.DataPath;
|
||||
|
||||
/**
|
||||
|
|
@ -286,7 +287,7 @@ public class VmDefinition extends K8sDynamicModel {
|
|||
* @return the optional
|
||||
*/
|
||||
public Optional<String> consoleUser() {
|
||||
return this.<String> fromStatus("consoleUser");
|
||||
return this.<String> fromStatus(Status.CONSOLE_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue