Ejemplo n.º 1
0
 def snapshots(self):
     """
     Get all Volumes of type Snapshot.  Updates every time - no caching.
     :return: a `list` of all the `ScaleIO_Volume` that have a are of type Snapshot.
     :rtype: list
     """
     self.connection._check_login()
     response = self.connection._do_get("{}/{}".format(
         self.connection._api_url, "types/Volume/instances")).json()
     all_volumes_snapshot = []
     for volume in response:
         if volume['volumeType'] == 'Snapshot':
             all_volumes_snapshot.append(Volume.from_dict(volume))
     return all_volumes_snapshot
Ejemplo n.º 2
0
 def snapshots(self):
     """
     Get all Volumes of type Snapshot.  Updates every time - no caching.
     :return: a `list` of all the `ScaleIO_Volume` that have a are of type Snapshot.
     :rtype: list
     """
     self.connection._check_login()
     response = self.connection._do_get("{}/{}".format(self.connection._api_url, "types/Volume/instances")).json()
     all_volumes_snapshot = []
     for volume in response:
         if volume['volumeType'] == 'Snapshot':
             all_volumes_snapshot.append(
                 Volume.from_dict(volume)
         )
     return all_volumes_snapshot