use of com.cloud.legacymodel.communication.command.ComputeChecksumCommand in project cosmic by MissionCriticalCloud.
the class TemplateManagerImpl method getChecksum.
@Override
public String getChecksum(final DataStore store, final String templatePath) {
final EndPoint ep = this._epSelector.select(store);
final ComputeChecksumCommand cmd = new ComputeChecksumCommand(store.getTO(), templatePath);
final Answer answer;
if (ep == null) {
final String errMsg = "No remote endpoint to send command, check if host or ssvm is down?";
s_logger.error(errMsg);
answer = new Answer(cmd, false, errMsg);
} else {
answer = ep.sendMessage(cmd);
}
if (answer != null && answer.getResult()) {
return answer.getDetails();
}
return null;
}
Aggregations