def list_all(self): """ :return: :rtype: """ return DigitalOceanAPI.get(self.api_object, 'volumes')
def retrieve_block_volume(self, volume_id): """ :param volume_id: :return: """ return DigitalOceanAPI.get(self.api_object, 'volumes/' + volume_id)
def list_all_actions(self, volume_id): """ :param volume_id: :return: """ return DigitalOceanAPI.get(self.api_object, 'volumes/' + volume_id + '/actions')
def list_snapshots(self, volume_id): """ :param volume_id: :return: """ return DigitalOceanAPI.get(self.api_object, 'volumes/' + volume_id + '/snapshots')
def get_volume_action(self, volume_id, action_id): """ :param volume_id: :param action_id: :return: """ return DigitalOceanAPI.get( self.api_object, 'volumes/' + volume_id + '/actions/' + action_id)
def create_snapshot_from_volume(self, volume_id, name): """ :param volume_id: :param name: :return: """ return DigitalOceanAPI.get(self.api_object, 'volumes/' + volume_id, {'name': name})
def retrieve_block_volume_byname(self, name, region): """ :param name: :param region: :return: """ return DigitalOceanAPI.get(self.api_object, 'volumes', { 'name': name, 'region': region })
def retrive_exisiting_action(api_object, action_id): return DigitalOceanAPI.get(api_object, 'actions/' + action_id)
def list_all_actions(api_object): return DigitalOceanAPI.get(api_object, 'actions')