Mailing List Archive

Q: crm configure edit/show regex
Hi!

I think it would be a useful extension to allow a regular expression for "show" and "edit" in "crm configure". If you name your primitive consistently, you could do things like "show *nfs*" (shell-like regex), and (even more useful) "edit *nfs*".

Maybe care should be taken mot to match "changed".

What do you think?

Regards,
Ulrich


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Q: crm configure edit/show regex [ In reply to ]
On Mon, 17 Feb 2014 15:39:21 +0100
"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> wrote:

> Hi!
>
> I think it would be a useful extension to allow a regular expression
> for "show" and "edit" in "crm configure". If you name your primitive
> consistently, you could do things like "show *nfs*" (shell-like
> regex), and (even more useful) "edit *nfs*".
>
> Maybe care should be taken mot to match "changed".
>
> What do you think?
>

Sounds like a good idea to me, too. I'll see what I can do :)

At least a simple approximation of glob-syntax should be doable.

> Regards,
> Ulrich
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>



--
// Kristoffer Grönlund
// kgronlund@suse.com
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Q: crm configure edit/show regex [ In reply to ]
On 2014-02-18T09:55:44, Kristoffer Grönlund <kgronlund@suse.com> wrote:

> Sounds like a good idea to me, too. I'll see what I can do :)
>
> At least a simple approximation of glob-syntax should be doable.

Constraints can already refer to regex now too. And we're talking about
being able to match on tags (or even attributes) on start/stop etc.

It'd make sense to then merge all this consistently, right?

(Perhaps even via a crm_resource -l option, so that pcs/crmsh use the
same matching code as the PE and as each other, if that makes any
sense.)



Regards,
Lars

--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Q: crm configure edit/show regex [ In reply to ]
On Tue, 18 Feb 2014 13:48:21 +0100
Lars Marowsky-Bree <lmb@suse.com> wrote:

> On 2014-02-18T09:55:44, Kristoffer Grönlund <kgronlund@suse.com>
> wrote:
>
> > Sounds like a good idea to me, too. I'll see what I can do :)
> >
> > At least a simple approximation of glob-syntax should be doable.
>
> Constraints can already refer to regex now too. And we're talking
> about being able to match on tags (or even attributes) on start/stop
> etc.
>
> It'd make sense to then merge all this consistently, right?
>
> (Perhaps even via a crm_resource -l option, so that pcs/crmsh use the
> same matching code as the PE and as each other, if that makes any
> sense.)
>

I also realised that there is another complication, which is that
unless in interactive mode, the bash shell will consume the regex
syntax, and it would need to be escaped. So that would make the feature
even more confusing and doesn't seem entirely clean - although this is
a limitation of shell syntax. In theory the shell could use the
completion information to expand 'crm configure show prim*' into all
the completions for prim*.

Unifying this might be difficult, as far as I know pcs doesn't have an
interactive mode or anything similar to the configure interface of
crmsh..

>
>
> Regards,
> Lars
>



--
// Kristoffer Grönlund
// kgronlund@suse.com
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems