public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager] api2: add name to return type spec of resources
@ 2021-06-28 10:40 Hannes Laimer
  2021-06-28 16:23 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Laimer @ 2021-06-28 10:40 UTC (permalink / raw)
  To: pve-devel

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@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





^ permalink raw reply	[flat|nested] 3+ messages in thread
* [pve-devel] [PATCH pve-manager] api2: add name to return type spec of resources
@ 2021-06-28 10:22 Hannes Laimer
  0 siblings, 0 replies; 3+ messages in thread
From: Hannes Laimer @ 2021-06-28 10:22 UTC (permalink / raw)
  To: pve-devel

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@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-28 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 10:40 [pve-devel] [PATCH pve-manager] api2: add name to return type spec of resources Hannes Laimer
2021-06-28 16:23 ` [pve-devel] applied: " Thomas Lamprecht
  -- strict thread matches above, loose matches on Subject: below --
2021-06-28 10:22 [pve-devel] " Hannes Laimer

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