Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
@andreaturli pushed 1 commit. 7bbd5fc addressing more comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90/files/31184ff15c5d8aa6f2b2c7af0f10f17e811c33b0..7bbd5fc5d7f14d7ed12b76cadf37bf9757ff936e
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. >// note that you can check if a provider is present ahead of time checkArgument(contains(allKeys, provider), "provider %s not in supported list: %s", provider, allKeys); - - String identity = args[1]; - String credential = args[2]; - String containerName = args[3]; + identity = args[1]; + credential = args[2]; + containerName = args[3]; + if (args.length > 4) endpoint = args[4]; great suggestion, thanks! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > // Create Container - BlobStore blobStore = context.getBlobStore(); Location location = null; not sure I follow, looking at the git history I can see this commit https://github.com/jclouds/jclouds-examples/commit/8a0718e7761a1af2f14f3d1dcc93c7da47ae7d2e introduced this snippet of code, do you think it is better to refactor it? if yes, how? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > @@ -51,6 +51,11 @@ google-compute-engine ${jclouds.version} + + io.cloudsoft.jclouds.api + openstack-mitaka-nova + 1.9.3-cloudsoft.20160831 + oh, don't know why it's there, I'll remove it right away -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andrewgaul requested changes on this pull request. > @@ -51,6 +51,11 @@ google-compute-engine ${jclouds.version} + + io.cloudsoft.jclouds.api + openstack-mitaka-nova + 1.9.3-cloudsoft.20160831 + What is this for? > // Create Container - BlobStore blobStore = context.getBlobStore(); Location location = null; These changes disappeared in the latest PR, but you could allow `jclouds.region` property to set a non-default `location`. >// note that you can check if a provider is present ahead of time checkArgument(contains(allKeys, provider), "provider %s not in supported list: %s", provider, allKeys); - - String identity = args[1]; - String credential = args[2]; - String containerName = args[3]; + identity = args[1]; + credential = args[2]; + containerName = args[3]; + if (args.length > 4) endpoint = args[4]; Could use `jclouds.endpoint` property. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90#pullrequestreview-10093871
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > @@ -138,6 +154,10 @@ public static void main(String[] args) throws > IOException { } } finally { + // delete cointainer + if (blobStore.containerExists(containerName)) { ok -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
@andreaturli pushed 1 commit. df0e785 address comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90/files/70f574af20bc8f30d5835d907411fe85ab259945..df0e785adec6ca32582aef2d942190cfb4370fa4
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > @@ -69,35 +73,47 @@ public static void main(String[] args) throws IOException { - if (args.length < PARAMETERS) + String provider; + String identity; + String credential; + String containerName; + String endpoint = null; + boolean isSwiftv1 = Boolean.FALSE; + + List parameters = Lists.newArrayList(args); + if (parameters.size() < PARAMETERS) throw new IllegalArgumentException(INVALID_SYNTAX); ok -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > // Init - BlobStoreContext context = ContextBuilder.newBuilder(provider) - .credentials(identity, credential) - .buildView(BlobStoreContext.class); + ContextBuilder contextBuilder = ContextBuilder.newBuilder(provider) + .credentials(identity, credential); + if (isSwiftv1) { + Properties properties = new Properties(); + properties.setProperty("jclouds.keystone.credential-type", "tempAuthCredentials"); I like the properties more, thanks! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > Location location = null; if (apiMetadata instanceof SwiftApiMetadata) { location = Iterables.getFirst(blobStore.listAssignableLocations(), null); } - blobStore.createContainerInLocation(location, containerName); + blobStore.createContainerInLocation(null, containerName); not sure I follow your idea, @andrewgaul -- what kind of property you have in mind? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andreaturli commented on this pull request. > @@ -69,35 +73,47 @@ public static void main(String[] args) throws IOException { - if (args.length < PARAMETERS) + String provider; + String identity; + String credential; + String containerName; + String endpoint = null; + boolean isSwiftv1 = Boolean.FALSE; + + List parameters = Lists.newArrayList(args); + if (parameters.size() < PARAMETERS) agreed, better -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
[jclouds/jclouds-examples] Upgrade compute examples to 2.0.0 (#91)
You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-examples/pull/91 -- Commit Summary -- * Upgrade compute examples to 2.0.0 -- File Changes -- M chef-basics/pom.xml (9) M chef-basics/src/main/java/org/apache/jclouds/examples/chef/basics/MainApp.java (18) M chef-basics/src/main/resources/logback.xml (2) M compute-basics/pom.xml (14) M compute-basics/src/main/resources/logback.xml (2) M openstack/pom.xml (4) M rackspace/pom.xml (9) M rackspace/src/main/java/org/jclouds/examples/rackspace/clouddatabases/CreateDatabase.java (5) M rackspace/src/main/java/org/jclouds/examples/rackspace/clouddatabases/CreateUser.java (5) -- Patch Links -- https://github.com/jclouds/jclouds-examples/pull/91.patch https://github.com/jclouds/jclouds-examples/pull/91.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/91
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
andrewgaul requested changes on this pull request. > @@ -138,6 +154,10 @@ public static void main(String[] args) throws > IOException { } } finally { + // delete cointainer + if (blobStore.containerExists(containerName)) { Should be OK to remove `containerExists`. > // Init - BlobStoreContext context = ContextBuilder.newBuilder(provider) - .credentials(identity, credential) - .buildView(BlobStoreContext.class); + ContextBuilder contextBuilder = ContextBuilder.newBuilder(provider) + .credentials(identity, credential); + if (isSwiftv1) { + Properties properties = new Properties(); + properties.setProperty("jclouds.keystone.credential-type", "tempAuthCredentials"); I don't want to bikeshed over this but using properties throughout might be more obvious. OK to use `true`/`false` as well. > Location location = null; if (apiMetadata instanceof SwiftApiMetadata) { location = Iterables.getFirst(blobStore.listAssignableLocations(), null); } - blobStore.createContainerInLocation(location, containerName); + blobStore.createContainerInLocation(null, containerName); Would be nice to have a property for location. > @@ -69,35 +73,47 @@ public static void main(String[] args) throws IOException { - if (args.length < PARAMETERS) + String provider; + String identity; + String credential; + String containerName; + String endpoint = null; + boolean isSwiftv1 = Boolean.FALSE; + + List parameters = Lists.newArrayList(args); + if (parameters.size() < PARAMETERS) throw new IllegalArgumentException(INVALID_SYNTAX); Update `INVALID_SYNTAX` with new arguments. > @@ -69,35 +73,47 @@ public static void main(String[] args) throws IOException { - if (args.length < PARAMETERS) + String provider; + String identity; + String credential; + String containerName; + String endpoint = null; + boolean isSwiftv1 = Boolean.FALSE; + + List parameters = Lists.newArrayList(args); + if (parameters.size() < PARAMETERS) You can keep this as an array and just use `args.length`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90#pullrequestreview-10082299
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
Merged #190. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#event-871361747
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
thanks @demobox and @nacx, merging now! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262821539
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
> All looks good to me; current build is still running Ah, I see you just killed it ;-) Will kick off another one... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262820270
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
> I've just edited the build and changed the labs providers to those that make > sense Just looked at that config diff ;-) All looks good to me; current build is still running. Thanks, @nacx! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262820201
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
Uops :) I've just edited the build and changed the labs providers to those that make sense. All yours from the current point. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262819962
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
> http://jclouds-javadocs.elasticbeanstalk.com/ still shows 2.0.0-SNAPSHOT docs > - is that broken? I guess it should be 2.0.1-SNAPSHOT now? It looks like that one is actually [on me](https://github.com/demobox/jclouds-aggregate-javadocs/commit/a11b49340c68ea093b021c785fe4e0a6c9031678) - working on it... /cc @nacx -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262819848
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
>http://jclouds-javadocs.elasticbeanstalk.com/ still shows 2.0.0-SNAPSHOT docs >- is that broken? I guess it should be 2.0.1-SNAPSHOT now? I'll have a look at this -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262819843
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
demobox approved this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#pullrequestreview-10075676
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
Changes look good - thanks @andreaturli! Just two related points: * Javadoc still needs to be published? http://jclouds.apache.org/reference/javadoc/1.9.x/ points at 1.9.2 * http://jclouds-javadocs.elasticbeanstalk.com/ still shows 2.0.0-SNAPSHOT docs - is that broken? I guess it should be 2.0.1-SNAPSHOT now -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262818139
Re: [jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
demobox requested changes on this pull request. >// note that you can check if a provider is present ahead of time checkArgument(contains(allKeys, provider), "provider %s not in supported list: %s", provider, allKeys); - - String identity = args[1]; - String credential = args[2]; - String containerName = args[3]; + identity = parameters.get(1); + credential = parameters.get(2); + containerName = parameters.get(3); + if (parameters.size() > 4) endpoint = parameters.get(4); + if (parameters.size() > 5) isSwiftv1 = Boolean.parseBoolean(parameters.get(5)); Rather odd provider-specific argument here? Is there some other way we can get this information, e.g. from the provider name? > // Init - BlobStoreContext context = ContextBuilder.newBuilder(provider) - .credentials(identity, credential) - .buildView(BlobStoreContext.class); + ContextBuilder contextBuilder = ContextBuilder.newBuilder(provider) + .credentials(identity, credential); + if (isSwiftv1) { + Properties properties = new Properties(); + properties.setProperty("jclouds.keystone.credential-type", "tempAuthCredentials"); Can we add instructions to the README to somehow set this property when using Swift v1? Or change the 6th argument to be less Swift-specific, and more like "if you set this argument, we will add it as a property"?. Then you might invoke this as: ``` java -jar jclouds.keystone.credential-type=tempAuthCredentials ``` rather than: ``` java -jar true ``` ? > Location location = null; if (apiMetadata instanceof SwiftApiMetadata) { location = Iterables.getFirst(blobStore.listAssignableLocations(), null); } - blobStore.createContainerInLocation(location, containerName); + blobStore.createContainerInLocation(null, containerName); Is `location` above ignored now? If so, move lines 112-115 to where it is first used, or remove if unneeded? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90#pullrequestreview-10070898
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
Go to http://1d547f9a57b7cf99a2cc-3d89fc21b654ea514b9e52407d648ba8.r20.cf5.rackcdn.com/ to review your changes. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262816091
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
@andreaturli pushed 1 commit. 7b48221 fix typos in releasenotes for 1.9.3 -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-site/pull/190/files/56cbcbdad53ccdce1723703f069fb88d7b8ca1a7..7b48221eccf55ccfc92723945b9aac45708f9ef8
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
thanks @nacx, good spot! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262815836
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
nacx commented on this pull request. > @@ -7,6 +7,7 @@ permalink: /releasenotes/ The Release Notes and Javadocs for every major release of Apache jclouds are listed chronologically below. * [2.0.0](/releasenotes/2.0.0) | [Javadoc](/reference/javadoc/2.0.x/) +* [1.9.2](/releasenotes/1.9.3) | [Javadoc](/reference/javadoc/1.9.x/) @andreaturli This is still wrong -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
@demobox can you have another shot at it? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262810954
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
andreaturli commented on this pull request. > +## Introduction + +You can read the official announcement at [Apache jclouds 1.9.3 released](http://markmail.org/thread/qlapnppmfbilje7p). To get started with jclouds, please see the [jclouds installation guide](/start/install/). + +This is a bugfix release. The following list shows the fixed issues and patches that are included in the release: + + Bug and patches + +* PR-1027 - fix jclouds/apis/swift retryOnRenew +* PR-991 - Fix for ssh reload for CentOS 7 +* JCLOUDS-1044 - fix handling NULL JsonTokens in adapters under NullFilteringTypeAdapterFactories class +* PR-956 - update CloudstackTemplateOptions pattern +* PR-937 - fix hpcloud compute adapter +* PR-934 - Version range specification for guava in OSGi +* PR-932 - fix for issue if SL machine has multiple credentials registered +* PR-907 - Fix: RunScriptOptions equals we should better in tracking bugs on jira -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
Go to http://47ea4e8a996157d05ad1-c393c86521b0d7767f466e64c39494f3.r51.cf5.rackcdn.com/ to review your changes. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-site/pull/190#issuecomment-262810654
Re: [jclouds/jclouds-site] add release 1.9.3 (#190)
@andreaturli pushed 1 commit. 56cbcbd fix typos in releasenetes for 1.9.3 -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-site/pull/190/files/40db1882033cc39d75d1d5d060c49f33dbc0dbd3..56cbcbdad53ccdce1723703f069fb88d7b8ca1a7
Re: [jclouds/jclouds-labs] pb-updates-v3 (#333)
@nacx how are we going to proceed with this? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/333#issuecomment-262791295
Re: [jclouds/jclouds-karaf] Properly encapsulate google credential processing (#88)
demobox commented on this pull request. > @@ -238,4 +240,12 @@ private static String > getValueOrPropertyOrEnvironmentVariable( } return value; } + + private static String getCredentialValue(String provider, String credential) { + return credential != null && isGoogleCloud(provider) ? getGoogleCredentialFromJsonFileIfPath(credential) : credential; + } + + private static boolean isGoogleCloud(String provider) { + return provider != null && provider.startsWith("google"); > Yes, it can be null if the user hasn't provided explicitly the parameter or > the environment variable. Ah, so we are not checking for this beforehand? In that case, clear. Thanks for clarifying! -- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/88
[jclouds/jclouds-examples] update blobstore-basics to use 2.0.0 (#90)
update README.md You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-examples/pull/90 -- Commit Summary -- * update blobstore-basics to use 2.0.0 -- File Changes -- M blobstore-basics/README.md (11) M blobstore-basics/pom.xml (4) M blobstore-basics/src/main/java/org/jclouds/examples/blobstore/basics/MainApp.java (50) -- Patch Links -- https://github.com/jclouds/jclouds-examples/pull/90.patch https://github.com/jclouds/jclouds-examples/pull/90.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-examples/pull/90
Re: [jclouds/jclouds-karaf] Properly encapsulate google credential processing (#88)
nacx commented on this pull request. > @@ -238,4 +240,12 @@ private static String > getValueOrPropertyOrEnvironmentVariable( } return value; } + + private static String getCredentialValue(String provider, String credential) { + return credential != null && isGoogleCloud(provider) ? getGoogleCredentialFromJsonFileIfPath(credential) : credential; + } + + private static boolean isGoogleCloud(String provider) { + return provider != null && provider.startsWith("google"); Yes, it can be null if the user hasn't provided explicitly the parameter or the environment variable. For example, when reusing stored compute service instances, the user may just provide the registered name instead of all the information. The code that creates the services first reads all parameters and performs some validations or others based on the ones that have been set , then instantiates the services accordingly. -- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/88
Re: [jclouds/jclouds-karaf] Properly encapsulate google credential processing (#88)
> Also: do we need to make any updates to other projects for this? No, changes are transparent to other jclouds-karaf projects and the CLI. -- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/88#issuecomment-262723337