Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2015-03-24 Thread Everett Toews
Thanks for the pull request but it's release week in jclouds and that means it's time to clean up the PR queue. This PR will be over 6 months old as of April 1. If you intend to continue work on it, please make a comment by April 2. Otherwise it will be closed on April 3. --- Reply to this

[jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
You can merge this Pull Request by running: git pull https://github.com/najtmar/jclouds-examples storage Or you can view, comment on it, or merge it online at: https://github.com/jclouds/jclouds-examples/pull/64 -- Commit Summary -- * Add an example to create/delete/list Google Cloud

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
@@ -50,5 +50,10 @@ artifactIdgoogle-compute-engine/artifactId version${jclouds.version}/version /dependency +dependency + groupIdorg.apache.jclouds.labs/groupId + artifactIdgoogle-cloud-storage/artifactId + version1.8.0/version Use `jclouds.version`

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
+ String command = args[2]; + String projectName = null; + String bucketName = null; + if (command.equals(create)) { + projectName = args[3]; + bucketName = args[4]; + } else if (command.equals(delete)) { + bucketName = args[3]; +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
+ try { + serviceAccountKey = Files.toString(new File(args[1]), Charset.defaultCharset()); + } catch (IOException e) { + System.err.println(Cannot open service account private key PEM file: + args[1] + \n + e.getMessage()); + System.exit(1); + } +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
+*planetnikbucketname +* +* java org.jclouds.examples.google.cloudstorage.ManageBuckets \ +*somecrypticn...@developer.gserviceaccount.com \ +*/home/planetnik/Work/Cloud/OSS/certificate/gcp-oss.pem \ +*delete \ +*planetnikbucketname +* +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
+ System.exit(1); + } + } + + public ManageBuckets(final String serviceAccountEmailAddress, final String serviceAccountKey) { + cloudStorageApi = ContextBuilder.newBuilder(PROVIDER) +.credentials(serviceAccountEmailAddress, serviceAccountKey) +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
+* @param bucketName Name of the bucket to create. +*/ + public final void createBucket(final String projectName, final String bucketName) { + Bucket bucket = null; + try { + bucket = cloudStorageApi.getBucketApi().createBucket(projectName, new

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Gaul
@@ -50,5 +50,10 @@ artifactIdgoogle-compute-engine/artifactId version${jclouds.version}/version /dependency +dependency + groupIdorg.apache.jclouds.labs/groupId + artifactIdgoogle-cloud-storage/artifactId + version1.8.0/version We have not

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
+ try { + serviceAccountKey = Files.toString(new File(args[1]), Charset.defaultCharset()); + } catch (IOException e) { + System.err.println(Cannot open service account private key PEM file: + args[1] + \n + e.getMessage()); + System.exit(1); + } +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
+ * software distributed under the License is distributed on an + * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
+ String command = args[2]; + String projectName = null; + String bucketName = null; + if (command.equals(create)) { + projectName = args[3]; + bucketName = args[4]; + } else if (command.equals(delete)) { + bucketName = args[3]; +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
+*planetnikbucketname +* +* java org.jclouds.examples.google.cloudstorage.ManageBuckets \ +*somecrypticn...@developer.gserviceaccount.com \ +*/home/planetnik/Work/Cloud/OSS/certificate/gcp-oss.pem \ +*delete \ +*planetnikbucketname +* +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
+ System.exit(1); + } + } + + public ManageBuckets(final String serviceAccountEmailAddress, final String serviceAccountKey) { + cloudStorageApi = ContextBuilder.newBuilder(PROVIDER) +.credentials(serviceAccountEmailAddress, serviceAccountKey) +

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
+* @param bucketName Name of the bucket to create. +*/ + public final void createBucket(final String projectName, final String bucketName) { + Bucket bucket = null; + try { + bucket = cloudStorageApi.getBucketApi().createBucket(projectName, new

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread najtmar
@@ -50,5 +50,10 @@ artifactIdgoogle-compute-engine/artifactId version${jclouds.version}/version /dependency +dependency + groupIdorg.apache.jclouds.labs/groupId + artifactIdgoogle-cloud-storage/artifactId + version1.8.0/version Ok, I got it. Thanks

Re: [jclouds-examples] Add an example to create/delete/list Google Cloud Storage buckets. (#64)

2014-09-06 Thread Andrew Phillips
@@ -50,5 +50,10 @@ artifactIdgoogle-compute-engine/artifactId version${jclouds.version}/version /dependency +dependency + groupIdorg.apache.jclouds.labs/groupId + artifactIdgoogle-cloud-storage/artifactId + version1.8.0/version Ok, I got it. Thanks