Exemple #1
0
def rename_rscref(c_obj, old_id, new_id):
    err_buf = ErrorBuffer.getInstance()
    if rename_rscref_simple(c_obj, old_id, new_id) or \
            rename_rscref_rset(c_obj, old_id, new_id):
        err_buf.info("resource references in %s updated" % str(c_obj))
Exemple #2
0
import options
from msg import ErrorBuffer
from msg import common_err, common_info, common_warn
from msg import syntax_err
import rsctest
import schema
import ui_cib
import ui_cibstatus
import ui_ra
import ui_template
import ui_history
import ui_utils
import ui_assist
from crm_gv import gv_types

err_buf = ErrorBuffer.getInstance()
cib_factory = CibFactory.getInstance()


def _type_completions():
    "completer for type: use in show"
    typelist = cib_factory.type_list()
    return ['type:%s' % (t) for t in typelist]


# Tab completion helpers
_id_list = compl.call(cib_factory.id_list)
_id_xml_list = compl.join(_id_list, compl.choice(['xml']))
_id_show_list = compl.join(_id_list,
                           compl.choice(['xml', 'changed']),
                           compl.call(_type_completions))
Exemple #3
0
def rename_rscref(c_obj, old_id, new_id):
    err_buf = ErrorBuffer.getInstance()
    if rename_rscref_simple(c_obj, old_id, new_id) or \
            rename_rscref_rset(c_obj, old_id, new_id):
        err_buf.info("resource references in %s updated" % str(c_obj))