diff --git a/blobstore/src/main/clojure/org/jclouds/blobstore2.clj b/blobstore/src/main/clojure/org/jclouds/blobstore2.clj index a34e6a8328..5e85f0ab2f 100644 --- a/blobstore/src/main/clojure/org/jclouds/blobstore2.clj +++ b/blobstore/src/main/clojure/org/jclouds/blobstore2.clj @@ -26,7 +26,7 @@ Current supported services are: eucalyptus-partnercloud-s3, cloudfiles-us, cloudfiles-uk, swift, scality-rs2, hosteurope-storage, tiscali-storage] -Here's a quick example of how to viewresources in rackspace +Here's a quick example of how to view resources in rackspace (use 'org.jclouds.blobstore2) @@ -46,7 +46,7 @@ See http://code.google.com/p/jclouds for details." java.util.Properties [org.jclouds.blobstore AsyncBlobStore domain.BlobBuilder BlobStore BlobStoreContext - BlobStoreContextFactory domain.BlobMetadata domain.StorageMetadata + BlobStoreContextBuilder domain.BlobMetadata domain.StorageMetadata domain.Blob domain.internal.BlobBuilderImpl options.PutOptions options.PutOptions$Builder options.CreateContainerOptions options.ListContainerOptions] @@ -112,13 +112,12 @@ Options can also be specified for extension modules (let [module-keys (set (keys module-lookup)) ext-modules (filter #(module-keys %) options) opts (apply hash-map (filter #(not (module-keys %)) options))] - (let [context (.. (BlobStoreContextFactory.) - (createContext - provider provider-identity provider-credential - (apply modules - (concat ext-modules (opts :extensions))) - (reduce #(do (.put %1 (name (first %2)) (second %2)) %1) - (Properties.) (dissoc opts :extensions))))] + (let [context (.. (BlobStoreContextBuilder/newBuilder provider) + (credentials provider-identity provider-credential) + (modules (apply modules (concat ext-modules (opts :extensions)))) + (overrides (reduce #(do (.put %1 (name (first %2)) (second %2)) %1) + (Properties.) (dissoc opts :extensions))) + (build))] (if (some #(= :async %) options) (.getAsyncBlobStore context) (.getBlobStore context))))) diff --git a/compute/src/main/clojure/org/jclouds/compute2.clj b/compute/src/main/clojure/org/jclouds/compute2.clj index c318bfbd02..a54023c97a 100644 --- a/compute/src/main/clojure/org/jclouds/compute2.clj +++ b/compute/src/main/clojure/org/jclouds/compute2.clj @@ -29,6 +29,7 @@ You can inquire about which providers are loaded via the following: (seq (org.jclouds.providers.Providers/allCompute)) + (seq (org.jclouds.apis.Apis/allCompute)) Here's an example of getting some compute configuration from rackspace: @@ -65,7 +66,7 @@ Here's an example of creating and running a small linux node in the group webser java.util.Properties [org.jclouds.domain Location] [org.jclouds.compute - ComputeService ComputeServiceContext ComputeServiceContextFactory] + ComputeService ComputeServiceContext ComputeServiceContextBuilder] [org.jclouds.compute.domain Template TemplateBuilder ComputeMetadata NodeMetadata Hardware OsFamily Image] @@ -83,13 +84,13 @@ Here's an example of creating and running a small linux node in the group webser (let [module-keys (set (keys module-lookup)) ext-modules (filter #(module-keys %) options) opts (apply hash-map (filter #(not (module-keys %)) options))] - (.. (ComputeServiceContextFactory.) - (createContext - provider provider-identity provider-credential - (apply modules (concat ext-modules (opts :extensions))) - (reduce #(do (.put %1 (name (first %2)) (second %2)) %1) + (.. (ComputeServiceContextBuilder/newBuilder provider) + (credentials provider-identity provider-credential) + (modules (apply modules (concat ext-modules (opts :extensions)))) + (overrides (reduce #(do (.put %1 (name (first %2)) (second %2)) %1) (Properties.) (dissoc opts :extensions))) - (getComputeService)))) + (build) + (getComputeService)))) ([#^ComputeServiceContext compute-context] (.getComputeService compute-context)))