def get_cib_xml(runner, scope=None): stdout, stderr, retval = get_cib_xml_cmd_results(runner, scope) if retval != 0: if retval == __EXITCODE_CIB_SCOPE_VALID_BUT_NOT_PRESENT and scope: raise LibraryError( reports.cib_load_error_scope_missing( scope, join_multilines([stderr, stdout]))) raise LibraryError( reports.cib_load_error(join_multilines([stderr, stdout]))) return stdout
def get_cib_xml(runner, scope=None): command = [__exec("cibadmin"), "--local", "--query"] if scope: command.append("--scope={0}".format(scope)) output, retval = runner.run(command) if retval != 0: if retval == __EXITCODE_CIB_SCOPE_VALID_BUT_NOT_PRESENT and scope: raise LibraryError( reports.cib_load_error_scope_missing(scope, retval, output) ) else: raise LibraryError(reports.cib_load_error(retval, output)) return output
def get_cib_xml(runner, scope=None): command = [__exec("cibadmin"), "--local", "--query"] if scope: command.append("--scope={0}".format(scope)) stdout, stderr, retval = runner.run(command) if retval != 0: if retval == __EXITCODE_CIB_SCOPE_VALID_BUT_NOT_PRESENT and scope: raise LibraryError( reports.cib_load_error_scope_missing( scope, join_multilines([stderr, stdout]))) else: raise LibraryError( reports.cib_load_error(join_multilines([stderr, stdout]))) return stdout
def get_cib_xml(runner, scope=None): stdout, stderr, retval = get_cib_xml_cmd_results(runner, scope) if retval != 0: if retval == __EXITCODE_CIB_SCOPE_VALID_BUT_NOT_PRESENT and scope: raise LibraryError( reports.cib_load_error_scope_missing( scope, join_multilines([stderr, stdout]) ) ) raise LibraryError( reports.cib_load_error(join_multilines([stderr, stdout])) ) return stdout