Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-889

Allow option for returning a detailed json-format ACL from libcloud.storage.drivers.google_storage.ex_get_permissions method

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:

      Description

      Currently the libcloud.storage.drivers.google_storage.ex_get_permissions method (and its associated private _get_container_permissions and _get_object_permissions methods ) returns a tuple indicating the permissions of a bucket or object. My use-case requires a detailed ACL for a specific bucket or object. Currently I cannot get that information from this method.

      The current implementation does make ACL requests but does not save the response or make use of the response body (json format). Instead, if the request for ACL was successful, it simply returns an integer indicating ownership of the bucket/object. If an exception is raised, that is caught and further permissions (e.g. write, read) are subsequently checked.

      I propose adding an additional boolean keyword arg with a default False, so the call signature would be:

      ex_get_permissions(self, container_name, object_name=None, detailed_acl=False)

      If the arg is False, the method returns the same tuple it does now, preserving backwards compatibility and not changing the default expected behavior. If the method is called with detailed_acl=True, the method will return a json object parsed from the body of the response.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              brianlawney Brian Lawney
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified