Package cz.xtf.core.openshift
Class OpenShifts
- java.lang.Object
-
- cz.xtf.core.openshift.OpenShifts
-
public class OpenShifts extends Object
-
-
Constructor Summary
Constructors Constructor Description OpenShifts()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static OpenShiftadmin()static OpenShiftadmin(String namespace)static OpenShiftBinaryadminBinary()static OpenShiftBinaryadminBinary(String namespace)static StringgetAdminToken()static StringgetBinaryPath()static StringgetMasterToken()static FilegetOcFromCache(String version, String ocUrl, File ocTarFile)Deprecated.this should have never been made public, can be removed in future versions.static StringgetVersion()ReturnsOpenShiftConfig.version().static OpenShiftmaster()static OpenShiftmaster(String namespace)static OpenShiftBinarymasterBinary()static OpenShiftBinarymasterBinary(String namespace)static voidsaveOcOnCache(String version, String ocUrl, File ocTarFile)Deprecated.this should have never been made public, can be removed in future versions.
-
-
-
Method Detail
-
admin
public static OpenShift admin()
-
master
public static OpenShift master()
-
getBinaryPath
public static String getBinaryPath()
-
masterBinary
public static OpenShiftBinary masterBinary()
-
masterBinary
public static OpenShiftBinary masterBinary(String namespace)
-
adminBinary
public static OpenShiftBinary adminBinary()
-
adminBinary
public static OpenShiftBinary adminBinary(String namespace)
-
saveOcOnCache
@Deprecated public static void saveOcOnCache(String version, String ocUrl, File ocTarFile) throws IOException
Deprecated.this should have never been made public, can be removed in future versions. It is not used internally by XTFSave oc binary in a folder to use as cache to avoid to download it again. The folder path depends on the OCP version and the download url. The file can be accessed usinggetOcFromCache(String, String, File). It works only ifOpenShiftConfig.isBinaryCacheEnabled().- Parameters:
version- String, OCP cluster version.ocUrl- String, download URL.ocTarFile- String, workdir file.- Throws:
IOException
-
getOcFromCache
@Deprecated public static File getOcFromCache(String version, String ocUrl, File ocTarFile) throws IOException
Deprecated.this should have never been made public, can be removed in future versions. It is not used internally by XTFRetrieve the file from the folder populated bysaveOcOnCache(String, String, File).- Parameters:
version- String, OCP cluster version.ocUrl- String, download URL.ocTarFile- String, workdir file.- Returns:
- File, reference to the file, if the cache is not populated, the file is not null, but it doesn't exist.
- Throws:
IOException
-
getVersion
public static String getVersion()
ReturnsOpenShiftConfig.version(). If not available then access OpenShift endpoint for a version. Be aware that this operation requires admin role for OpenShift 4 unlike to OpenShift 3.- Returns:
- Openshift cluster version if configured or detected from cluster, null otherwise
-
getMasterToken
public static String getMasterToken()
-
getAdminToken
public static String getAdminToken()
-
-