use PVE::Storage::config(), not cfs_read_file()

This commit is contained in:
Fabian Grünbichler 2016-03-25 13:56:17 +01:00 committed by Dietmar Maurer
parent 0d6f7ff567
commit 655f21a97f
4 changed files with 5 additions and 5 deletions

View File

@ -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}'"

View File

@ -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);

View File

@ -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();

View File

@ -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};