Merge lp://qastaging/~justin-fathomdb/nova/java-binding into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Work in progress
Proposed branch: lp://qastaging/~justin-fathomdb/nova/java-binding
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Prerequisite: lp://qastaging/~justin-fathomdb/nova/add-xsd
Diff against target: 2051 lines (+1925/-0)
23 files modified
.bzrignore (+4/-0)
contrib/bindings/java/openstack-api/log4j.properties (+5/-0)
contrib/bindings/java/openstack-api/pom.xml (+81/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/TrivialPool.java (+44/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/Utils.java (+60/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/AsyncServerOperation.java (+149/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/Flavors.java (+67/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/HttpRequest.java (+123/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/Images.java (+28/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/Limits.java (+75/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeAuthorizationException.java (+36/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeClient.java (+361/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeConfiguration.java (+93/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeException.java (+72/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeHttpRequest.java (+183/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeJaxb.java (+160/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeMain.java (+45/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeNotFoundException.java (+33/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/OpenstackComputeUtils.java (+39/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/ServerCreationRequest.java (+154/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/ServerUtils.java (+34/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/Servers.java (+38/-0)
contrib/bindings/java/openstack-api/src/main/java/org/openstack/compute/XsdWrapperObjectFactory.java (+41/-0)
To merge this branch: bzr merge lp://qastaging/~justin-fathomdb/nova/java-binding
Reviewer Review Type Date Requested Status
termie (community) Needs Information
Thierry Carrez (community) Disapprove
Review via email: mp+54442@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2011-03-22.

Description of the change

Java binding to OpenStack API

To post a comment you must log in.
Revision history for this message
justinsb (justin-fathomdb) wrote : Posted in a previous version of this proposal

Supports the XML schema validation effort.

Incidentally, XML validation fails immediately because there's no namespace.

852. By justinsb

Make Flavors iterable; support simple commands for testing

853. By justinsb

Renamed OpenstackNova to OpenstackCompute

854. By justinsb

Renamed manifest to reflect refactor

Revision history for this message
John Dewey (retr0h) wrote :

I may have came late to the game. It looks as though this is simply a client library to the OpenStack API. Should these bindings belong in nova or as a standalone project?

Would it make sense to simply work on solidifying OpenStack compatibility in jclouds?

My apologies if I am completely off topic.

Revision history for this message
justinsb (justin-fathomdb) wrote :

This is indeed a simple Java client library to the OpenStack API. I'm
proposing that we keep the source in the same tree (under the contrib
directory, like our boto_v6 binding), so that we can develop the client as
we add features if we want to. We can also ship/stamp an approved version
of bindings with the release if we want to. We can't put a library we don't
control under our source tree (e.g. jclouds)

Also, by implementing a library ourselves we can see the consequences of our
API decisions from the point of view of the binding developers, and get an
idea of what developers using those bindings will think of OpenStack. So
we'll have a better product by virtue of implementing a library.

This also (starts to) solve an immediate problem, which is that we have no
tests of the XML API. This binding uses the XML API, and is finding bugs in
it. For example, at the moment, there are no namespace declarations at all,
so it fails immediately (there's a separate patch for that) Once things
don't fail immediately, I hope to add some simple tests.

However, I very much hope that you will work on solidifying support for
OpenStack in jclouds! Every library should support OpenStack, but equally
we should not be at the mercy of third parties.

Revision history for this message
Thierry Carrez (ttx) wrote :

I am also unconvinced of the value of shipping it in core code. If you do so, nova devs become collectively responsible for keeping it up to date with the rest of the source tree. I'm not sure we have so many Java nova-core developers.

We had the same question in the nova deployment tool in Bexar, and the decision was to keep it separate...

review: Disapprove
Revision history for this message
justinsb (justin-fathomdb) wrote :

Well, I think that not having a binding in core is a mistake, but that's a
different discussion. Note that I have not proposed shipping this. This is
to support testing.

I was planning on using this binding for testing that our XML spec was to
spec (hence it was linked to the bug #740576). This is a binding to the
CloudServers API that my company created and uses against CloudServers, and
is willing contribute as open source. This binding is strict in requiring
that output be schema-compliant.

I'm willing to use this binding to test that our XML binding isn't
completely broken. Right now, it is completely broken - Bug #740576 means
that XML API clients won't even try to parse the data the API outputs. Once
that is fixed, I can start testing that we're outputting the correct XML.

However, if you have a better way to test our XML bindings for
spec-compliance, then this doesn't need to go in. I don't see a merge
proposal for an alternative though?

Revision history for this message
termie (termie) wrote :

While I am all for keeping the source together I do find it scary to include a project written in a different language in our tree. I think we have an expectation of making and moving to openstack-common around the next summit and theoretically we will want a couple auxilliary tools for dealing with libraries in different repos, and this may be an opportunity for you to influence the design of those with whatever you build to support this use case.

Thoughts? This project will be separate eventually, so maybe jump the gun and write the first draft of the software that helps incorporate separate projects for testing.

review: Needs Information
Revision history for this message
Thierry Carrez (ttx) wrote :

I completely understand why this code is useful, I just don't see why it should be part of nova itself. We have been working to strip out all non-Python code from nova (including rewriting our CA stuff from bash to Python), so that looks like a step in the wrong direction.

As far as testing goes, the python client (python-novaclient) is used in testing (the zones stuff), and it's shipped separately... so there are precedents.

Revision history for this message
justinsb (justin-fathomdb) wrote :

OK, sounds like this doesn't belong as part of openstack/nova.

Moving to WIP while I figure out next steps...

Unmerged revisions

854. By justinsb

Renamed manifest to reflect refactor

853. By justinsb

Renamed OpenstackNova to OpenstackCompute

852. By justinsb

Make Flavors iterable; support simple commands for testing

851. By justinsb

Replaced references to Rackspace with references to OpenStack

850. By justinsb

Added copyrights and reformatted to match space-style

849. By justinsb

Create an all-in-one executable

848. By justinsb

Code cleanups (thanks, Eclipse)

847. By justinsb

Initial import of Java bindings to XSD generated code

846. By justinsb

Merged with xsd reorg

845. By justinsb

Added common.xsd that I had missed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.