Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
rackspace cloudfiles servicenet
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ross  
View profile  
 More options Oct 30 2012, 6:57 pm
From: Ross <ross.w.bl...@gmail.com>
Date: Tue, 30 Oct 2012 15:57:03 -0700 (PDT)
Local: Tues, Oct 30 2012 6:57 pm
Subject: rackspace cloudfiles servicenet

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Cole  
View profile  
 More options Oct 30 2012, 7:41 pm
From: Adrian Cole <adrian.f.c...@gmail.com>
Date: Tue, 30 Oct 2012 16:41:33 -0700
Local: Tues, Oct 30 2012 7:41 pm
Subject: Re: rackspace cloudfiles servicenet
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ross  
View profile  
 More options Oct 30 2012, 8:27 pm
From: Ross <ross.w.bl...@gmail.com>
Date: Tue, 30 Oct 2012 17:27:07 -0700 (PDT)
Local: Tues, Oct 30 2012 8:27 pm
Subject: Re: rackspace cloudfiles servicenet

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Cole  
View profile  
 More options Oct 30 2012, 8:30 pm
From: Adrian Cole <adrian.f.c...@gmail.com>
Date: Tue, 30 Oct 2012 17:30:33 -0700
Local: Tues, Oct 30 2012 8:30 pm
Subject: Re: rackspace cloudfiles servicenet
Yeah, please do.  Thanks for sharing the workaround, Ross!
-A


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ross  
View profile  
 More options Oct 30 2012, 9:50 pm
From: Ross <ross.w.bl...@gmail.com>
Date: Tue, 30 Oct 2012 18:50:45 -0700 (PDT)
Local: Tues, Oct 30 2012 9:50 pm
Subject: Re: rackspace cloudfiles servicenet

http://code.google.com/p/jclouds/issues/detail?id=1118


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »