use of io.fabric8.openshift.api.model.DeploymentConfigStatus in project syndesis by syndesisio.
the class OpenShiftServiceImpl method isScaled.
@Override
public boolean isScaled(String name, int desiredReplicas) {
String sName = openshiftName(name);
DeploymentConfig dc = openShiftClient.deploymentConfigs().withName(sName).get();
int allReplicas = 0;
int availableReplicas = 0;
if (dc != null && dc.getStatus() != null) {
DeploymentConfigStatus status = dc.getStatus();
allReplicas = nullSafe(status.getReplicas());
availableReplicas = nullSafe(status.getAvailableReplicas());
}
return desiredReplicas == allReplicas && desiredReplicas == availableReplicas;
}
Aggregations