unhook vcloud and vcloud-express

7 views
Skip to first unread message

Adrian Cole

unread,
Jul 8, 2011, 3:14:51 PM7/8/11
to jclou...@googlegroups.com
Hi, team.

When vCloud Express first came out (v0.8), there were interim
implementations by a few cloud computing providers. When vCloud 1.0
came out, critical objects such as Network, VM, and VApp ended up
incompatible with the 0.8 versions. The only provider in jclouds that
has an implementation based on 0.8 is Terremark, and their two
offerings have more in common with eachother than they do with vCloud
constructs. Others have moved to vCloud director (v1.0)

So, we have 2 vCloud-branded code paths: Terremark, and vCloud
director. Vain attempts to share logic between these have left a
trail of nasty cruft in our code

ex TerremarkVCloudComputeClient extends VCloudExpressComputeClientImpl
extends CommonVCloudComputeClientImpl<VCloudExpressVAppTemplate,
VCloudExpressVApp> implements VCloudExpressComputeClient

This could have made sense if we expected a lot of vcloud express
variants, but in 2011 we know this didn't happen. Maintaining this
has been a nightmare for me, and I'd like to change this so that I can
focus on other things. Below is a plan to unravel our code into
sensible units that don't attempt to share code between Terremark and
vCloud. Any portability efforts can be rightly handled re-using OVF
code, as we did for Savvis.

Right now, we have the following vCloud-related modules
org.jclouds.common/vcloud-common
org.jclouds.common/trmk-common
org.jclouds.api/vcloudexpress <- untestable as there is no
implementation of this
org.jclouds.api/vcloud <- testable

vcloud depends on vcloud-common
trmk-common depends on vcloudexpress which depends on vcloud-common
and overrides some classes that are incompatible in the 1.0 spec

It has really become a bit of a mess without any real benefit. I'd
like to unhook these in the following way
org.jclouds.common/vcloud-common < fold into vcloud
org.jclouds.common/trmk-common
org.jclouds.api/vcloudexpress < fold into trmk-common, repackage code
under vcloudexpress

We'd end up with 2 less modules, easier maintenance, no more confusing
vCloud 0.8 with incompatible 1.0 and no more package conflicts

I'm fine moving forward with this, but wanted to ping you in case you
have any concerns or other suggestions before I do. This would go
into jclouds 1.1.0.

Lemme know!
Cheers,
-Adrian

[1] http://code.google.com/p/jclouds/issues/detail?id=596&start=100

Seshu Pasam

unread,
Jul 8, 2011, 3:42:47 PM7/8/11
to jclou...@googlegroups.com
Adrian, we use vcloud* for Terremark API support. We had some interesting class loading issues with jclouds 1.0.0 due to these separate modules. What you are proposing sounds good.

BTW, I added support for retrieving tags and network metadata information for Terremark Enterprise vApp's. Will contribute it back some time this weekend.

Regards
-Seshu


--
You received this message because you are subscribed to the Google Groups "jclouds-dev" group.
To post to this group, send email to jclou...@googlegroups.com.
To unsubscribe from this group, send email to jclouds-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds-dev?hl=en.


Andrew Phillips

unread,
Jul 8, 2011, 3:47:09 PM7/8/11
to jclou...@googlegroups.com
> Lemme know!

Go for it! ;-)

ap

Adrian Cole

unread,
Jul 10, 2011, 9:34:42 PM7/10/11
to jclou...@googlegroups.com
Thanks for the offer, Seshu. Ping back when you've pushed your
changes and I'll start the refactoring.

Cheers,
-Adrian

Kedar Dave

unread,
Jul 11, 2011, 11:53:10 AM7/11/11
to jclou...@googlegroups.com
+1
Kedar


Seshu Pasam

unread,
Jul 12, 2011, 3:19:14 PM7/12/11
to jclou...@googlegroups.com
Adrian, I was able to push my changes to jclouds. See the following commits. I missed some new files in my first commit. Please review and let me know. BTW, in v2.8 ecloud, Terremark added location information. At some point we would like to use it and I will probably add support for it. I haven't checked if a general framework for location stuff is in place in jclouds!!!

https://github.com/jclouds/jclouds/commit/35d5131ba974ba00da6659c414b3ceb168920948
https://github.com/jclouds/jclouds/commit/d9b9c61ce6b7f6af32f71ad95f19ae639446a130

Again, sorry for keeping you waiting.

Thanks
-Seshu

Andrew Phillips

unread,
Jul 12, 2011, 3:46:10 PM7/12/11
to jclou...@googlegroups.com
> let me know. BTW, in v2.8 ecloud, Terremark added location
> information.

Cool!

> At some point we would like to use it and I will probably
> add support for it. I haven't checked if a general framework for
> location stuff is in place in jclouds!!!

See
http://jclouds.googlecode.com/svn/maven-sites/1.1.0-SNAPSHOT/jclouds-multi/apidocs/index.html?org/jclouds/domain/Location.html
https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/domain/Location.java

;-)

ap

Seshu Pasam

unread,
Jul 12, 2011, 3:54:45 PM7/12/11
to jclou...@googlegroups.com
Thanks Andrew. Should be easy to convert the following to Location.

-Seshu

Get Organization Data Centers

This call will get the list of data centers that contain at least one of the organization’s environments.

Header

Cookie: vcloud-token={authentication cookie}
Content-length: {length}

Example:

Cookie: vcloud-token=fc020a05-21d7-4f33-9b2a-25d8cd05a44e
Content-length: 0

Request

GET https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/extensions/org/{orgId}/dataCenters

Example:

GET https://services.enterprisecloud.terremark.com/api/v0.8b-ext2.8/extensions/org/1904569/dataCenters

Response

The response contains the list of data centers and the information associated with each one.

HTTP/1.1 200 OK
Content-Length: 311
Content-Type: application/vnd.tmrk.ecloud.dataCentersList+xml

<DataCenterList xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

  <DataCenter>

    <Code>MIA</Code>

    <Id>1</Id>

    <NameTerremark - Miami</Name>

  </DataCenter>

  <DataCenter>

    <Code>CUA</Code>

    <Id>3670</Id>

    <Name>Terremark - Culpeper</Name>

  </DataCenter>

</DataCenterList>



--
You received this message because you are subscribed to the Google Groups "jclouds-dev" group.
To post to this group, send email to jclou...@googlegroups.com.
To unsubscribe from this group, send email to jclouds-dev+unsubscribe@googlegroups.com.

Adrian Cole

unread,
Jul 12, 2011, 4:04:09 PM7/12/11
to jclou...@googlegroups.com
Very cool! I'll look into it!

Cheers,
-A

>> jclouds-dev...@googlegroups.com.


>> For more options, visit this group at
>> http://groups.google.com/group/jclouds-dev?hl=en.
>>
>

> --
> You received this message because you are subscribed to the Google Groups
> "jclouds-dev" group.
> To post to this group, send email to jclou...@googlegroups.com.
> To unsubscribe from this group, send email to

> jclouds-dev...@googlegroups.com.

Andrew Phillips

unread,
Jul 12, 2011, 4:11:39 PM7/12/11
to jclou...@googlegroups.com
> Thanks Andrew. Should be easy to convert the following to Location.

Hm, interesting. Do you have any idea what the type of the "<Code>"
element actually is (I'm being lazy and not browsing docs here).

Some kind of rule to convert that to ISO 3166 would be ideal, but I
guess a lookup mapping is always a fallback option, if not very
pretty...

ap

Adrian Cole

unread,
Jul 12, 2011, 4:42:10 PM7/12/11
to jclou...@googlegroups.com
heh.. well I am very happy to say that Terremark listen to us!

Check out the new API response that will come out soon from them:

HTTP/1.1 200 OK Content-Length: 238
Content-Type: application/vnd.tmrk.cloud.location
Date: Thu, 12 May 2011 22:22:35 GMT
<Location href="/locations/1" name="Location 1"
type="application/vnd.tmrk.cloud.location"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<FriendlyName>Location 1</FriendlyName>
<Locode>LOC1</Locode
<ISO3166>US-TX</ISO3166>
</Location>

> --
> You received this message because you are subscribed to the Google Groups
> "jclouds-dev" group.
> To post to this group, send email to jclou...@googlegroups.com.
> To unsubscribe from this group, send email to

> jclouds-dev...@googlegroups.com.

Adrian Cole

unread,
Jul 22, 2011, 8:25:25 PM7/22/11
to jclou...@googlegroups.com
ok.  I will be performing this restructuring now, unhooking the terremark stuff from vCloud.  This will go into the 1.1.0 release targeted for next week during OsCon.

Wish me luck!
-Adrian

Adrian Cole

unread,
Jul 24, 2011, 2:25:41 PM7/24/11
to jclou...@googlegroups.com
Ok, team.

For those of you using Terremark, please start testing the 1.1.0-SNAPSHOT.  I've completed the repackaging work.  Note that shared code for terremark eCloud and vCloudExpress are under the package: org.jclouds.trmk.vcloud_0_8

Changes should be intuitive, and look at the *LiveTest classes for hints. Let me know, if you have any questions!

Cheers,
-Adrian
Reply all
Reply to author
Forward
0 new messages