Hi Jeffrey,
As this new neutron code is... new, you will have to use 1.8.0 instead of 1.7.3
in your dependency.
Your dependency looks good to me and with 1.8.0 it will include both v2 and
v2_0: v2_0 is deprecated (making sure we don't break people's code).
Thanks!
-Zack
________________________________
From: Jeffrey Nguyen (jeffrngu) [[email protected]]
Sent: Wednesday, August 13, 2014 11:48 PM
To: [email protected]
Subject: Re: How to get reference to NeutronApi from ComputeServiceContext
Hi Zack,
I looked at the application code again. It turns out that endpoint can be
obtained at the application level as one of the properties of the underline
Iaas provider. So I'm good on this one.
Question on the version "v2": which version of jclouds have this? I'm using
jclouds 1.7.1 and plan to introduce just the neutron dependency below and not
upgrading jclouds. Will that work or does neutron have other dependencies
that require upgrading jclouds? Also, is the version below correct for using
"v2" instead of "v2_0"?
<dependency>
<groupId>org.apache.jclouds.labs</groupId>
<artifactId>openstack-neutron</artifactId>
<version>1.7.3</version>
</dependency>
Thanks,
-Jeffrey
From: jeffrngu <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Date: Wednesday, August 13, 2014 9:32 PM
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: Re: How to get reference to NeutronApi from ComputeServiceContext
Thanks Zack. I'm familiar with the method to get NeutronApi you mentioned.
The problem is I can get credentials but I'm not sure how to get the value for
"endpoint" from the existing ComputeServiceContext. Any idea?
-Jeffrey
From: Zack Shoylev
<[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Date: Wednesday, August 13, 2014 6:41 PM
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: RE: How to get reference to NeutronApi from ComputeServiceContext
Hi Jeffrey,
There is no NeutronAsyncApi, just a NeutronApi. Use neutron version v2 (instead
of v2_0) from labs.
You should be able to do something like:
NeutronApi neutronApi = ContextBuilder.newBuilder("openstack-neutron")
.credentials(username, password).endpoint(endpoint).buildApi(NeutronApi.class);
The code you are referring to is unwrapping a provider-specific implementation
of compute from the compute abstraction layer. At the moment, jclouds has no
networking abstraction layer, so you get to use neutron directly.
Let me know if this helps or if you need more info.
-Zack
________________________________
From: Jeffrey Nguyen (jeffrngu) [[email protected]<mailto:[email protected]>]
Sent: Wednesday, August 13, 2014 5:09 PM
To: [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
Subject: How to get reference to NeutronApi from ComputeServiceContext
Hi,
I'm not sure whether this should be sent to user or dev aliases, so I'm
including both.
I'm trying to access neutron API from an existing ComputeServiceContext. This
context was created with the "openstack-nova" provider. For the neutron API,
my understanding is the provider need to be set to "openstack-neutron". My
question is how to get a reference to neutron API given an existing
ComputeServiceContext that was created for "openstack-nova".
Below is the code I see for getting reference to NovaApi from
ComputeServiceContext. Is there something similar for NeutronApi? I checked
jclouds lab code and there is NeutronApi but there isn't a NeutronAsyncApi.
ComputeServiceContext context;
RestContext<NovaApi, NovaAsyncApi> nova = context.unwrap();
Thanks,
-Jeffrey