Return the current list of maintenance types
763971
def getMaintenanceTypes(self):
        
        types = [('Preventive',safe_unicode(_('Preventive')).encode('utf-8')),
                 ('Repair', safe_unicode(_('Repair')).encode('utf-8')),
                 ('Enhancement', safe_unicode(_('Enhancement')).encode('utf-8'))]
        return DisplayList(types)
217407
def current(self):
        

        config = self.alembic_config()
        script = ScriptDirectory.from_config(config)

        revision = 'base'

        def display_version(rev, context):
            for rev in script.get_all_current(rev):
                nonlocal revision
                revision = rev.cmd_format(False)

            return []

        with EnvironmentContext(config, script, fn=display_version):
            script.run_env()

        return revision
520872
def get_checks(self):
        """"""
        return [
            self.is_date,
            self.is_datetime,
            self.is_integer,
            self.is_float,
            self.default]
359947
def get_collections(self):
        """"""
        if not self.quiet:
            print
            print "Finding " + self.current_collection_type + "s..."

        self.compute_collections()

        if not self.quiet:
            print self.current_similarity_measure, self.current_collection_type, "information:"
            table_contents = [("Collection","Indices","Size")]
            for (i, j, k) in zip(self.collection_indices,self.collection_sizes,self.collection_list):
                table_contents.append(([unit.text for unit in k], i, j))
            print_table(table_contents)
936910
def list(self):
        """"""
        connection = self._backend._get_connection()
        return list(self._backend.list(connection))
943373
def maintenance_view(template=None):
    
    if not template:
        template = "Pylot/Maintenance/index.html"

    class Maintenance(Pylot):
        @classmethod
        def register(cls, app, **kwargs):
            super(cls, cls).register(app, **kwargs)

            if cls.config_("MAINTENANCE_ON"):
                @app.before_request
                def on_maintenance():
                    return cls.render(layout=template), 503
    return Maintenance
662626
def list_group_maintainers(self, name):
        
        return self.service.list_group_maintainers(
            name, self.url_prefix, self.auth, self.session,
            self.session_send_opts)
244514
def type_list(self, index_name):
        '''
        
        '''
        request = self.session
        url = 'http://%s:%s/%s/_mapping' % (self.host, self.port, index_name)
        response = request.get(url)
        if request.status_code == 200:
            return response[index_name].keys()
        else:
            return response
490512
def pkg_version_list(self, pkg_id):
        '''
        
        '''
        pkg_data = self.__reg_software.get(pkg_id, None)
        if not pkg_data:
            return []

        if isinstance(pkg_data, list):
            # raw data is 'pkgid': [sorted version list]
            return pkg_data  # already sorted oldest to newest

        # Must be a dict or OrderDict, and contain full details
        installed_versions = list(pkg_data.get('version').keys())
        return sorted(installed_versions, key=cmp_to_key(self.__oldest_to_latest_version))
207387
def type(self):
        """"""
        if self is FeatureType.TIMESTAMP:
            return list
        if self is FeatureType.BBOX:
            return BBox
        return dict
801247
def get_registered_collection_resources():
    
    reg = get_current_registry()
    return [util.component
            for util in reg.registeredUtilities()
            if util.name == 'collection-class']
80566
def tracklist():
    '''
    '''
    _c = 0
    server = getServer()
    _current = server.core.tracklist.index()
    for t in server.core.tracklist.get_tl_tracks():
        logging.debug('Got tl trak: %r', t)
        currently = ' -- CURRENT' if t['tlid'] == _current else ''
        print('{}: {}{}'.format(t['tlid'], t['track']['name'], currently))
        _c = _c+1
    print('==='*6)
    print('{} tracks in tracklist'.format(_c))
30937
def list_types(self):
        
        uri = "/notification_types"
        resp, resp_body = self.api.method_get(uri)
        return [CloudMonitorNotificationType(self, info)
                for info in resp_body["values"]]
1174963
def types(self):
        
        data = clips.data.DataObject(self._env)

        lib.EnvSlotTypes(self._env, self._cls, self._name, data.byref)

        return tuple(data.value) if isinstance(data.value, list) else ()
732608
def checks_list():
    '''
    
    '''
    application_url = _get_application_url()
    log.debug('[uptime] get checks')
    jcontent = requests.get('{0}/api/checks'.format(application_url)).json()
    return [x['url'] for x in jcontent]
447921
def list_upgrades(refresh=True, **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''
    ret = {}
    if salt.utils.data.is_true(refresh):
        refresh_db()

    cmd = ['opkg', 'list-upgradable']
    call = __salt__['cmd.run_all'](cmd,
                                   output_loglevel='trace',
                                   python_shell=False)

    if call['retcode'] != 0:
        comment = ''
        if 'stderr' in call:
            comment += call['stderr']
        if 'stdout' in call:
            comment += call['stdout']
        raise CommandExecutionError(comment)
    else:
        out = call['stdout']

    for line in out.splitlines():
        name, _oldversion, newversion = line.split(' - ')
        ret[name] = newversion

    return ret
1170570
def _get_paths_for_status(self, status):
        
        added, modified, deleted = self._changes_cache
        return sorted({
            'added': list(added),
            'modified': list(modified),
            'deleted': list(deleted)}[status]
        )