Commit 4323af95 authored by Dietmar Maurer's avatar Dietmar Maurer

use same parameter names as qmrestore

parent 9d4c83e5
...@@ -36,7 +36,7 @@ __PACKAGE__->register_method({ ...@@ -36,7 +36,7 @@ __PACKAGE__->register_method({
additionalProperties => 0, additionalProperties => 0,
properties => { properties => {
vmid => get_standard_option('pve-vmid'), vmid => get_standard_option('pve-vmid'),
backup => { archive => {
description => "The backup file.", description => "The backup file.",
type => 'string', type => 'string',
maxLength => 255, maxLength => 255,
...@@ -54,9 +54,7 @@ __PACKAGE__->register_method({ ...@@ -54,9 +54,7 @@ __PACKAGE__->register_method({
code => sub { code => sub {
my ($param) = @_; my ($param) = @_;
my $backup = extract_param($param, 'backup'); $param->{ostemplate} = extract_param($param, 'archive');
$param->{ostemplate} = $backup;
$param->{node} = PVE::INotify::nodename(); $param->{node} = PVE::INotify::nodename();
...@@ -65,7 +63,7 @@ __PACKAGE__->register_method({ ...@@ -65,7 +63,7 @@ __PACKAGE__->register_method({
return PVE::API2::OpenVZ->create_vm($param); return PVE::API2::OpenVZ->create_vm($param);
}}); }});
my $cmddef = [ __PACKAGE__, 'vzrestore', ['backup', 'vmid'], undef, my $cmddef = [ __PACKAGE__, 'vzrestore', ['archive', 'vmid'], undef,
sub { sub {
my $upid = shift; my $upid = shift;
my $status = PVE::Tools::upid_read_status($upid); my $status = PVE::Tools::upid_read_status($upid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment