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
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
@@ -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`
+ 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];
+
+ 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);
+ }
+
+*planetnikbucketname
+*
+* java org.jclouds.examples.google.cloudstorage.ManageBuckets \
+*somecrypticn...@developer.gserviceaccount.com \
+*/home/planetnik/Work/Cloud/OSS/certificate/gcp-oss.pem \
+*delete \
+*planetnikbucketname
+*
+
+ System.exit(1);
+ }
+ }
+
+ public ManageBuckets(final String serviceAccountEmailAddress, final
String serviceAccountKey) {
+ cloudStorageApi = ContextBuilder.newBuilder(PROVIDER)
+.credentials(serviceAccountEmailAddress, serviceAccountKey)
+
+* @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
@@ -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
+ 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);
+ }
+
+ * 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
+ 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];
+
+*planetnikbucketname
+*
+* java org.jclouds.examples.google.cloudstorage.ManageBuckets \
+*somecrypticn...@developer.gserviceaccount.com \
+*/home/planetnik/Work/Cloud/OSS/certificate/gcp-oss.pem \
+*delete \
+*planetnikbucketname
+*
+
+ System.exit(1);
+ }
+ }
+
+ public ManageBuckets(final String serviceAccountEmailAddress, final
String serviceAccountKey) {
+ cloudStorageApi = ContextBuilder.newBuilder(PROVIDER)
+.credentials(serviceAccountEmailAddress, serviceAccountKey)
+
+* @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
@@ -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
@@ -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
17 matches
Mail list logo