Returns a paginated list of backups for this instance.
340294
def list_backups(self, limit=20, marker=0):
        
        return self.manager._list_backups_for_instance(self, limit=limit,
                                                       marker=marker)
398527
public function backups()
    {
        //Only admins can access this controller
        if (!$this->Auth->isGroup('admin')) {
            return;
        }

        $links[] = [__d('me_cms', 'List backups'), [
            'controller' => 'Backups',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];
        $links[] = [__d('me_cms', 'Add backup'), [
            'controller' => 'Backups',
            'action' => 'add',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, __d('me_cms', 'Backups'), ['icon' => 'database']];
    }
972015
def list(gandi, state, id, vhosts, type, limit):
    """"""
    options = {
        'items_per_page': limit,
    }
    if state:
        options['state'] = state

    output_keys = ['name', 'state']
    if id:
        output_keys.append('id')
    if vhosts:
        output_keys.append('vhost')
    if type:
        output_keys.append('type')

    paas_hosts = {}
    result = gandi.paas.list(options)
    for num, paas in enumerate(result):
        paas_hosts[paas['id']] = []
        if vhosts:
            list_vhost = gandi.vhost.list({'paas_id': paas['id']})
            for host in list_vhost:
                paas_hosts[paas['id']].append(host['name'])

        if num:
            gandi.separator_line()
        output_paas(gandi, paas, [], paas_hosts[paas['id']],
                    output_keys)

    return result
1148104
def get_directories(self, request):
        

        queryset = self.folder.media_folder_children.all().order_by(*config.MEDIA_FOLDERS_ORDER_BY.split(","))

        paginator = Paginator(queryset, self.objects_per_page)

        page = request.GET.get('page', None)

        try:
            object_list = paginator.page(page)
        except PageNotAnInteger:

            if page == "all":
                object_list = queryset
            else:
                object_list = paginator.page(1)

        except EmptyPage:
            object_list = paginator.page(paginator.num_pages)

        return object_list
408534
def records(self):
        
        if self._records is None:
            self._records = RecordList(self._version, account_sid=self._solution['account_sid'], )
        return self._records
300013
def get_branches(self):
        
        return github.PaginatedList.PaginatedList(
            github.Branch.Branch,
            self._requester,
            self.url + "/branches",
            None
        )
1353337
def get_backup_paths(cls, block_id, impl, working_dir):
        
        backup_dir = config.get_backups_directory(impl, working_dir)
        backup_paths = []
        for p in cls.get_state_paths(impl, working_dir):
            pbase = os.path.basename(p)
            backup_path = os.path.join( backup_dir, pbase + (".bak.%s" % block_id))
            backup_paths.append( backup_path )

        return backup_paths
344654
def list_snapshots(self):
        
        return [snap for snap in self.manager.list_snapshots()
                if snap.volume_id == self.id]
151015
public static backup_file[] get(nitro_service client) throws Exception
	{
		backup_file resource = new backup_file();
		resource.validate("get");
		return (backup_file[]) resource.get_resources(client);
	}
644299
def available_backups(self):
        
        if not hasattr(self, '_avail_backups'):
            result = self._client.get("{}/backups".format(Instance.api_endpoint), model=self)

            if not 'automatic' in result:
                raise UnexpectedResponseError('Unexpected response loading available backups!', json=result)

            automatic = []
            for a in result['automatic']:
                cur = Backup(self._client, a['id'], self.id, a)
                automatic.append(cur)

            snap = None
            if result['snapshot']['current']:
                snap = Backup(self._client, result['snapshot']['current']['id'], self.id,
                        result['snapshot']['current'])

            psnap = None
            if result['snapshot']['in_progress']:
                psnap = Backup(self._client, result['snapshot']['in_progress']['id'], self.id,
                        result['snapshot']['in_progress'])

            self._set('_avail_backups', MappedObject(**{
                "automatic": automatic,
                "snapshot": {
                    "current": snap,
                    "in_progress": psnap,
                }
            }))

        return self._avail_backups
1200096
public Page<Blob> listBlobs() {
    // [START listBlobs]
    Page<Blob> blobs = bucket.list();
    for (Blob blob : blobs.iterateAll()) {
      // do something with the blob
    }
    // [END listBlobs]
    return blobs;
  }
456648
def get_records(**kwargs):
    """"""
    page_ = kwargs.get('resumptionToken', {}).get('page', 1)
    size_ = current_app.config['OAISERVER_PAGE_SIZE']
    scroll = current_app.config['OAISERVER_RESUMPTION_TOKEN_EXPIRE_TIME']
    scroll_id = kwargs.get('resumptionToken', {}).get('scroll_id')

    if scroll_id is None:
        search = OAIServerSearch(
            index=current_app.config['OAISERVER_RECORD_INDEX'],
        ).params(
            scroll='{0}s'.format(scroll),
        ).extra(
            version=True,
        )[(page_-1)*size_:page_*size_]

        if 'set' in kwargs:
            search = search.query('match', **{'_oai.sets': kwargs['set']})

        time_range = {}
        if 'from_' in kwargs:
            time_range['gte'] = kwargs['from_']
        if 'until' in kwargs:
            time_range['lte'] = kwargs['until']
        if time_range:
            search = search.filter('range', **{'_updated': time_range})

        response = search.execute().to_dict()
    else:
        response = current_search_client.scroll(
            scroll_id=scroll_id,
            scroll='{0}s'.format(scroll),
        )

    class Pagination(object):
        """Dummy pagination class."""

        page = page_
        per_page = size_

        def __init__(self, response):
            """Initilize pagination."""
            self.response = response
            self.total = response['hits']['total']
            self._scroll_id = response.get('_scroll_id')

            # clean descriptor on last page
            if not self.has_next:
                current_search_client.clear_scroll(
                    scroll_id=self._scroll_id
                )
                self._scroll_id = None

        @cached_property
        def has_next(self):
            """Return True if there is next page."""
            return self.page * self.per_page <= self.total

        @cached_property
        def next_num(self):
            """Return next page number."""
            return self.page + 1 if self.has_next else None

        @property
        def items(self):
            """Return iterator."""
            from datetime import datetime
            for result in self.response['hits']['hits']:
                if '_oai' in result['_source']:
                    yield {
                        'id': result['_id'],
                        'json': result,
                        'updated': datetime.strptime(
                            result['_source']['_updated'][:19],
                            '%Y-%m-%dT%H:%M:%S'
                        ),
                    }

    return Pagination(response)
5756
protected function getListBackup()
    {
        $options = $this->query_filter;
        $options['limit'] = $this->data_limit;
        return $this->backup->getList($options);
    }
1007751
def get_list(
        self,
        search='',
        start=0,
        limit=0,
        order_by='',
        order_by_dir='ASC',
        published_only=False,
        minimal=False
    ):
        

        parameters = {}
        args = ['search', 'start', 'limit', 'minimal']
        for arg in args:
            if arg in locals() and locals()[arg]:
                parameters[arg] = locals()[arg]
        if order_by:
            parameters['orderBy'] = order_by
        if order_by_dir:
            parameters['orderByDir'] = order_by_dir
        if published_only:
            parameters['publishedOnly'] = 'true'
        response = self._client.session.get(
            self.endpoint_url, params=parameters
        )
        return self.process_response(response)
473534
def _list_backups_for_instance(self, instance, marker=0, limit=20):
        
        uri = "/%s/%s/backups?limit=%d&marker=%d" % (self.uri_base,
                                                     utils.get_id(instance),
                                                     int(limit),
                                                     int(marker))
        resp, resp_body = self.api.method_get(uri)
        mgr = self.api._backup_manager
        return [CloudDatabaseBackup(mgr, backup)
                for backup in resp_body.get("backups")]
1317276
public List<BackupMetaData> getAvailableBackups() throws Exception
    {
        Map<String, String> config = getBackupConfig();
        return backupProvider.get().getAvailableBackups(exhibitor, config);
    }
1309392
def list_records_next_page(self):
        
        uri = self._paging.get("record", {}).get("next_uri")
        if uri is None:
            raise exc.NoMoreResults("There are no more pages of records to list.")
        return self._list_records(uri)