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; 2+ 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] 2+ messages in thread

* [pve-devel] applied: [PATCH pve-manager] api2: add name to return type spec of resources
  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 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-06-28 16:23 UTC (permalink / raw)
  To: Proxmox VE development discussion, Hannes Laimer

On 28.06.21 12:40, Hannes Laimer wrote:
> 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(+)
> 
>

applied, thanks! Adapted the commit subject slightly though:
"api: cluster/resources: add 'name' property to return schema"




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

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

Thread overview: 2+ 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

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