use PVE::Storage::config(), not cfs_read_file()
This commit is contained in:
parent
0d6f7ff567
commit
655f21a97f
@ -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}'"
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user