[pve-devel] [PATCH manager] use PVE::Storage::config(), not cfs_read_file()
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Mar 25 13:56:17 CET 2016
---
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 68496d7..ede7664 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 85b9439..5fd0d76 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 90add56..98e5844 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 4afe2af..9ed0a17 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};
--
2.1.4
More information about the pve-devel
mailing list