[ClusterLabs] Q: primitive formatting in crm shell

Kristoffer Grönlund kgronlund at suse.com
Tue May 10 12:56:58 UTC 2016


Ulrich Windl <Ulrich.Windl at rz.uni-regensburg.de> writes:

> Hi!
>
> I have a long-standing question: What are the rules for formatting a primitive in crm shell?
> It seems operations are put on separate lines, but parameters are not (The problem is more clear on non-wide terminals like 80 columns).
> I think having parameters on separate lines would help readability for humans (not to talk about editing with a keyboard).

Yes, that's pretty much it. Each block (params, meta, op, ...) is broken
onto its own line. The formatting is pretty simplistic.

It's something I've been meaning to improve, but it's just one of many
items on a list that keeps growing...

Cheers,
Kristoffer

>
> Example (don't try to understand, just watch the formatting):
> --
> primitive prm_iotwatch_xen-FS ocf:xola:iotwatch \
>         params alpha=0.0055 interval=3 old_threshold=0.5 options="S:T=F75,S:M=O52,N:3.29/60,Q:C=120,P:nagios.nagios=0664" stats_type=E tag=xenLV target="/dev/CFS_VMs/xen" thresholds="A=0.02:0.05,X=0.08:0.15" \
>         op start interval=0 timeout=90 \
>         op stop interval=0 timeout=90 \
>         op monitor interval=300 timeout=90 \
>         meta priority=500
> --
>
> Maybe a new line after "params" should start with some extra indent for every parameter...
>
> Regards,
> Ulrich
>
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>

-- 
// Kristoffer Grönlund
// kgronlund at suse.com




More information about the Users mailing list