From bbcfdc08ccf5fe357af756999075ab8e6cfe1690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 25 Mar 2016 13:56:17 +0100 Subject: [PATCH] use PVE::Storage::config(), not cfs_read_file() --- PVE/API2/Nodes.pm | 2 +- PVE/CLI/pveam.pm | 4 ++-- PVE/Service/pvestatd.pm | 2 +- PVE/VZDump.pm | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 68496d7f5..ede7664c1 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -1082,7 +1082,7 @@ __PACKAGE__->register_method({ raise_param_exc({ template => "no such template"}) if !$pd; - my $cfg = cfs_read_file("storage.cfg"); + my $cfg = PVE::Storage::config(); my $scfg = PVE::Storage::storage_check_enabled($cfg, $param->{storage}, $node); die "cannot download to storage type '$scfg->{type}'" diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm index 85b943909..5fd0d766f 100644 --- a/PVE/CLI/pveam.pm +++ b/PVE/CLI/pveam.pm @@ -114,7 +114,7 @@ __PACKAGE__->register_method ({ my $storeid = $param->{storage}; - my $cfg = PVE::Cluster::cfs_read_file("storage.cfg"); + my $cfg = PVE::Storage::config(); die "Storage do not support templates!\n" if !$cfg->{ids}->{$storeid}->{content}->{vztmpl}; @@ -162,7 +162,7 @@ __PACKAGE__->register_method ({ my $template = $param->{template_path}; - my $cfg = PVE::Cluster::cfs_read_file("storage.cfg"); + my $cfg = PVE::Storage::config(); $rpcenv->check_volume_access($authuser, $cfg, undef, $template); diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm index 90add56cf..98e58443a 100755 --- a/PVE/Service/pvestatd.pm +++ b/PVE/Service/pvestatd.pm @@ -258,7 +258,7 @@ sub update_lxc_status { sub update_storage_status { my ($status_cfg) = @_; - my $cfg = cfs_read_file("storage.cfg"); + my $cfg = PVE::Storage::config(); my $ctime = time(); diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 4afe2afb1..9ed0a1733 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -236,7 +236,7 @@ sub run_command { sub storage_info { my $storage = shift; - my $cfg = cfs_read_file('storage.cfg'); + my $cfg = PVE::Storage::config(); my $scfg = PVE::Storage::storage_config($cfg, $storage); my $type = $scfg->{type};