groupURIS) throws Exception {
}
/**
- * Create the image, command, args, and env sections of the job launch yaml. Example:
- *
- * image: "${software.imageid}"
- * command: ["/skaha-system/start-desktop-software.sh"]
- * args: [arg1, arg2]
- * env:
- * - name: HOME
- * value: "/cavern/home/${skaha.userid}"
- * - name: SHELL
- * value: "/bin/bash"
+ * Create the image, command, args, and env sections of the job launch yaml. Example:
+ *
+ * image: "${software.imageid}" command: ["/skaha-system/start-desktop-software.sh"] args: [arg1, arg2] env: -
+ * name: HOME value: "/cavern/home/${skaha.userid}" - name: SHELL value: "/bin/bash"
*/
private String getHeadlessImageBundle(String image, String cmd, String args, List envs) {
StringBuilder sb = new StringBuilder();
diff --git a/skaha/src/main/java/org/opencadc/skaha/session/SessionDAO.java b/skaha/src/main/java/org/opencadc/skaha/session/SessionDAO.java
index ae98c7e6..5a966c54 100644
--- a/skaha/src/main/java/org/opencadc/skaha/session/SessionDAO.java
+++ b/skaha/src/main/java/org/opencadc/skaha/session/SessionDAO.java
@@ -395,7 +395,7 @@ static Session constructSession(String k8sOutput, final String topLevelDirectory
}
/**
- * Example input is [4444 5555 6666]. Convert to an actual integer array.
+ * Example input is [4444 5555 6666]. Convert to an actual integer array.
*
* @param inputArray Kubernetes output of an array of integers.
* @return integer array, never null.
diff --git a/skaha/src/main/java/org/opencadc/skaha/utils/CommandExecutioner.java b/skaha/src/main/java/org/opencadc/skaha/utils/CommandExecutioner.java
index 10bb2d63..d74bf439 100644
--- a/skaha/src/main/java/org/opencadc/skaha/utils/CommandExecutioner.java
+++ b/skaha/src/main/java/org/opencadc/skaha/utils/CommandExecutioner.java
@@ -89,7 +89,7 @@ public static void execute(final String[] command, final OutputStream standardOu
* Delete, if necessary, and recreate the image pull secret for the given registry.
*
* @param registryAuth The registry credentials.
- * @param secretName The name of the secret to create.
+ * @param secretName The name of the secret to create.
* @throws Exception If there is an error creating the secret.
*/
public static void ensureRegistrySecret(final ImageRepositoryAuth registryAuth, final String secretName)
diff --git a/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerDelete.java b/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerDelete.java
index 9a3ccd6e..f181f9a9 100644
--- a/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerDelete.java
+++ b/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerDelete.java
@@ -73,7 +73,7 @@
public class DockerDelete extends DeleteAction {
private static final Logger log = Logger.getLogger(DockerDelete.class);
-
+
@Override
public void stopSession(String userID, String sessionID) throws Exception {
// kill the session specified by sessionID
@@ -81,5 +81,5 @@ public void stopSession(String userID, String sessionID) throws Exception {
String[] stopVNCCmd = new String[] {"/scripts/docker/stop-desktop.sh", userID, sessionID};
execute(stopVNCCmd);
}
-
+
}
diff --git a/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerGet.java b/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerGet.java
index ddb7daeb..d6be51b1 100644
--- a/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerGet.java
+++ b/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerGet.java
@@ -76,15 +76,15 @@
import ca.nrc.cadc.util.StringUtil;
public class DockerGet extends GetAction {
-
+
private static final Logger log = Logger.getLogger(DockerGet.class);
-
+
@Override
public void listSessions() throws Exception {
String[] getVNCSessions = new String[] {"docker", "ps", "--format", "{{.Names}}\\t{{.Status}}", "--filter", "label=canfar-net-userid=" + userID};
String vncSessions = execute(getVNCSessions);
-
+
if (StringUtil.hasLength(vncSessions)) {
String[] lines = vncSessions.split("\n");
if (lines.length > 0) {
@@ -120,13 +120,13 @@ public void listSessions() throws Exception {
}
log.debug("No container listing output");
}
-
+
protected String parseCID(String vncName) {
String[] parts = vncName.split("_");
String sessionID = parts[parts.length - 2];
return sessionID;
}
-
+
protected String parseCURL(String vncName) throws IOException, InterruptedException {
String sessionID = parseCID(vncName);
String[] getIpCmd = new String[] {
@@ -134,7 +134,7 @@ protected String parseCURL(String vncName) throws IOException, InterruptedExcept
String ipAddress = execute(getIpCmd);
return getVNCURL(server, sessionID, ipAddress);
}
-
+
protected String parseCName(String vncName) {
String[] parts = vncName.split("_");
return parts[parts.length - 1];
diff --git a/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerPost.java b/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerPost.java
index 789e2262..b218eaa0 100644
--- a/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerPost.java
+++ b/skaha/src/obsolete/java/org/opencadc/arcade/docker/DockerPost.java
@@ -79,9 +79,9 @@
import ca.nrc.cadc.util.StringUtil;
public class DockerPost extends PostAction {
-
+
private static final Logger log = Logger.getLogger(DockerPost.class);
-
+
@Override
public void checkForExistingSession(String userid) throws Exception {
String[] getVNCSessions = new String[] {"docker", "ps", "--format", "{{.Names}}\\t{{.Status}}", "--filter", "label=canfar-net-userid=" + userID};
@@ -93,21 +93,21 @@ public void checkForExistingSession(String userid) throws Exception {
}
}
}
-
+
@Override
public URL createSession(String sessionID, String name) throws Exception {
String[] runNoVNCCmd = new String[] {"/scripts/docker/run-desktop.sh", userID, sessionID, name, homedir, scratchdir};
String imageID = execute(runNoVNCCmd);
-
+
// insert the user's proxy cert on the container
Subject subject = AuthenticationUtil.getCurrentSubject();
//injectProxyCert("/home", subject, userID);
-
+
String[] getIpCmd = new String[] {
"docker", "inspect", "--format", "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}", imageID};
String ipAddress = execute(getIpCmd);
-
+
// give vnc a few seconds to initialize
try {
log.debug("3 second wait for vnc initialization");
@@ -115,26 +115,26 @@ public URL createSession(String sessionID, String name) throws Exception {
} catch (InterruptedException ignore) {
}
log.debug("wait over");
-
+
String redirectPath = super.getVNCURL(server, sessionID, ipAddress);
return new URL(redirectPath);
}
-
+
@Override
public void attachSoftware(String software, List params, String targetIP) throws Exception {
-
+
confirmSoftware(software);
-
+
// only one parameter supported for now
String param = "xterm";
if (params != null && params.size() > 0) {
param = params.get(0);
}
log.debug("Using parameter: " + param);
-
+
String[] runAppCmd = new String[] {"/scripts/docker/software.sh", software, targetIP, userID, homedir, scratchdir, param};
String imageID = execute(runAppCmd);
-
+
// refresh the user's proxy cert
Subject subject = AuthenticationUtil.getCurrentSubject();
//injectProxyCert("/home", subject, userID);
diff --git a/skaha/src/test/java/org/opencadc/skaha/image/GetActionTest.java b/skaha/src/test/java/org/opencadc/skaha/image/GetActionTest.java
index d65df7b6..06039e5a 100644
--- a/skaha/src/test/java/org/opencadc/skaha/image/GetActionTest.java
+++ b/skaha/src/test/java/org/opencadc/skaha/image/GetActionTest.java
@@ -70,7 +70,6 @@
import static org.junit.Assert.assertThrows;
import static org.mockito.Mockito.when;
import static org.opencadc.skaha.utils.TestUtils.set;
-import static org.opencadc.skaha.utils.TestUtils.setEnv;
import java.util.List;
import java.util.Set;
@@ -83,10 +82,7 @@
import org.opencadc.skaha.SkahaAction;
import org.opencadc.skaha.utils.RedisCache;
-/**
- * @author majorb
- *
- */
+/** @author majorb */
@RunWith(MockitoJUnitRunner.class)
public class GetActionTest {