]> git.proxmox.com Git - pve-storage.git/commitdiff
add missing completion hooks
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Oct 2015 05:42:37 +0000 (07:42 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Oct 2015 05:59:48 +0000 (07:59 +0200)
PVE/API2/Storage/Config.pm
PVE/API2/Storage/Content.pm
PVE/API2/Storage/Status.pm
PVE/CLI/pvesm.pm

index e5c57ee11c760a3fab89b124b0cc6cbbc880e71e..b9fdc0e24087719f854145c82157ad85037e9c84 100755 (executable)
@@ -229,7 +229,9 @@ __PACKAGE__->register_method ({
     parameters => {
        additionalProperties => 0,
        properties => { 
-           storage => get_standard_option('pve-storage-id'),
+           storage => get_standard_option('pve-storage-id', {
+                completion => \&PVE::Storage::complete_storage,
+            }),
        },
     },
     returns => { type => 'null' },
index e33888e0306dd8f7d6596ad9aed63cdcc0751a85..03f9b26741797d4f2006a4a698f28867f023ba7a 100644 (file)
@@ -29,18 +29,20 @@ __PACKAGE__->register_method ({
        additionalProperties => 0,
        properties => { 
            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 => { 
                description => "Only list content of this type.",
                type => 'string', format => 'pve-storage-content',
                optional => 1,
                completion => \&PVE::Storage::complete_content_type,
            },
-           vmid => get_standard_option
-               ('pve-vmid', { 
-                   description => "Only list images for this VM",
-                   optional => 1,              
-                }),
+           vmid => get_standard_option('pve-vmid', {
+               description => "Only list images for this VM",
+               optional => 1,
+               completion => \&PVE::Cluster::complete_vmid,
+           }),
        },
     },
     returns => {
@@ -247,10 +249,14 @@ __PACKAGE__->register_method ({
        additionalProperties => 0,
        properties => { 
            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 => {
                description => "Volume identifier",
-               type => 'string', 
+               type => 'string',
+               completion => \&PVE::Storage::complete_volume,
            },
        },
     },
index b00aa671140f2995fd0d08cf087b48848f2dd7ad..49bb58cb36198ea81f4a61c1625f74cc72023101 100644 (file)
@@ -40,11 +40,11 @@ __PACKAGE__->register_method ({
        additionalProperties => 0,
        properties => {
            node => get_standard_option('pve-node'),
-           storage => get_standard_option
-               ('pve-storage-id', {
-                   description => "Only list status for  specified storage",
-                   optional => 1,
-                }),
+           storage => get_standard_option('pve-storage-id', {
+               description => "Only list status for  specified storage",
+               optional => 1,
+               completion => \&PVE::Storage::complete_storage_enabled,
+           }),
            content => { 
                description => "Only list stores which support this content type.",
                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 " .
                    "content is accessible on this 'node' and the specified 'target' node.",
                optional => 1,
+               completion => \&PVE::Cluster::get_nodelist,
            }),
        },
     },
index bb122ce346b4689e02890a2f55bb9f26cfd23ca7..0724eaafe020a46b765a1aa4592e866f8db0f220 100755 (executable)
@@ -34,6 +34,7 @@ __PACKAGE__->register_method ({
            volume => {
                description => "Volume identifier",
                type => 'string', format => 'pve-volume-id',
+               completion => \&PVE::Storage::complete_volume,
            },
        },
     },