[pve-devel] [PATCH manager 1/3] use the Diskmanage subs for ceph instead
Dominik Csapak
d.csapak at proxmox.com
Wed Sep 7 11:11:04 CEST 2016
the subs are now in PVE::Diskmanage, so use them
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this needs the diskmanagement patch in pve-storage
PVE/API2/Ceph.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 29b57c7..5845174 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -17,6 +17,7 @@ use PVE::RPCEnvironment;
use PVE::JSONSchema qw(get_standard_option);
use PVE::RADOS;
use PVE::CephTools;
+use PVE::Diskmanage;
use base qw(PVE::RESTHandler);
@@ -197,12 +198,12 @@ __PACKAGE__->register_method ({
my $journal_dev;
if ($param->{journal_dev} && ($param->{journal_dev} ne $param->{dev})) {
- $journal_dev = PVE::CephTools::verify_blockdev_path($param->{journal_dev});
+ $journal_dev = PVE::Diskmanage::verify_blockdev_path($param->{journal_dev});
}
- $param->{dev} = PVE::CephTools::verify_blockdev_path($param->{dev});
+ $param->{dev} = PVE::Diskmanage::verify_blockdev_path($param->{dev});
- my $disklist = PVE::CephTools::list_disks();
+ my $disklist = PVE::Diskmanage::get_disks();
my $devname = $param->{dev};
$devname =~ s|/dev/||;
@@ -365,7 +366,7 @@ __PACKAGE__->register_method ({
if (my $err = $@) {
warn $err;
} elsif ($param->{cleanup}) {
- my $disklist = PVE::CephTools::list_disks();
+ my $disklist = PVE::Diskmanage::get_disks();
&$remove_partition($disklist, $journal_part);
&$remove_partition($disklist, $data_part);
}
@@ -576,7 +577,7 @@ __PACKAGE__->register_method ({
PVE::CephTools::check_ceph_inited();
- my $disks = PVE::CephTools::list_disks();
+ my $disks = PVE::Diskmanage::get_disks();
my $res = [];
foreach my $dev (keys %$disks) {
--
2.1.4
More information about the pve-devel
mailing list