Hello community, here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2014-02-03 16:12:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crmsh (Old) and /work/SRC/openSUSE:Factory/.crmsh.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh" Changes: -------- --- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2014-01-23 15:41:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.crmsh.new/crmsh.changes 2014-02-03 16:12:05.000000000 +0100 @@ -1,0 +2,11 @@ +Mon Feb 3 07:55:51 UTC 2014 - [email protected] + +- medium: xmlutil: rsc_template has no provider attribute (savannah#41410) +- doc: ui_configure: Document the type: prefix argument to configure show (bnc#861776) +- medium: ra: Infer provider from RA name (bnc#860754) +- low: ui_options: add missing documentation for options set (bnc#860585) +- medium: ui_cib: correct name of cib import (bnc#860584) +- medium: ui_ra: Fix problems with ra info command (bnc#860583) +- upstream cs: 3bf6bc6b82ad + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crmsh.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/.hg_archival.txt new/crmsh/.hg_archival.txt --- old/crmsh/.hg_archival.txt 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/.hg_archival.txt 2014-02-01 00:11:56.000000000 +0100 @@ -1,5 +1,5 @@ repo: 13c3bd69e935090cd25213c474cafc3f01b5910b -node: fdf3c08dc5e2c9c4e2bbb48ea20d52ebc76f6b28 +node: 170f0ff108dfe5d186092d023f389bf813490bfe branch: default latesttag: 1.2.6-rc1 -latesttagdistance: 393 +latesttagdistance: 400 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/doc/crm.8.txt new/crmsh/doc/crm.8.txt --- old/crmsh/doc/crm.8.txt 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/doc/crm.8.txt 2014-02-01 00:11:56.000000000 +0100 @@ -1169,7 +1169,7 @@ list ocf pacemaker ............... -[[cmdhelp_ra_meta,show meta data for a RA]] +[[cmdhelp_ra_info,show meta data for a RA]] ==== `info` (`meta`) Show the meta-data of a resource agent type. This is where users @@ -1987,11 +1987,36 @@ Usage: ........ +show [all|<option>] +........ + +Example: +........ show show skill-level show all ........ +[[cmdhelp_options_set,Set the value of a given option]] +==== `set` + +Sets the value of an option. Takes the fully qualified +name of the option as argument, as displayed by `show all`. + +The modified option value is stored in the user-local +configuration file, usually found in `~/.config/crm/crm.conf`. + +Usage: +........ +set <option> <value> +........ + +Example: +........ +set color.warn "magenta bold" +set editor nano +........ + [[cmdhelp_options_save,save the user preferences to the rc file]] ==== `save` @@ -2664,8 +2689,11 @@ The `show` command displays objects. It may display all objects or a set of objects. The user may also choose to see only objects which were changed. + Optionally, the XML code may be displayed instead of the CLI -representation. +representation by passing `xml` as the first argument. + +To show all objects of a certain type, use the `type:` prefix. Usage: ............... @@ -2673,6 +2701,13 @@ show [xml] changed ............... +Example: +............... +show webapp +show type:primitive +show xml type:node +............... + [[cmdhelp_configure_edit,edit CIB objects]] ==== `edit` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/cibconfig.py new/crmsh/modules/cibconfig.py --- old/crmsh/modules/cibconfig.py 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/modules/cibconfig.py 2014-02-01 00:11:56.000000000 +0100 @@ -2597,6 +2597,10 @@ "List of ids (for completion)." return [x.obj_id for x in self.cib_objects] + def type_list(self): + "List of object types (for completion)" + return list(set([x.obj_type for x in self.cib_objects])) + def prim_id_list(self): "List of primitives ids (for group completion)." return [x.obj_id for x in self.cib_objects if x.obj_type == "primitive"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ra.py new/crmsh/modules/ra.py --- old/crmsh/modules/ra.py 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/modules/ra.py 2014-02-01 00:11:56.000000000 +0100 @@ -794,6 +794,20 @@ return True +def pick_provider(providers): + ''' + Pick the most appropriate choice from a + list of providers, falling back to + 'heartbeat' if no good choice is found + ''' + if not providers: + return 'heartbeat' + for pick in ('heartbeat', 'pacemaker'): + if pick in providers: + return pick + return providers[0] + + def disambiguate_ra_type(s): ''' Unravel [class:[provider:]]type @@ -811,10 +825,7 @@ ra_provider = '' if ra_class == "ocf": pl = ra_providers(ra_type, ra_class) - if pl and len(pl) == 1: - ra_provider = pl[0] - elif not pl: - ra_provider = 'heartbeat' + ra_provider = pick_provider(pl) return ra_class, ra_provider, ra_type wcache = WCache.getInstance() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ui_cib.py new/crmsh/modules/ui_cib.py --- old/crmsh/modules/ui_cib.py 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/modules/ui_cib.py 2014-02-01 00:11:56.000000000 +0100 @@ -105,7 +105,7 @@ @command.skill_level('administrator') @command.completers(compl.null, compl.shadows) - def do_pe_import(self, context, infile, name=None): + def do_import(self, context, infile, name=None): "usage: import {<file>|<number>} [<shadow>]" if name and not utils.is_filename_sane(name): context.fatal_error("Bad filename: " + name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ui_configure.py new/crmsh/modules/ui_configure.py --- old/crmsh/modules/ui_configure.py 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/modules/ui_configure.py 2014-02-01 00:11:56.000000000 +0100 @@ -44,9 +44,19 @@ 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', 'changed'])) +_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)) _prim_id_list = compl.call(cib_factory.prim_id_list) _f_prim_free_id_list = compl.call(cib_factory.f_prim_free_id_list) _f_group_id_list = compl.call(cib_factory.f_group_id_list) @@ -283,7 +293,7 @@ pass @command.skill_level('administrator') - @command.completers_repeating(_id_xml_list, _id_list) + @command.completers_repeating(_id_show_list) def do_show(self, context, *args): "usage: show [xml] [<id>...]" if not cib_factory.is_cib_sane(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/ui_ra.py new/crmsh/modules/ui_ra.py --- old/crmsh/modules/ui_ra.py 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/modules/ui_ra.py 2014-02-01 00:11:56.000000000 +0100 @@ -84,7 +84,9 @@ @command.completers(complete_class_provider_type) def do_info(self, context, *args): "usage: info [<class>:[<provider>:]]<type>" - if len(args) > 1: # obsolete syntax + if len(args) == 0: + context.fatal_error("Expected [<class>:[<provider>:]]<type>") + elif len(args) > 1: # obsolete syntax ra_type = args[0] ra_class = args[1] if len(args) < 3: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh/modules/xmlutil.py new/crmsh/modules/xmlutil.py --- old/crmsh/modules/xmlutil.py 2014-01-21 18:01:41.000000000 +0100 +++ new/crmsh/modules/xmlutil.py 2014-02-01 00:11:56.000000000 +0100 @@ -1341,8 +1341,12 @@ for a, v in prim_node.items(): dnode.set(a, v) # but class/provider/type are coming from the template + # savannah#41410: stonith resources do not have the provider + # attribute for a in ("class", "provider", "type"): - dnode.set(a, tmpl_node.get(a)) + v = tmpl_node.get(a) + if v is not None: + dnode.set(a, v) return dnode -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
