Skip to content

Commit

Permalink
Add CMD exec and oc/kubectl commands (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
kornys authored Dec 6, 2023
1 parent 73e56c3 commit 87b11f3
Show file tree
Hide file tree
Showing 8 changed files with 1,284 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/main/java/io/odh/test/platform/KubeClusterException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Skodjob authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
package io.odh.test.platform;


import io.odh.test.platform.executor.ExecResult;

public class KubeClusterException extends RuntimeException {
public final ExecResult result;

public KubeClusterException(ExecResult result, String s) {
super(s);
this.result = result;
}

public KubeClusterException(Throwable cause) {
super(cause);
this.result = null;
}

public static class NotFound extends KubeClusterException {

public NotFound(ExecResult result, String s) {
super(result, s);
}
}

public static class AlreadyExists extends KubeClusterException {

public AlreadyExists(ExecResult result, String s) {
super(result, s);
}
}

public static class InvalidResource extends KubeClusterException {

public InvalidResource(ExecResult result, String s) {
super(result, s);
}
}
}
Loading

0 comments on commit 87b11f3

Please sign in to comment.