api: pci hardware: code/indentation style clean-ups

The endpoint name is mostly used for calling the API methods as first
class perl method through autoloader, but manager is a leaf node
w.r.t. dependencies and there is no existing call for either of the
two.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-10-30 10:45:01 +01:00
parent 8b33297c6e
commit ccf9e2f2a3

View File

@ -13,7 +13,7 @@ use base qw(PVE::RESTHandler);
my $default_class_blacklist = "05;06;0b"; my $default_class_blacklist = "05;06;0b";
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'pciscan', name => 'pci_scan',
path => '', path => '',
method => 'GET', method => 'GET',
description => "List local PCI devices.", description => "List local PCI devices.",
@ -31,18 +31,16 @@ __PACKAGE__->register_method ({
format => 'string-list', format => 'string-list',
default => $default_class_blacklist, default => $default_class_blacklist,
optional => 1, optional => 1,
description => "A list of blacklisted PCI classes, which will ". description => "A list of blacklisted PCI classes, which will not be returned."
"not be returned. Following are filtered by ". ." Following are filtered by default: Memory Controller (05), Bridge (06) and"
"default: Memory Controller (05), Bridge (06) and ". ." Processor (0b).",
"Processor (0b).",
}, },
verbose => { verbose => {
type => 'boolean', type => 'boolean',
default => 1, default => 1,
optional => 1, optional => 1,
description => "If disabled, does only print the PCI IDs. " description => "If disabled, does only print the PCI IDs. Otherwise, additional"
."Otherwise, additional information like vendor " ." information like vendor and device will be returned.",
."and device will be returned.",
}, },
}, },
}, },
@ -96,15 +94,15 @@ __PACKAGE__->register_method ({
}, },
iommugroup => { iommugroup => {
type => 'integer', type => 'integer',
description => "The IOMMU group in which the device is in.". description => "The IOMMU group in which the device is in. If no IOMMU group is"
" If no IOMMU group is detected, it is set to -1.", ." detected, it is set to -1.",
}, },
mdev => { mdev => {
type => 'boolean', type => 'boolean',
optional => 1, optional => 1,
description => "If set, marks that the device is capable " description => "If set, marks that the device is capable of creating mediated"
."of creating mediated devices.", ." devices.",
} },
}, },
}, },
}, },
@ -134,7 +132,7 @@ __PACKAGE__->register_method ({
}}); }});
__PACKAGE__->register_method ({ __PACKAGE__->register_method ({
name => 'pciindex', name => 'pci_index',
path => '{pci-id-or-mapping}', path => '{pci-id-or-mapping}',
method => 'GET', method => 'GET',
description => "Index of available pci methods", description => "Index of available pci methods",
@ -201,8 +199,7 @@ __PACKAGE__->register_method ({
}, },
available => { available => {
type => 'integer', type => 'integer',
description => "The number of still available instances of" description => "The number of still available instances of this type.",
." this type.",
}, },
description => { description => {
type => 'string', type => 'string',