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

EC2 driver breaks contract with base driver in `list_volume_snapshots`

    Details

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

      Description

      The base driver has the following definition for `list_volume_snapshots`:

      def list_volume_snapshots(self, volume):
              """
              List snapshots for a storage volume.
              
              :rtype: ``list`` of :class:`VolumeSnapshot`
              """
              raise NotImplementedError(
                  'list_volume_snapshots not implemented for this driver')
      

      This function is volume-centric and should return all snapshots for the given Volume.

      In contrast, EC2 has the following, which is snapshot-centric and returns only the given snapshot.

          def list_volume_snapshots(self, snapshot):
              return self.list_snapshots(snapshot)
      

      We should change this to both be volume-centric. In its current form, this function is identical to list_snapshots and thus redundant.

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/libcloud/pull/451
        Show
        henkslaaf Allard Hoeve added a comment - https://github.com/apache/libcloud/pull/451
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user allardhoeve opened a pull request:

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

        LIBCLOUD-664 EC2 driver breaks contract with base driver in `list_volume_snapshots`

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

        $ git pull https://github.com/ByteInternet/libcloud ec2-driver-conforms-to-contract-list-volume-snapshots

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

        https://github.com/apache/libcloud/pull/451.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 #451


        commit 0435d28daf8716a51e7f097c8dd6b6d872d0db78
        Author: Allard Hoeve <allard@byte.nl>
        Date: 2015-02-12T13:49:15Z

        Make EC2 conform to interface

        commit 784e8c8a9771ae5de03bd28e9302b986c6d3fc80
        Author: Allard Hoeve <allard@byte.nl>
        Date: 2015-02-12T13:54:31Z

        docs


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user allardhoeve opened a pull request: https://github.com/apache/libcloud/pull/451 LIBCLOUD-664 EC2 driver breaks contract with base driver in `list_volume_snapshots` You can merge this pull request into a Git repository by running: $ git pull https://github.com/ByteInternet/libcloud ec2-driver-conforms-to-contract-list-volume-snapshots Alternatively you can review and apply these changes as the patch at: https://github.com/apache/libcloud/pull/451.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 #451 commit 0435d28daf8716a51e7f097c8dd6b6d872d0db78 Author: Allard Hoeve <allard@byte.nl> Date: 2015-02-12T13:49:15Z Make EC2 conform to interface commit 784e8c8a9771ae5de03bd28e9302b986c6d3fc80 Author: Allard Hoeve <allard@byte.nl> Date: 2015-02-12T13:54:31Z docs

          People

          • Assignee:
            Unassigned
            Reporter:
            henkslaaf Allard Hoeve
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development