On Wednesday, October 31, 2012 11:30:35 AM UTC+11, Adrian Cole wrote:
> Yeah, please do. Thanks for sharing the workaround, Ross!
> -A
> On Tue, Oct 30, 2012 at 5:27 PM, Ross <ross.w...@gmail.com <javascript:>>
> wrote:
> > Thanks, that works.
> > Do you want me to raise an issue for this?
> > For reference for anybody else wanting to do this, my code is:
> > public class RackspaceServicenetModule extends AbstractModule {
> > @Override
> > protected void configure() {
> > bind(EndpointToSupplierURI.class).to(InternalURLSupplier.class);
> > }
> > @Singleton
> > public static class InternalURLSupplier implements
> EndpointToSupplierURI
> > {
> > @Override
> > public Supplier<URI> apply(Endpoint input) {
> > System.err.println("InternalURLSupplier:" + input);
> > return Suppliers.ofInstance(input.getInternalURL() != null ?
> > input.getInternalURL() : input.getPublicURL());
> > }
> > public String toString() {
> > return "supplyInternalURL()";
> > }
> > }
> > }
> > ...
> > ProviderMetadata provider = Providers.withId("cloudfiles-us");
> > ContextBuilder builder =
> > ContextBuilder.newBuilder(provider).credentials(userName, apiKey);
> > if (useServicenet) {
> > builder.modules(ImmutableSet.<Module>of(new
> > RackspaceServicenetModule()));
> > }
> > return builder.build(BlobStoreContext.class);
> > Thanks,
> > Ross
> > On Wednesday, October 31, 2012 10:41:34 AM UTC+11, Adrian Cole wrote:
> >> surprisingly, I don't see an issue on this, though I'm sure we
> discussed
> >> it.
> >> http://code.google.com/p/jclouds/issues/list?q=internalUrl
> >> As a temporary patch, you can make a guice module that sorts this.
> >> ex.
> >> public class ForceInternalUrlModule extends AbstractModule {
> >> private static class InternalOnly extends PublicURLOrInternalIfNull {
> >> // override logic
> >> }
> >> public void configure(){
> >> bind(PublicURLOrInternalIfNull.class).to(InternalOnly.class);
> >> }
> >> }
> >> then, in ContextBuilder, pass ForceInternalUrlModule to the modules
> >> method.
> >> Make sense?
> >> -A
> >> On Tue, Oct 30, 2012 at 3:57 PM, Ross <ross.w...@gmail.com> wrote:
> >> > Hi,
> >> > I have just started to use jclouds to work with cloudfiles in
> rackspace.
> >> > So far I have managed to get synchronous and async upload working,
> but I
> >> > have been unable to find out how to configure jclouds to use the
> >> > rackspace
> >> > servicenet address for access (as I understand it there is a
> significant
> >> > cost advantage to use snet for data uploaded from within the
> rackspace
> >> > datacentre).
> >> > I can see that the selected Endpoint contains both the publicURL
> >> > (https://storage101.ord1.clouddrive.com/...) and the internalURL
> >> > (https://snet-storage101.ord1.clouddrive.com/).
> >> > The internalURL contains the servicenet address that I need to use
> for
> >> > upload.
> >> > Is there a way to configure jclouds to use servicenet?
> >> > If not, what code would I need to write to use the snet address? I
> see
> >> > that
> >> > the EndpointToSupplierURI is configured to use
> PublicURLOrInternalIfNull
> >> > -
> >> > can I write a different implementation and then hook it into jclouds
> >> > somehow?
> >> > I am using jclouds 1.5.2, and using the provider 'cloudfiles-us'.
> >> > Thanks for any help
> >> > Ross
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "jclouds" group.
> >> > To view this discussion on the web visit
> >> > https://groups.google.com/d/msg/jclouds/-/Um140vnw4MUJ.
> >> > To post to this group, send email to jcl...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > jclouds+u...@googlegroups.com.
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/jclouds?hl=en.
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "jclouds" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/jclouds/-/UYJunQFs5WIJ.
> > To post to this group, send email to jcl...@googlegroups.com<javascript:>.
> > To unsubscribe from this group, send email to
> > jclouds+u...@googlegroups.com <javascript:>.
> > For more options, visit this group at
> > http://groups.google.com/group/jclouds?hl=en.