Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.14.0-beta3
    • None
    • Storage
    • None

    Description

      I found another patch in my collection, where I had patched the Rackspace storage driver to use the HTTPS CDN URI.

      I'm unsure if it may be best to have this as an option for storage drivers, but if this option is added, it will also need to be implemented for the other storage drivers. I would like some advice on this.

      The patch that hard codes it to use HTTPS URIs always for the CDN, as a 1-line change (ie: without the settings proposed above):

      -------------------- libcloud/storage/drivers/cloudfiles.py --------------------
      index 1502a33..6e7f931 100644
      @@ -273,7 +273,7 @@ class CloudFilesStorageDriver(StorageDriver, OpenStackDriverMixin):
                                                  cdn_request=True)
       
               if response.status == httplib.NO_CONTENT:
      -            cdn_url = response.headers['x-cdn-uri']
      +            cdn_url = response.headers['x-cdn-ssl-uri']
                   return cdn_url
               elif response.status == httplib.NOT_FOUND:
                   raise ContainerDoesNotExistError(value='',
      

      Attachments

        Issue Links

          Activity

            githubbot ASF GitHub Bot added a comment -

            Github user asfgit closed the pull request at:

            https://github.com/apache/libcloud/pull/1076

            githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/libcloud/pull/1076

            Commit b21787bd4f500bee9e61f700bb21b2e88bf21d1a in libcloud's branch refs/heads/trunk from Andrew Browning
            [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=b21787b ]

            Add SSL URI support for LIBCLOUD-458

            Add an optional argument to retrieve the x-cdn-ssl-uri of a Cloud Files
            container.

            jira-bot ASF subversion and git services added a comment - Commit b21787bd4f500bee9e61f700bb21b2e88bf21d1a in libcloud's branch refs/heads/trunk from Andrew Browning [ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=b21787b ] Add SSL URI support for LIBCLOUD-458 Add an optional argument to retrieve the x-cdn-ssl-uri of a Cloud Files container.
            githubbot ASF GitHub Bot added a comment -

            GitHub user ayleph opened a pull request:

            https://github.com/apache/libcloud/pull/1076

            Add SSL URI support for LIBCLOUD-458

            Add an optional argument to retrieve the x-cdn-ssl-uri of a Cloud Files
            container.

              1. Changes Title (replace this with a logical title for your changes)
                1. Description

            Replace this with the PR description (mention the changes you have made, why
            you have made them, provide some background and any references to the provider
            documentation if needed, etc.).

            For more information on contributing, please see [Contributing](http://libcloud.readthedocs.org/en/latest/development.html#contributing)
            section of our documentation.

                1. Status

            Replace this: describe the PR status. Examples:

            • work in progress
            • done, ready for review
                1. Checklist (tick everything that applies)

            You can merge this pull request into a Git repository by running:

            $ git pull https://github.com/ayleph/libcloud trunk

            Alternatively you can review and apply these changes as the patch at:

            https://github.com/apache/libcloud/pull/1076.patch

            To close this pull request, make a commit to your master/trunk branch
            with (at least) the following in the commit message:

            This closes #1076


            commit e7a3ade5dc69d1953831d57a9c0fc2f1ba2b0b67
            Author: ayleph <ayleph@thisshitistemp.com>
            Date: 2017-06-22T05:13:17Z

            Add SSL URI support for LIBCLOUD-458

            Add an optional argument to retrieve the x-cdn-ssl-uri of a Cloud Files
            container.


            githubbot ASF GitHub Bot added a comment - GitHub user ayleph opened a pull request: https://github.com/apache/libcloud/pull/1076 Add SSL URI support for LIBCLOUD-458 Add an optional argument to retrieve the x-cdn-ssl-uri of a Cloud Files container. Changes Title (replace this with a logical title for your changes) Description Replace this with the PR description (mention the changes you have made, why you have made them, provide some background and any references to the provider documentation if needed, etc.). For more information on contributing, please see [Contributing] ( http://libcloud.readthedocs.org/en/latest/development.html#contributing ) section of our documentation. Status Replace this: describe the PR status. Examples: work in progress done, ready for review Checklist (tick everything that applies) [ ] [Code linting] ( http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide ) (required, can be done after the PR checks) [ ] Documentation [ ] [Tests] ( http://libcloud.readthedocs.org/en/latest/testing.html ) [ ] [ICLA] ( http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes ) (required for bigger changes) You can merge this pull request into a Git repository by running: $ git pull https://github.com/ayleph/libcloud trunk Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/1076.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1076 commit e7a3ade5dc69d1953831d57a9c0fc2f1ba2b0b67 Author: ayleph <ayleph@thisshitistemp.com> Date: 2017-06-22T05:13:17Z Add SSL URI support for LIBCLOUD-458 Add an optional argument to retrieve the x-cdn-ssl-uri of a Cloud Files container.

            I'm affected by this issue as well. I'd like to use libcloud to replace python-cloudfiles and pyrax as a storage driver for the GNU MediaGoblin project. These other projects provide a method to return the SSL URI of a container. I would like to see that functionality added to libcloud so GNU MediaGoblin can move forward to a non-deprecated storage driver.

            ayleph Andrew Browning added a comment - I'm affected by this issue as well. I'd like to use libcloud to replace python-cloudfiles and pyrax as a storage driver for the GNU MediaGoblin project. These other projects provide a method to return the SSL URI of a container. I would like to see that functionality added to libcloud so GNU MediaGoblin can move forward to a non-deprecated storage driver.
            kami Tomaz Muraus added a comment -

            Yes, you are correct, this one needs a bit more thought and work.

            We have a couple of different options here.

            1. Add "secure" / "https" argument to the existing get_container_cdn_url and get_object_cdn_url method

            2. Add a new set of methods - get_container_secure/https_cdn_url and get_object_secure/https_cdn_url.

            I'm kinda leaning towards #1. The problem with #1 is that because of the nature of Python (dynamic typing, we don't use zope.interface or similar) is hard to enforce that everyone will implement it correctly which means throwing an exception if the provider doesn't support returning an https URL.

            kami Tomaz Muraus added a comment - Yes, you are correct, this one needs a bit more thought and work. We have a couple of different options here. 1. Add "secure" / "https" argument to the existing get_container_cdn_url and get_object_cdn_url method 2. Add a new set of methods - get_container_secure/https_cdn_url and get_object_secure/https_cdn_url . I'm kinda leaning towards #1. The problem with #1 is that because of the nature of Python (dynamic typing, we don't use zope.interface or similar) is hard to enforce that everyone will implement it correctly which means throwing an exception if the provider doesn't support returning an https URL.

            People

              Unassigned Unassigned
              micolous Michael Farrell

              Dates

                Created:
                Updated:

                Slack

                  Issue deployment