Repository: jclouds-site Updated Branches: refs/heads/master 0951594a9 -> cffe4ecea
Call putBlob in HP Cloud example jclouds 1.7.0 removed createInputStreamMap Project: http://git-wip-us.apache.org/repos/asf/jclouds-site/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds-site/commit/cffe4ece Tree: http://git-wip-us.apache.org/repos/asf/jclouds-site/tree/cffe4ece Diff: http://git-wip-us.apache.org/repos/asf/jclouds-site/diff/cffe4ece Branch: refs/heads/master Commit: cffe4ecea09e602de3f6efd071030fa42bd0b0e2 Parents: 0951594 Author: Andrew Gaul <[email protected]> Authored: Fri Aug 14 13:14:06 2015 -0700 Committer: Andrew Gaul <[email protected]> Committed: Fri Aug 14 13:17:04 2015 -0700 ---------------------------------------------------------------------- guides/hpcloud.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds-site/blob/cffe4ece/guides/hpcloud.md ---------------------------------------------------------------------- diff --git a/guides/hpcloud.md b/guides/hpcloud.md index 45c1727..d887a0d 100644 --- a/guides/hpcloud.md +++ b/guides/hpcloud.md @@ -31,12 +31,14 @@ versions of the HP Cloud provider (prior to 1.8.0) default to using tenantName:u BlobStoreContext context = ContextBuilder.newBuilder("hpcloud-objectstorage") .credentials("tenantName:accessKey", "secretKey") .buildView(BlobStoreContext.class); +BlobStore blobStore = context.getBlobStore(); // Create a container in the default location -context.getBlobStore().createContainerInLocation(null, container); +blobStore.createContainerInLocation(null, container); -// Use the map interface for easy access to put/get things, keySet, etc. -context.createInputStreamMap(container).put("blob.txt", inputStream); +// Upload an empty blob +Blob blob = blobStore.blobBuilder("blob-name").payload(new byte[0]).build(); +blobStore.putBlob(container, blob); // When you need access to hpcloud specific features, use the provider-specific context HPCloudObjectStorageClient hpcloudClient =
