add missing completion hooks

This commit is contained in:
Dietmar Maurer
2015-10-01 07:42:37 +02:00
parent bf7aed2674
commit f3bd890d98
4 changed files with 24 additions and 14 deletions

View File

@ -229,7 +229,9 @@ __PACKAGE__->register_method ({
parameters => { parameters => {
additionalProperties => 0, additionalProperties => 0,
properties => { properties => {
storage => get_standard_option('pve-storage-id'), storage => get_standard_option('pve-storage-id', {
completion => \&PVE::Storage::complete_storage,
}),
}, },
}, },
returns => { type => 'null' }, returns => { type => 'null' },

View File

@ -29,18 +29,20 @@ __PACKAGE__->register_method ({
additionalProperties => 0, additionalProperties => 0,
properties => { properties => {
node => get_standard_option('pve-node'), node => get_standard_option('pve-node'),
storage => get_standard_option('pve-storage-id'), storage => get_standard_option('pve-storage-id', {
completion => \&PVE::Storage::complete_storage_enabled,
}),
content => { content => {
description => "Only list content of this type.", description => "Only list content of this type.",
type => 'string', format => 'pve-storage-content', type => 'string', format => 'pve-storage-content',
optional => 1, optional => 1,
completion => \&PVE::Storage::complete_content_type, completion => \&PVE::Storage::complete_content_type,
}, },
vmid => get_standard_option vmid => get_standard_option('pve-vmid', {
('pve-vmid', { description => "Only list images for this VM",
description => "Only list images for this VM", optional => 1,
optional => 1, completion => \&PVE::Cluster::complete_vmid,
}), }),
}, },
}, },
returns => { returns => {
@ -247,10 +249,14 @@ __PACKAGE__->register_method ({
additionalProperties => 0, additionalProperties => 0,
properties => { properties => {
node => get_standard_option('pve-node'), node => get_standard_option('pve-node'),
storage => get_standard_option('pve-storage-id', { optional => 1}), storage => get_standard_option('pve-storage-id', {
optional => 1,
completion => \&PVE::Storage::complete_storage,
}),
volume => { volume => {
description => "Volume identifier", description => "Volume identifier",
type => 'string', type => 'string',
completion => \&PVE::Storage::complete_volume,
}, },
}, },
}, },

View File

@ -40,11 +40,11 @@ __PACKAGE__->register_method ({
additionalProperties => 0, additionalProperties => 0,
properties => { properties => {
node => get_standard_option('pve-node'), node => get_standard_option('pve-node'),
storage => get_standard_option storage => get_standard_option('pve-storage-id', {
('pve-storage-id', { description => "Only list status for specified storage",
description => "Only list status for specified storage", optional => 1,
optional => 1, completion => \&PVE::Storage::complete_storage_enabled,
}), }),
content => { content => {
description => "Only list stores which support this content type.", description => "Only list stores which support this content type.",
type => 'string', format => 'pve-storage-content-list', type => 'string', format => 'pve-storage-content-list',
@ -61,6 +61,7 @@ __PACKAGE__->register_method ({
description => "If target is different to 'node', we only lists shared storages which " . description => "If target is different to 'node', we only lists shared storages which " .
"content is accessible on this 'node' and the specified 'target' node.", "content is accessible on this 'node' and the specified 'target' node.",
optional => 1, optional => 1,
completion => \&PVE::Cluster::get_nodelist,
}), }),
}, },
}, },

View File

@ -34,6 +34,7 @@ __PACKAGE__->register_method ({
volume => { volume => {
description => "Volume identifier", description => "Volume identifier",
type => 'string', format => 'pve-volume-id', type => 'string', format => 'pve-volume-id',
completion => \&PVE::Storage::complete_volume,
}, },
}, },
}, },