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]]
Sent: Wednesday, August 13, 2014 5:09 PM
To: [email protected]; [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