RE: How to bind and work with OpenStack extensions

2013-09-30 Thread Zack Shoylev
Hi again!
I am not aware of a guide on how to make a new nova extension, but I will look 
around. We have a number of extensions which you could use as examples to 
develop your own extension. If you have questions about implementing it, you 
can also ask them in the #jclouds channel on IRC (a bit faster for less complex 
questions). I will let you know if I find some more information about 
implementing new extensions.

From: Bk Lau [bklau2...@gmail.com]
Sent: Monday, September 30, 2013 7:30 PM
To: user@jclouds.incubator.apache.org
Subject: Re: How to bind and work with OpenStack extensions

Zack:

You said "It seems to me you might be using getExtensionApiForZone to get a 
list of the extensions and then use one of these extensions?"
Yes, you got it right. I use this to get one of the extension that I want that 
is implemented by a provider.
The extension gives an 'alias' which is typically then use construct a URL and 
then create a domain class to represent that extension.
My original question is :
" Does JCloud have any helper classes to allow me to  create one of these 
domain API classes or do I have to wrap my own?".
Specifically, if I am a vendor and I want to write a vendor-specific extension 
JCloud domain API class(for example, SecurityGroupApi) surely JCloud must have 
a prescribed way to allow a vendor to write such a a domain API object 
associated with that extension so that everyone conforms to the same pattern.

Thanks,

/BK



On Mon, Sep 30, 2013 at 4:50 PM, Zack Shoylev 
mailto:zack.shoy...@rackspace.com>> wrote:
Do you mean already implemented extensions, such as the security group 
extension? I have an example for it here:
https://gist.github.com/zack-shoylev/6517903

Or do you need to implement your own extension?

It seems to me you might be using getExtensionApiForZone to get a list of the 
extensions and then use one of these extensions? Is it possible to follow the 
example above to get the specific extension you want?

From: Bk Lau [bklau2...@gmail.com<mailto:bklau2...@gmail.com>]
Sent: Monday, September 30, 2013 3:27 PM
To: user@jclouds.incubator.apache.org<mailto:user@jclouds.incubator.apache.org>
Subject: Re: How to bind and work with OpenStack extensions

Zack:

Thanks. Those examples shows the specific nova extensions that OpenStack 
happened to support.
What if an openstack implementation have an specific extension  and how do I 
bind to it and  use it?.
For example, in nova we have:
ExtensionApi extApi=novaApi.getExtensionApiForZone("");
Set exts=extApi.list();

Extension ext1=;
String alias1=ext1.getAlias();
Q: How do I construct an extension domain class from that "alias1"?.
Is there any helper classes or boilerplate code that one could use?.
I just want to make sure that I don't reinvent the wheel.

Thanks,
BK


On Mon, Sep 30, 2013 at 2:48 PM, Zack Shoylev 
mailto:zack.shoy...@rackspace.com>> wrote:
The openstack server api is called nova. You can use nova to talk to an 
openstack nova service.

Some sample code I used recently (nova-based) is here:
https://gist.github.com/zack-shoylev/6542561

More here:
https://github.com/jclouds/jclouds-examples/tree/master/compute-basics

From: Bk Lau [bklau2...@gmail.com<mailto:bklau2...@gmail.com>]
Sent: Thursday, September 26, 2013 3:35 PM
To: user@jclouds.incubator.apache.org<mailto:user@jclouds.incubator.apache.org>
Subject: How to bind and work with OpenStack extensions

Hi:

Assuming that I have an OpenStack extension, for say,
ServerAPI, my question is  do JCloud have some standard  classes/utilities way 
to allow me to bind to it and start using it or do I have to write my own JSON 
calls??.

Sample code would be nice :)

Thanks,
BK




Re: How to bind and work with OpenStack extensions

2013-09-30 Thread Bk Lau
Zack:

You said "It seems to me you might be using getExtensionApiForZone to get a
list of the extensions and then use one of these extensions?"
Yes, you got it right. I use this to get one of the extension that I want
that is implemented by a provider.
The extension gives an 'alias' which is typically then use construct a URL
and then create a domain class to represent that extension.
My original question is :
" Does JCloud have any helper classes to allow me to  create one of these
domain API classes or do I have to wrap my own?".
Specifically, if I am a vendor and I want to write a vendor-specific
extension JCloud domain API class(for example, SecurityGroupApi) surely
JCloud must have a prescribed way to allow a vendor to write such a a
domain API object associated with that extension so that everyone conforms
to the same pattern.

Thanks,

/BK



On Mon, Sep 30, 2013 at 4:50 PM, Zack Shoylev wrote:

>  Do you mean already implemented extensions, such as the security group
> extension? I have an example for it here:
> https://gist.github.com/zack-shoylev/6517903
>
>  Or do you need to implement your own extension?
>
>  It seems to me you might be using getExtensionApiForZone to get a list
> of the extensions and then use one of these extensions? Is it possible to
> follow the example above to get the specific extension you want?
>  --
> *From:* Bk Lau [bklau2...@gmail.com]
> *Sent:* Monday, September 30, 2013 3:27 PM
> *To:* user@jclouds.incubator.apache.org
> *Subject:* Re: How to bind and work with OpenStack extensions
>
>Zack:
>
>  Thanks. Those examples shows the specific nova extensions that OpenStack
> happened to support.
>  What if an openstack implementation have an specific extension  and how
> do I bind to it and  use it?.
>  For example, in nova we have:
> ExtensionApi extApi=novaApi.getExtensionApiForZone("");
>  Set exts=extApi.list();
>
>  Extension ext1=;
>  String alias1=ext1.getAlias();
>  Q: How do I construct an extension domain class from that "alias1"?.
>  Is there any helper classes or boilerplate code that one could use?.
>  I just want to make sure that I don't reinvent the wheel.
>
>  Thanks,
>  BK
>
>
> On Mon, Sep 30, 2013 at 2:48 PM, Zack Shoylev 
> wrote:
>
>>  The openstack server api is called nova. You can use nova to talk to an
>> openstack nova service.
>>
>>  Some sample code I used recently (nova-based) is here:
>> https://gist.github.com/zack-shoylev/6542561
>>
>>  More here:
>> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
>>  --
>> *From:* Bk Lau [bklau2...@gmail.com]
>> *Sent:* Thursday, September 26, 2013 3:35 PM
>> *To:* user@jclouds.incubator.apache.org
>> *Subject:* How to bind and work with OpenStack extensions
>>
>>  Hi:
>>
>>  Assuming that I have an OpenStack extension, for say,
>>  ServerAPI, my question is  do JCloud have some standard
>> classes/utilities way to allow me to bind to it and start using it or do I
>> have to write my own JSON calls??.
>>
>>  Sample code would be nice :)
>>
>>  Thanks,
>>  BK
>>
>
>


RE: How to bind and work with OpenStack extensions

2013-09-30 Thread Zack Shoylev
Do you mean already implemented extensions, such as the security group 
extension? I have an example for it here:
https://gist.github.com/zack-shoylev/6517903

Or do you need to implement your own extension?

It seems to me you might be using getExtensionApiForZone to get a list of the 
extensions and then use one of these extensions? Is it possible to follow the 
example above to get the specific extension you want?

From: Bk Lau [bklau2...@gmail.com]
Sent: Monday, September 30, 2013 3:27 PM
To: user@jclouds.incubator.apache.org
Subject: Re: How to bind and work with OpenStack extensions

Zack:

Thanks. Those examples shows the specific nova extensions that OpenStack 
happened to support.
What if an openstack implementation have an specific extension  and how do I 
bind to it and  use it?.
For example, in nova we have:
ExtensionApi extApi=novaApi.getExtensionApiForZone("");
Set exts=extApi.list();

Extension ext1=;
String alias1=ext1.getAlias();
Q: How do I construct an extension domain class from that "alias1"?.
Is there any helper classes or boilerplate code that one could use?.
I just want to make sure that I don't reinvent the wheel.

Thanks,
BK


On Mon, Sep 30, 2013 at 2:48 PM, Zack Shoylev 
mailto:zack.shoy...@rackspace.com>> wrote:
The openstack server api is called nova. You can use nova to talk to an 
openstack nova service.

Some sample code I used recently (nova-based) is here:
https://gist.github.com/zack-shoylev/6542561

More here:
https://github.com/jclouds/jclouds-examples/tree/master/compute-basics

From: Bk Lau [bklau2...@gmail.com<mailto:bklau2...@gmail.com>]
Sent: Thursday, September 26, 2013 3:35 PM
To: user@jclouds.incubator.apache.org<mailto:user@jclouds.incubator.apache.org>
Subject: How to bind and work with OpenStack extensions

Hi:

Assuming that I have an OpenStack extension, for say,
ServerAPI, my question is  do JCloud have some standard  classes/utilities way 
to allow me to bind to it and start using it or do I have to write my own JSON 
calls??.

Sample code would be nice :)

Thanks,
BK



Re: How to bind and work with OpenStack extensions

2013-09-30 Thread Bk Lau
Zack:

Thanks. Those examples shows the specific nova extensions that OpenStack
happened to support.
What if an openstack implementation have an specific extension  and how do
I bind to it and  use it?.
For example, in nova we have:
ExtensionApi extApi=novaApi.getExtensionApiForZone("");
Set exts=extApi.list();

Extension ext1=;
String alias1=ext1.getAlias();
Q: How do I construct an extension domain class from that "alias1"?.
Is there any helper classes or boilerplate code that one could use?.
I just want to make sure that I don't reinvent the wheel.

Thanks,
BK


On Mon, Sep 30, 2013 at 2:48 PM, Zack Shoylev wrote:

>  The openstack server api is called nova. You can use nova to talk to an
> openstack nova service.
>
>  Some sample code I used recently (nova-based) is here:
> https://gist.github.com/zack-shoylev/6542561
>
>  More here:
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
>  --
> *From:* Bk Lau [bklau2...@gmail.com]
> *Sent:* Thursday, September 26, 2013 3:35 PM
> *To:* user@jclouds.incubator.apache.org
> *Subject:* How to bind and work with OpenStack extensions
>
> Hi:
>
>  Assuming that I have an OpenStack extension, for say,
>  ServerAPI, my question is  do JCloud have some standard
> classes/utilities way to allow me to bind to it and start using it or do I
> have to write my own JSON calls??.
>
>  Sample code would be nice :)
>
>  Thanks,
>  BK
>


RE: How to bind and work with OpenStack extensions

2013-09-30 Thread Zack Shoylev
The openstack server api is called nova. You can use nova to talk to an 
openstack nova service.

Some sample code I used recently (nova-based) is here:
https://gist.github.com/zack-shoylev/6542561

More here:
https://github.com/jclouds/jclouds-examples/tree/master/compute-basics

From: Bk Lau [bklau2...@gmail.com]
Sent: Thursday, September 26, 2013 3:35 PM
To: user@jclouds.incubator.apache.org
Subject: How to bind and work with OpenStack extensions

Hi:

Assuming that I have an OpenStack extension, for say,
ServerAPI, my question is  do JCloud have some standard  classes/utilities way 
to allow me to bind to it and start using it or do I have to write my own JSON 
calls??.

Sample code would be nice :)

Thanks,
BK