You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Adrian Cole <no...@github.com> on 2014/10/08 17:19:24 UTC

[jclouds] Import openstack-swift from labs. (#563)

You can merge this Pull Request by running:

  git pull https://github.com/adriancole/jclouds adrian.openstack-swift-import

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/563

-- Commit Summary --

  * Import openstack-swift from labs.

-- File Changes --

    M allblobstore/pom.xml (5)
    A apis/openstack-swift/README.md (10)
    A apis/openstack-swift/pom.xml (141)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/CopyObjectException.java (48)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java (70)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java (99)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftFallbacks.java (43)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/TemporaryUrlSigner.java (89)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/binders/BindMetadataToHeaders.java (141)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/binders/SetPayload.java (72)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContext.java (154)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java (312)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedTemporaryUrlBlobSigner.java (109)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/config/SignUsingTemporaryUrls.java (67)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/config/SwiftBlobStoreContextModule.java (65)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/functions/ToBlobMetadata.java (71)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/functions/ToListContainerOptions.java (52)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/functions/ToResourceMetadata.java (44)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/BaseSwiftHttpApiModule.java (46)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftHttpApiModule.java (32)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftTypeAdapters.java (119)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Account.java (219)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/BulkDeleteResponse.java (101)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Container.java (237)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/ExtractArchiveResponse.java (90)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/ObjectList.java (57)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/Segment.java (136)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/SwiftObject.java (267)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java (111)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/BulkApi.java (105)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java (215)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java (265)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApi.java (90)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ETagHeader.java (32)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/EntriesWithoutMetaPrefix.java (48)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/FalseOnAccepted.java (30)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/MetadataFromHeaders.java (31)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseAccountFromHeaders.java (38)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseContainerFromHeaders.java (54)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseObjectFromResponse.java (87)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/functions/ParseObjectListFromResponse.java (113)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/handlers/SwiftErrorHandler.java (91)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/CreateContainerOptions.java (108)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/ListContainerOptions.java (132)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/PutOptions.java (71)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/options/UpdateContainerOptions.java (107)
    A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/reference/SwiftHeaders.java (92)
    A apis/openstack-swift/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (18)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/AuthenticationMockTest.java (71)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftApiMetadataTest.java (32)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/SwiftErrorHandlerTest.java (117)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/TemporaryUrlSignerLiveTest.java (90)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/TemporaryUrlSignerMockTest.java (76)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedBlobStoreContextLiveTest.java (159)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftBlobIntegrationLiveTest.java (76)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftBlobLiveTest.java (39)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftBlobSignerLiveTest.java (39)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftContainerIntegrationLiveTest.java (54)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftContainerLiveTest.java (39)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/blobstore/integration/SwiftServiceIntegrationLiveTest.java (39)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/config/SwiftTypeAdaptersTest.java (90)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiLiveTest.java (87)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/AccountApiMockTest.java (145)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/BulkApiLiveTest.java (125)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/BulkApiMockTest.java (72)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiLiveTest.java (197)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiMockTest.java (363)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/CreatePublicContainerLiveTest.java (47)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiLiveTest.java (286)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ObjectApiMockTest.java (515)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApiLiveTest.java (129)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApiMockTest.java (107)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/UrlEncodeAndJoinOnNewlineTest.java (44)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/internal/BaseSwiftApiLiveTest.java (88)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/options/CreateContainerOptionsTest.java (69)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/options/PutOptionsTest.java (48)
    A apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/options/UpdateContainerOptionsTest.java (122)
    A apis/openstack-swift/src/test/resources/access.json (249)
    A apis/openstack-swift/src/test/resources/container_list.json (12)
    A apis/openstack-swift/src/test/resources/logback.xml (71)
    A apis/openstack-swift/src/test/resources/object_list.json (23)
    M apis/pom.xml (1)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/563.patch
https://github.com/jclouds/jclouds/pull/563.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
> Mind picking it?

Working on it right now. Stupid question: did you push to jclouds at GitHub or ASF?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58435982

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
why exactly? can you look at the existing git log and mention something in
there that is high value enough to warrant the pollution of all the other
log entries we would be importing?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58385589

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
Committed to [master](https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=34663f3c286c83ace8fbf3b02f703d26f8cd499a) and [1.8.x](https://git-wip-us.apache.org/repos/asf?p=jclouds.git;a=commit;h=33804b9f03a7379bc77c48889ac1209ddb1dcff8)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58437084

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
Sounds plausible! I can't push for the next couple hrs. Mind picking it?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58434862

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Ash Wilson <no...@github.com>.
To chime in: there is a reasonably simple way to move a subdirectory from one git repository to another while preserving history. At @everett-toews' request, I've written it up for this case [in a gist](https://gist.github.com/smashwilson/015e6a3abfbf7af73d31) with a ton of comments.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58399804

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Everett Toews <no...@github.com>.
Thanks @smashwilson!

I don't want to derail the efforts on this PR but if you guys think what Ash has in his gist is a simple (and it does look pretty simple) alternative that meets everyone's requirements then give it some consideration.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58403926

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
@adriancole Did you push this? Don't see it [in the repo](https://git-wip-us.apache.org/repos/asf?p=jclouds.git)?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58433329

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
> +
> +/**
> + * Provides access to the OpenStack Object Storage (Swift) Account API features.
> + *
> + * <p/>
> + * Account metadata prefixed with {@code X-Account-Meta-} will be converted
> + * appropriately using a binder/parser.
> + * <p/>
> + * This API is new to jclouds and hence is in Beta. That means we need people to use it and give us feedback. Based
> + * on that feedback, minor changes to the interfaces may happen. This code will replace
> + * org.jclouds.openstack.swift.SwiftClient in jclouds 2.0 and it is recommended you adopt it sooner than later.
> + *
> + *
> + * @see {@link Account}
> + */
> +@Beta

so this is 2 parts. one is the comment (which says please stop using api/swift) that is probably a keeper. The other is the `@Beta` annotation. That's probably something we could remove, now, but doesn't harm to remove that when we have a release date for 2.0.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563/files#r18606070

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by BuildHive <no...@github.com>.
[jclouds ยป jclouds #1761](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/1761/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58393042

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
> I'm with you on introducing that

Er, to be clear: +1 from me!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58406361

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
This is different than chef for exactly the reason you mentioned. FWIW,
eventhough I wrote almost all of this code I am happy if someone else wants
to raise the PR.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58392187

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
For both master and 1.8.x. I could have sworn I pushed though.. so this is
truly odd.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58435369

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Ignasi Barrera <no...@github.com>.
FTR, I've written down the steps I followed in this page on the wiki (note that I reference the original tutorial but the commands are slightly different):
https://wiki.apache.org/jclouds/PromoteProvider

The result can be checked out at:
https://github.com/nacx/jclouds/tree/jclouds-chef-merge

If you find the procedure OK, we can establish it as the way to promote providers.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58385868

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Everett Toews <no...@github.com>.
+1

My intention wasn't to derail the PR, just provide a potential alternative. I'm fine with the single commit.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58406613

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
> The argument that cruft already exists in the commit log in jclouds/jclouds should never justify
> adding more cruft.

Touche ;-) In this specific case, I'm with you on introducing that as a new provider with a single commit. Not just for the reasons you mention, also because it helps make a clear distinction between "pre-core" and "in-core" time, and helps reinforce the idea that labs is a staging ground in a state of "churn" where history is not expected.

Thanks for arguing your points, that really helped!


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58406169

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
> why exactly? can you look at the existing git log and mention something in there that is high value 
> enough to warrant the pollution of all the other log entries we would be importing?

Personally, I'm OK merging without this if it's a lot of work...then again, it's not code I've worked on, so don't want to comment on the value of the history.

If @nacx's procedure is relatively easy, is there any reason not to follow it? After all, we have lots of "maintenance commits" in the repo for all the other providers, too.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58386958

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
I'm going to merge these, then.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58412753

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Ignasi Barrera <no...@github.com>.
Personally I think it depends on what we are promoting. In this case I don't see much value in preserving the history, unless some contributor wants to. We say the main repo holds the production ready code, so it could be OK to have only one commit for swift if it is the first commit to be considered production ready.

Other providers such as chef might be different. It has been stable for ages, and also noorul, who contributed some patches, expressed to me the interest in keeping the commit history. Contributors like seeing their names in the history (I like that), and we should preserve that if they express so.

So in the end I think it is a matter of the maturity of a provider, how it is being used and how people is contributing to it. I don't know in detail the swift history, but I'd be OK both approaches.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58390391

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
Closed #563.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#event-175961365

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #1266](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/1266/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58385384

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
The critical question here, is if there is value in *this history*, vs
abstract concern about history or various how-tos. I strongly feel there
isn't value, as it is mostly cruft. The idea that we should move less than
helpful history into main is more important than showing we are clever
enough to figure that out.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58403994

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
cherry-picked

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58412975

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests-java-6 #177](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests-java-6/177/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58375913

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
anyway, if folks decide to go the forklift route, just close these PRs. I don't care if that happens, just I won't enable it by spending the time to do that and then also merge back that into 1.8.x.

your call.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58404330

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
> cherry-picked

Thanks, @adriancole!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58413609

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Adrian Cole <no...@github.com>.
@demobox I think anyone can comment on the value of the history. Let's be concrete here. do a git log. how much value do you see in the entries in the swift history pertaining to neutron or some checkstyle fix, or some guava deprecation. You'll soon see what I mean. If on the other hand you don't look, this remains a theoretical pondering which will result in work and more cruft. The argument that cruft already exists in the commit log in jclouds/jclouds should never justify adding more cruft.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58389125

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
Code change seems fine, but I guess we still want to figure out if we can preserve the history somehow.

/cc @nacx @jdaggett 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563#issuecomment-58384493

Re: [jclouds] Import openstack-swift from labs. (#563)

Posted by Andrew Phillips <no...@github.com>.
> +
> +/**
> + * Provides access to the OpenStack Object Storage (Swift) Account API features.
> + *
> + * <p/>
> + * Account metadata prefixed with {@code X-Account-Meta-} will be converted
> + * appropriately using a binder/parser.
> + * <p/>
> + * This API is new to jclouds and hence is in Beta. That means we need people to use it and give us feedback. Based
> + * on that feedback, minor changes to the interfaces may happen. This code will replace
> + * org.jclouds.openstack.swift.SwiftClient in jclouds 2.0 and it is recommended you adopt it sooner than later.
> + *
> + *
> + * @see {@link Account}
> + */
> +@Beta

Does this (here and elsewhere in the code and docs) remain?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/563/files#r18603286