]> git.proxmox.com Git - pve-storage.git/commitdiff
PVE::API2::Storage::Replication - add directory index
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 5 May 2017 08:01:26 +0000 (10:01 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 5 May 2017 08:01:26 +0000 (10:01 +0200)
PVE/API2/Storage/Replication.pm

index f15205cf186c8ee9aab92fb14a29026c6dd3954f..a33d5ccc5b49022e5d70873370922b8d9c282215 100644 (file)
@@ -11,8 +11,37 @@ use PVE::RESTHandler;
 use base qw(PVE::RESTHandler);
 
 __PACKAGE__->register_method ({
-    name => 'list',
-    path => 'list',
+    name => 'index',
+    path => '',
+    method => 'GET',
+    permissions => { user => 'all' },
+    description => "Directory index.",
+    parameters => {
+       additionalProperties => 0,
+       properties => {
+           node => get_standard_option('pve-node'),
+       },
+    },
+    returns => {
+       type => 'array',
+       items => {
+           type => "object",
+           properties => {},
+       },
+       links => [ { rel => 'child', href => "{name}" } ],
+    },
+    code => sub {
+       my ($param) = @_;
+
+       return [
+           { name => 'jobs' },
+       ];
+    }});
+
+
+__PACKAGE__->register_method ({
+    name => 'jobs',
+    path => 'jobs',
     method => 'GET',
     description => "List of all replication jobs.",
     permissions => {