Examples of addPayload()


Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.addPayload()

        ResizeVolumePayload payload = new ResizeVolumePayload(newSize, shrinkOk, instanceName, hosts);

        try {
            VolumeInfo vol = volFactory.getVolume(volume.getId());
            vol.addPayload(payload);

            AsyncCallFuture<VolumeApiResult> future = volService.resize(vol);
            VolumeApiResult result = future.get();
            if (result.isFailed()) {
                s_logger.warn("Failed to resize the volume " + volume);
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.addPayload()

            CreateSnapshotPayload payload = new CreateSnapshotPayload();
            payload.setSnapshotId(snapshotId);
            payload.setSnapshotPolicyId(policyId);
            payload.setAccount(account);
            payload.setQuiescevm(quiescevm);
            volume.addPayload(payload);
            return volService.takeSnapshot(volume);
        }
    }

    private Snapshot orchestrateTakeVolumeSnapshot(Long volumeId, Long policyId, Long snapshotId, Account account, boolean quiescevm)
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo.addPayload()

        CreateSnapshotPayload payload = new CreateSnapshotPayload();
        payload.setSnapshotId(snapshotId);
        payload.setSnapshotPolicyId(policyId);
        payload.setAccount(account);
        payload.setQuiescevm(quiescevm);
        volume.addPayload(payload);
        return volService.takeSnapshot(volume);
    }

    @Override
    public Snapshot allocSnapshot(Long volumeId, Long policyId) throws ResourceAllocationException {
View Full Code Here

Examples of org.apache.cloudstack.storage.volume.VolumeObject.addPayload()

                        when(account.getId()).thenReturn(1L);
                        CreateSnapshotPayload createSnapshotPayload = mock(CreateSnapshotPayload.class);
                        when(createSnapshotPayload.getAccount()).thenReturn(account);
                        when(createSnapshotPayload.getSnapshotId()).thenReturn(snapshotVO.getId());
                        when(createSnapshotPayload.getSnapshotPolicyId()).thenReturn(0L);
                        volumeObject.addPayload(createSnapshotPayload);
                        if (cnt > 8) {
                            mockStorageMotionStrategy.makeBackupSnapshotSucceed(false);
                        }
                        SnapshotInfo newSnapshot = volumeService.takeSnapshot(vol);
                        if (newSnapshot == null) {
View Full Code Here

Examples of org.apache.cloudstack.storage.volume.VolumeObject.addPayload()

                        when(account.getId()).thenReturn(1L);
                        CreateSnapshotPayload createSnapshotPayload = mock(CreateSnapshotPayload.class);
                        when(createSnapshotPayload.getAccount()).thenReturn(account);
                        when(createSnapshotPayload.getSnapshotId()).thenReturn(snapshotVO.getId());
                        when(createSnapshotPayload.getSnapshotPolicyId()).thenReturn(0L);
                        volumeObject.addPayload(createSnapshotPayload);
                        if (cnt > 8) {
                            mockStorageMotionStrategy.makeBackupSnapshotSucceed(false);
                        }
                        SnapshotInfo newSnapshot = volumeService.takeSnapshot(vol);
                        if (newSnapshot == null) {
View Full Code Here

Examples of org.apache.cloudstack.storage.volume.VolumeObject.addPayload()

                        when(account.getId()).thenReturn(1L);
                        CreateSnapshotPayload createSnapshotPayload = mock(CreateSnapshotPayload.class);
                        when(createSnapshotPayload.getAccount()).thenReturn(account);
                        when(createSnapshotPayload.getSnapshotId()).thenReturn(snapshotVO.getId());
                        when(createSnapshotPayload.getSnapshotPolicyId()).thenReturn(0L);
                        volumeObject.addPayload(createSnapshotPayload);
                        if (cnt > 8) {
                            mockStorageMotionStrategy.makeBackupSnapshotSucceed(false);
                        }
                        SnapshotInfo newSnapshot = volumeService.takeSnapshot(vol);
                        if (newSnapshot == null) {
View Full Code Here

Examples of org.scribe.model.OAuthRequest.addPayload()

    public OAuthRequest getRequest() {
        OAuthRequest request = new OAuthRequest(originalRequest.getVerb(), originalRequest.getUrl());
        request.addHeader("Authorization", originalRequest.getHeaders().get("Authorization"));
        request.addHeader("Content-Type", "multipart/form-data, boundary=" + boundary);
        request.addHeader("Content-length", bodyLength.toString());
        request.addPayload(complexPayload());
        return request;
    }

    private byte[] complexPayload() {
        int used = 0;
View Full Code Here

Examples of org.scribe.model.OAuthRequest.addPayload()

        _log.debug(method + " " + request.getCompleteUrl());
      }

      if (postBody != null) {
        // System.err.println("Adding data: " + data);
        request.addPayload(postBody);
        request.addHeader("Content-Type", "application/json;charset=utf-8");
      }

      service.signRequest(accessToken, request);
      request.setConnectionKeepAlive(true);
View Full Code Here

Examples of org.scribe.model.OAuthRequest.addPayload()

        }

        OAuthRequest request = new OAuthRequest(Verb.valueOf(method.toUpperCase()), url);

        if (data != null) {
            request.addPayload(data);
        }

        if (requestHeaders == null) {
            requestHeaders = new ArrayList<>();
        }
View Full Code Here

Examples of org.scribe.model.OAuthRequest.addPayload()

    }
    if (payload != null)
    {
      request.addHeader("Content-Length", Integer.toString(payload.length()));
      request.addHeader("Content-Type", "text/xml");
      request.addPayload(payload);
    }
    srv.signRequest(accessToken, request);
    return request;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.