use of com.openshift.restclient.model.IResource in project jbosstools-openshift by jbosstools.
the class OpenShiftSpringBootPublishController method publishFinish.
@Override
public void publishFinish(IProgressMonitor monitor) throws CoreException {
if (!hasRsync()) {
return;
}
super.publishFinish(monitor);
final File localFolder = getLocalFolder();
final IResource resource = OpenShiftServerUtils.getResource(getServer(), monitor);
syncUp(localFolder, resource);
loadPodPathIfEmpty(resource);
}
use of com.openshift.restclient.model.IResource in project jbosstools-openshift by jbosstools.
the class OpenShiftSpringBootPublishController method createRsync.
@Override
protected RSync createRsync(IServer server, final IProgressMonitor monitor) throws CoreException {
final IResource resource = OpenShiftServerUtils.getResourceChecked(server, monitor);
IPath podPath = new Path(OpenShiftServerUtils.getOrLoadPodPath(server, resource)).append(POD_BASE_PATH);
return OpenShiftServerUtils.createRSync(resource, podPath.toString(), server);
}
use of com.openshift.restclient.model.IResource in project jbosstools-openshift by jbosstools.
the class OpenShiftPublishController method publishFinish.
@Override
public void publishFinish(IProgressMonitor monitor) throws CoreException {
if (!hasRsync()) {
return;
}
super.publishFinish(monitor);
final File localFolder = getLocalFolder();
final IResource resource = OpenShiftServerUtils.getResource(getServer(), monitor);
syncUp(localFolder, resource);
deleteDoDeployMarkers(localFolder);
loadPodPathIfEmpty(resource);
}
use of com.openshift.restclient.model.IResource in project jbosstools-openshift by jbosstools.
the class OpenShiftLaunchController method waitForDeploymentConfigReady.
protected boolean waitForDeploymentConfigReady(IServer server, IProgressMonitor monitor) throws CoreException {
monitor.subTask("Waiting for deployment configs to become available...");
Connection connection = OpenShiftServerUtils.getConnectionChecked(server);
IResource resource = OpenShiftServerUtils.getResourceChecked(server, connection, monitor);
long timeout = System.currentTimeMillis() + WAIT_FOR_DEPLOYMENTCONFIG_TIMEOUT;
while ((ResourceUtils.getDeploymentConfigFor(resource, connection)) == null) {
if (!sleep(RECHECK_DELAY, timeout, monitor)) {
return false;
}
}
return true;
}
use of com.openshift.restclient.model.IResource in project jbosstools-openshift by jbosstools.
the class OpenShiftResourceDocumentProvider method createDocument.
@Override
protected IDocument createDocument(Object element) throws CoreException {
OpenShiftResourceInput input = getInput(element);
Document document = null;
if (input != null) {
IResource resource = input.getResource();
document = new Document(resource.toJson());
}
return document;
}
Aggregations