Пример #1
0
def complete_class_provider_type(args):
    '''
    This is just too complicated to complete properly...
    '''
    ret = set([])
    classes = ra.ra_classes()
    for c in classes:
        if c != 'ocf':
            types = ra.ra_types(c)
            for t in types:
                ret.add('%s:%s' % (c, t))

    providers = ra.ra_providers_all('ocf')
    for p in providers:
        types = ra.ra_types('ocf', p)
        for t in types:
            ret.add('ocf:%s:%s' % (p, t))
    return list(ret)
Пример #2
0
 def do_list(self, context, class_, provider_=None):
     "usage: list <class> [<provider>]"
     if not class_ in ra.ra_classes():
         context.fatal_error("class %s does not exist" % class_)
     if provider_ and not provider_ in ra.ra_providers_all(class_):
         context.fatal_error("there is no provider %s for class %s" % (provider_, class_))
     types = ra.ra_types(class_, provider_)
     if options.regression_tests:
         for t in types:
             print t
     else:
         utils.multicolumn(types)