Search in sources :

Example 1 with SrmMvRequest

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);
    }
}
Also used : SrmMvResponse(org.dcache.srm.v2_2.SrmMvResponse) SrmMvRequest(org.dcache.srm.v2_2.SrmMvRequest) TReturnStatus(org.dcache.srm.v2_2.TReturnStatus) URI(org.apache.axis.types.URI) TStatusCode(org.dcache.srm.v2_2.TStatusCode)

Example 2 with SrmMvRequest

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());
}
Also used : SrmMvResponse(org.dcache.srm.v2_2.SrmMvResponse) SrmMvRequest(org.dcache.srm.v2_2.SrmMvRequest)

Aggregations

SrmMvRequest (org.dcache.srm.v2_2.SrmMvRequest)2 SrmMvResponse (org.dcache.srm.v2_2.SrmMvResponse)2 URI (org.apache.axis.types.URI)1 TReturnStatus (org.dcache.srm.v2_2.TReturnStatus)1 TStatusCode (org.dcache.srm.v2_2.TStatusCode)1