use of org.dcache.srm.v2_2.SrmMvRequest in project dcache by dCache.
the class SRMMvClientV2 method start.
@Override
public void start() throws Exception {
checkCredentialValid();
SrmMvRequest req = new SrmMvRequest();
req.setFromSURL(new URI(surl_strings[0]));
req.setToSURL(new URI(surl_strings[1]));
configuration.getStorageSystemInfo().ifPresent(req::setStorageSystemInfo);
SrmMvResponse resp = srm.srmMv(req);
TReturnStatus rs = resp.getReturnStatus();
if (rs.getStatusCode() != TStatusCode.SRM_SUCCESS) {
TStatusCode rc = rs.getStatusCode();
StringBuilder sb = new StringBuilder();
sb.append("Return code: ").append(rc.toString()).append("\n");
sb.append("Explanation: ").append(rs.getExplanation()).append("\n");
System.out.println(sb.toString());
System.exit(1);
}
}
use of org.dcache.srm.v2_2.SrmMvRequest in project dcache by dCache.
the class AxisSrmFileSystem method mv.
@Override
public void mv(URI fromSurl, URI toSurl) throws RemoteException, SRMException {
SrmMvResponse response = srm.srmMv(new SrmMvRequest(null, fromSurl, toSurl, null));
checkSuccess(response.getReturnStatus());
}
Aggregations