public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Aaron Lauterer <a.lauterer@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 2/3] pvereport: rework report contents
Date: Mon, 21 Dec 2020 17:15:16 +0100	[thread overview]
Message-ID: <ba44892b-60b2-d9b9-2554-2322df707efb@proxmox.com> (raw)
In-Reply-To: <20201221151351.30575-2-a.lauterer@proxmox.com>

On 21/12/2020 16:13, Aaron Lauterer wrote:
> @@ -76,7 +77,9 @@ my $init_report_cmds = sub {
>  
>      if (-e '/etc/ceph/ceph.conf') {
>  	# TODO: add (now working) rdb ls over all pools? really needed?
> -	push @{$report_def->{volumes}}, 'ceph status', 'ceph osd status', 'ceph df', 'pveceph status', 'pveceph pool ls';
> +	push @{$report_def->{volumes}}, 'pveceph status', 'ceph osd status',
> +		'ceph df', 'ceph osd df tree', 'cat /etc/ceph/ceph.conf',
> +		'ceph config dump', 'pveceph pool ls', 'ceph versions';
>      }

Oh, and I followed up on this one. I know, it's tempting to do "partial splits"
once a line is to long, but it's better to consequently move all atoms to different
lines once that is needed in general.

E.g.:

push @{$report_def->{volumes}},
    'pveceph status',
    'ceph osd status',
    'ceph df',
    '...',
    'ceph versions',
    ;

One could "cheat" by use multiple push operations, each adding a few commands, but it's
not that many lines here, so...
Oh, and actually, I'm not 100% sure about the push and @array being in the same line,
I treated this now as single atom as it's a perl built-in and always "push on X" with
the elements as argument. If it was a "normal" sub, the first argument would need to go
on it's line too.

In short, mirror that what rustfmt would do for similar rust code not breaking
any of our specific style rules (like indentation).

mostly just noting as we had a few style exchanges/discussion in the last days
already ^^




  parent reply	other threads:[~2020-12-21 16:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 15:13 [pve-devel] [PATCH manager 1/3] pvereport: fix multipath inclusion Aaron Lauterer
2020-12-21 15:13 ` [pve-devel] [PATCH manager 2/3] pvereport: rework report contents Aaron Lauterer
2020-12-21 16:06   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-21 16:15   ` Thomas Lamprecht [this message]
2020-12-21 15:13 ` [pve-devel] [PATCH manager 3/3] pvereport: code cleanup, line length Aaron Lauterer
2020-12-21 16:08   ` [pve-devel] applied: " Thomas Lamprecht
2020-12-21 16:02 ` [pve-devel] applied: Re: [PATCH manager 1/3] pvereport: fix multipath inclusion Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba44892b-60b2-d9b9-2554-2322df707efb@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal