On 07.04.21 16:22, Aaron Lauterer wrote: > The <pool>/<image> paths are needed in quite a lot of places. Having one > single place where they are created helps to reduce duplicate code and > makes it easier to introduce new features. > > The 'add_pool_to_disk' sub was already doing that but the name was not > really fitting. This commit renames it to the more general > 'get_rbd_path' and changes the second parameter to the more widely used > $volume instead of $disk. > > Furthermore, all occurences where "$pool/$volume" has been concatenated > have been replaced with a call to get_rbd_path. > > Plus some minor code style cleanups for long function calls that were > touched. > > Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com> > --- > PVE/Storage/RBDPlugin.pm | 46 +++++++++++++++++++++++----------------- > 1 file changed, 27 insertions(+), 19 deletions(-) > >
applied, thanks! I made the $volume optional too in a follow-up, so that it could be reused for an additional case. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel