[pve-devel] [PATCH pve-manager] api2: add name to return type spec of resources

Hannes Laimer h.laimer at proxmox.com
Mon Jun 28 12:22:42 CEST 2021


VM names are returned by the endpoint anyway, therefore it makes sense
to add it to the endpoint specification so it also appears in the API
docs and is visible when using pvesh with text output.

Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 PVE/API2/Cluster.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm
index 641b846d..43dfa65f 100644
--- a/PVE/API2/Cluster.pm
+++ b/PVE/API2/Cluster.pm
@@ -225,6 +225,11 @@ __PACKAGE__->register_method({
 		    type => 'string',
 		    optional => 1,
 		},
+		name => {
+		    description => "Name of the resource.",
+		    type => 'string',
+		    optional => 1,
+		},
 		node => get_standard_option('pve-node', {
 		    description => "The cluster node name (when type in node,storage,qemu,lxc).",
 		    optional => 1,
-- 
2.20.1






More information about the pve-devel mailing list