-
Notifications
You must be signed in to change notification settings - Fork 924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for EMC Atmos and thus Ninefold Storage #19
Conversation
xhdrs = [(k, v) for k, v in headers.items() if k.startswith('x-emc-')] | ||
xhdrs.sort(key=lambda x: x[0]) | ||
|
||
signature = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably a good idea to refactor signature part into a separate method. It will also make testing easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if pathstring.startswith(self.driver.path): | ||
pathstring = pathstring[len(self.driver.path):] | ||
if params: | ||
if type(params) is dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I don't really like this check...
Maybe we should just thrown a TypeError
if users passes in anything other than dict as the params
argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
urllib allows either a dict or an iterable of 2-tuples. The check is to force it to the latter so that the order remains the same. I'm happy to code in an assumption that it's dict but it depends on whether you want to impose that constraint.
Any updates? It would be nice to merge it. |
Sorry about the delay. Our second child arrived on Monday and strangely I haven't had much time to hack on things. =) |
No problem and congratulations! I will try to merge this branch over the weekend :) |
raise StopIteration | ||
|
||
yield chunk | ||
if fill_size: | ||
if empty or len(data) >= chunk_size: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equality comparison here doesn't really make sense because it's the same as the else case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The else case is against if fill_size though. Basically that test doesn't bother sending a chunk unless it's the right size or unless we've run out of new data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, oops, I missed that.
Looks OK. Can you please create a ticket on jira and submit a patch there and I'll try to merge it today? Thanks! |
(just doing some pull request cleanup) @jeamland - Those changes have been merged a long time ago, can you please close this pull request? Thanks! |
* Self cancellation * Missing check
These commits add support for the EMC Atmos storage API and add Ninefold as a storage provider.