Skip to content

Google Storage permissions support#860

Closed
crunk1 wants to merge 1 commit into
apache:trunkfrom
crunk1:trunk
Closed

Google Storage permissions support#860
crunk1 wants to merge 1 commit into
apache:trunkfrom
crunk1:trunk

Conversation

@crunk1

@crunk1 crunk1 commented Sep 21, 2016

Copy link
Copy Markdown
Contributor
  • Added ex_(get|set|delete)_permissions to libcloud.storage.drivers.google_storage.GoogleStorageDriver
  • Added a JSON connection to the GoogleStorageDriver.
  • The JSON connection is only used in the new methods I added. Added tests for changes.

Tests:
python setup.py test
python3.4 setup.py test

@crunk1

crunk1 commented Sep 21, 2016

Copy link
Copy Markdown
Contributor Author

@adjackura @erjohnso

@crunk1 crunk1 changed the title Google Storage permissions and libcloud.common.types.OrderedEnum Google Storage permissions and libcloud.common.types.IntEnum Sep 22, 2016
@rickard-von-essen

Copy link
Copy Markdown

Don't think I should have been pinged here?

@crunk1

crunk1 commented Sep 22, 2016

Copy link
Copy Markdown
Contributor Author

Ah, yes. Sorry, about that, Rickard. I was looking over a previous bug patch we had discussed.

@crunk1

crunk1 commented Sep 22, 2016

Copy link
Copy Markdown
Contributor Author

@zmarano

@tonybaloney

Copy link
Copy Markdown
Contributor

@crunk1 can you explain the motivations behind the PR please?

@crunk1

crunk1 commented Sep 26, 2016

Copy link
Copy Markdown
Contributor Author

Google Cloud Storage doesn't have a method exposed to query for, or set, permissions on containers or objects. This PR adds the functionality to do so. Internally at Google, I have built some libraries on top of libcloud and I need a way to get and set permissions on GCS entities.
IntEnum was a helper class that I made for my changes, but I purposefully made it more generalized and put it in common/types.py with the idea to share it.

@crunk1

crunk1 commented Sep 27, 2016

Copy link
Copy Markdown
Contributor Author

@illfelder

@erjohnso

Copy link
Copy Markdown
Contributor

The IntEnum addition looks like it could be generically useful across more of the code base. I'm pretty sure I've used dicts and sorted key lists for things like this. But I wonder if it would be better to decouple this and introduce IntEnum more broadly (across more of libcloud) to help us all move to this model? My concern with keeping it joined with the GCS changes, we'd all forget about it and the generic solution would not get adopted elsewhere at which point, this becomes a more complex solution than needed purely for the GCS changes.

wdyt?

/cc @supertom

@crunk1

crunk1 commented Sep 29, 2016

Copy link
Copy Markdown
Contributor Author

I think it is a little beyond the scope of this PR, but I agree with your opinion. Could I put it in a subsequent PR?

@erjohnso

Copy link
Copy Markdown
Contributor

Yes please! I think teasing that out separately and doing something more basic for GCS now would be easier.

@crunk1 crunk1 changed the title Google Storage permissions and libcloud.common.types.IntEnum Google Storage permissions support Sep 29, 2016
…sions to

libcloud.storage.drivers.google_storage.GoogleStorageDriver
- Added a JSON connection to the GoogleStorageDriver.
- The JSON connection is only used in the new methods I added. Added tests for changes.

Tests:
python setup.py test
python3.4 setup.py test
@crunk1

crunk1 commented Sep 29, 2016

Copy link
Copy Markdown
Contributor Author

PTAL, IntEnum logic and other cleanup removed from this PR.

@asfgit asfgit closed this in f30b3e3 Sep 30, 2016
@erjohnso

Copy link
Copy Markdown
Contributor

Thanks @crunk1! 👯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants