]> git.proxmox.com Git - pve-storage.git/commitdiff
renamed: PVE/API2/StorageReplication.pm -> PVE/API2/Storage/Replication.pm
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 5 May 2017 07:18:14 +0000 (09:18 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 5 May 2017 07:25:43 +0000 (09:25 +0200)
PVE/API2/Makefile
PVE/API2/Storage/Makefile
PVE/API2/Storage/Replication.pm [new file with mode: 0644]
PVE/API2/StorageReplication.pm [deleted file]
PVE/CLI/pvesr.pm

index 621221d1fa7b1b1500fb5175f1e6e4fe5cee596d..7b7226e25592bb5d1f7bdb8183a9660681d6e6e2 100644 (file)
@@ -3,5 +3,4 @@
 .PHONY: install
 install:
        install -D -m 0644 Disks.pm ${DESTDIR}${PERLDIR}/PVE/API2/Disks.pm
-       install -D -m 0644 StorageReplication.pm ${DESTDIR}${PERLDIR}/PVE/API2/StorageReplication.pm
        make -C Storage install
index b23c17c383519199bb49690ba851a24ba512c6fa..2b91bb02bc04714af7c4a2bf4d068edf4efededc 100644 (file)
@@ -1,5 +1,5 @@
 
-SOURCES= Content.pm Status.pm Config.pm Scan.pm
+SOURCES= Content.pm Status.pm Config.pm Scan.pm Replication.pm
 
 .PHONY: install
 install:
diff --git a/PVE/API2/Storage/Replication.pm b/PVE/API2/Storage/Replication.pm
new file mode 100644 (file)
index 0000000..f15205c
--- /dev/null
@@ -0,0 +1,49 @@
+package PVE::API2::Storage::Replication;
+
+use warnings;
+use strict;
+
+use PVE::JSONSchema qw(get_standard_option);
+use PVE::ReplicationTools;
+
+use PVE::RESTHandler;
+
+use base qw(PVE::RESTHandler);
+
+__PACKAGE__->register_method ({
+    name => 'list',
+    path => 'list',
+    method => 'GET',
+    description => "List of all replication jobs.",
+    permissions => {
+       user => 'all',
+    },
+    protected => 1,
+    proxyto => 'node',
+    parameters => {
+       additionalProperties => 0,
+       properties => {
+           node => get_standard_option('pve-node'),
+           nodes => get_standard_option('pve-node-list' ,
+                                        {description => "Notes where the jobs is located.",
+                                         optional => 1}),
+       },
+    },
+    returns => { type => 'object' },
+    code => sub {
+       my ($param) = @_;
+
+       if ($param->{nodes}) {
+           foreach my $node (PVE::Tools::split_list($param->{nodes})) {
+               die "Node: $node does not exists.\n" if
+                   !PVE::Cluster::check_node_exists($node);
+           }
+       }
+
+       my $nodes = $param->{nodes} ?
+           $param->{nodes} : $param->{node};
+
+       return PVE::ReplicationTools::get_all_jobs($nodes);
+}});
+
+1;
diff --git a/PVE/API2/StorageReplication.pm b/PVE/API2/StorageReplication.pm
deleted file mode 100644 (file)
index d229197..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-package PVE::API2::StorageReplication;
-
-use warnings;
-use strict;
-
-use PVE::JSONSchema qw(get_standard_option);
-use PVE::ReplicationTools;
-
-use PVE::RESTHandler;
-
-use base qw(PVE::RESTHandler);
-
-__PACKAGE__->register_method ({
-    name => 'list',
-    path => 'list',
-    method => 'GET',
-    description => "List of all replication jobs.",
-    permissions => {
-       user => 'all',
-    },
-    protected => 1,
-    proxyto => 'node',
-    parameters => {
-       additionalProperties => 0,
-       properties => {
-           node => get_standard_option('pve-node'),
-           nodes => get_standard_option('pve-node-list' ,
-                                        {description => "Notes where the jobs is located.",
-                                         optional => 1}),
-       },
-    },
-    returns => { type => 'object' },
-    code => sub {
-       my ($param) = @_;
-
-       if ($param->{nodes}) {
-           foreach my $node (PVE::Tools::split_list($param->{nodes})) {
-               die "Node: $node does not exists.\n" if
-                   !PVE::Cluster::check_node_exists($node);
-           }
-       }
-
-       my $nodes = $param->{nodes} ?
-           $param->{nodes} : $param->{node};
-
-       return PVE::ReplicationTools::get_all_jobs($nodes);
-}});
-
-1;
index 6f3712cb1e9405326bb545bb91084e542d2a3a69..59321e28fd86a6362df776124bd467050fa514fd 100644 (file)
@@ -2,15 +2,16 @@ package PVE::CLI::pvesr;
 
 use strict;
 use warnings;
+use POSIX qw(strftime);
 
-use PVE::API2::StorageReplication;
 use PVE::JSONSchema qw(get_standard_option);
 use PVE::INotify;
 use PVE::RPCEnvironment;
 use PVE::Tools qw(extract_param);
 use PVE::SafeSyslog;
 use PVE::CLIHandler;
-use POSIX qw(strftime);
+
+use PVE::API2::Storage::Replication;
 
 use base qw(PVE::CLIHandler);