]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
use get_standard_option() for spice options
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 10 Dec 2013 09:03:10 +0000 (10:03 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 10 Dec 2013 09:03:10 +0000 (10:03 +0100)
PVE/API2/Nodes.pm
PVE/API2/OpenVZ.pm

index e7ea648f3ac2bdf67fc639b0dfeb465c2ac1bb23..2af3d4e4c0f63c7030720eed60e3b3cf996f0984 100644 (file)
@@ -779,16 +779,12 @@ __PACKAGE__->register_method ({
        description => "Restricted to users on realm 'pam'",
        check => ['perm', '/nodes/{node}', [ 'Sys.Console' ]],
     },
-    description => "Creates a spice shell.",
+    description => "Creates a SPICE shell.",
     parameters => {
        additionalProperties => 0,
        properties => {
            node => get_standard_option('pve-node'),
-           proxy => {
-               description => "This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).",
-               type => 'string', format => 'dns-name',
-               optional => 1,
-           },
+           proxy => get_standard_option('spice-proxy', { optional => 1 }),
            upgrade => {
                type => 'boolean',
                description => "Run 'apt-get dist-upgrade' instead of normal shell.",
@@ -797,17 +793,7 @@ __PACKAGE__->register_method ({
            },
        },
     },
-    returns => {
-       description => "Returned values can be directly passed to the 'remote-viewer' application.",
-       additionalProperties => 1,
-       properties => {
-           type => { type => 'string' },
-           password => { type => 'string' },
-           proxy => { type => 'string' },
-           host => { type => 'string' },
-           'tls-port' => { type => 'integer' },
-       },
-    },
+    returns => get_standard_option('remote-viewer-config'),
     code => sub {
        my ($param) = @_;
 
index 51f8365191749306a9e8914d2f480f9ee3559013..d9993fd6aeebddff4ffaed22ef2eddb1ac8efda1 100644 (file)
@@ -917,24 +917,10 @@ __PACKAGE__->register_method ({
        properties => {
            node => get_standard_option('pve-node'),
            vmid => get_standard_option('pve-vmid'),
-           proxy => {
-               description => "This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).",
-               type => 'string', format => 'dns-name',
-               optional => 1,
-           },
-       },
-    },
-    returns => {
-       description => "Returned values can be directly passed to the 'remote-viewer' application.",
-       additionalProperties => 1,
-       properties => {
-           type => { type => 'string' },
-           password => { type => 'string' },
-           proxy => { type => 'string' },
-           host => { type => 'string' },
-           'tls-port' => { type => 'integer' },
+           proxy => get_standard_option('spice-proxy', { optional => 1 }),
        },
     },
+    returns => get_standard_option('remote-viewer-config'),
     code => sub {
        my ($param) = @_;