diff options
Diffstat (limited to 'src/PVE/API2/Network/SDN/Dns.pm')
| -rw-r--r-- | src/PVE/API2/Network/SDN/Dns.pm | 21 | 
1 files changed, 19 insertions, 2 deletions
diff --git a/src/PVE/API2/Network/SDN/Dns.pm b/src/PVE/API2/Network/SDN/Dns.pm index c82e354..48fc2f6 100644 --- a/src/PVE/API2/Network/SDN/Dns.pm +++ b/src/PVE/API2/Network/SDN/Dns.pm @@ -123,13 +123,19 @@ __PACKAGE__->register_method({      permissions => {          check => ['perm', '/sdn/dns', ['SDN.Allocate']],      }, -    parameters => PVE::Network::SDN::Dns::Plugin->createSchema(), +    parameters => PVE::Network::SDN::Dns::Plugin->createSchema( +        undef, +        { +            'lock-token' => get_standard_option('pve-sdn-lock-token'), +        }, +    ),      returns => { type => 'null' },      code => sub {          my ($param) = @_;          my $type = extract_param($param, 'type');          my $id = extract_param($param, 'dns'); +        my $lock_token = extract_param($param, 'lock-token');          my $plugin = PVE::Network::SDN::Dns::Plugin->lookup($type);          my $opts = $plugin->check_config($id, $param, 1, 1); @@ -157,6 +163,7 @@ __PACKAGE__->register_method({              },              "create sdn dns object failed", +            $lock_token,          );          return undef; @@ -172,7 +179,12 @@ __PACKAGE__->register_method({      permissions => {          check => ['perm', '/sdn/dns', ['SDN.Allocate']],      }, -    parameters => PVE::Network::SDN::Dns::Plugin->updateSchema(), +    parameters => PVE::Network::SDN::Dns::Plugin->updateSchema( +        undef, +        { +            'lock-token' => get_standard_option('pve-sdn-lock-token'), +        }, +    ),      returns => { type => 'null' },      code => sub {          my ($param) = @_; @@ -180,6 +192,7 @@ __PACKAGE__->register_method({          my $id = extract_param($param, 'dns');          my $digest = extract_param($param, 'digest');          my $delete = extract_param($param, 'delete'); +        my $lock_token = extract_param($param, 'lock-token');          PVE::Network::SDN::lock_sdn_config(              sub { @@ -209,6 +222,7 @@ __PACKAGE__->register_method({              },              "update sdn dns object failed", +            $lock_token,          );          return undef; @@ -233,6 +247,7 @@ __PACKAGE__->register_method({                      completion => \&PVE::Network::SDN::Dns::complete_sdn_dns,                  },              ), +            'lock-token' => get_standard_option('pve-sdn-lock-token'),          },      },      returns => { type => 'null' }, @@ -240,6 +255,7 @@ __PACKAGE__->register_method({          my ($param) = @_;          my $id = extract_param($param, 'dns'); +        my $lock_token = extract_param($param, 'lock-token');          PVE::Network::SDN::lock_sdn_config(              sub { @@ -255,6 +271,7 @@ __PACKAGE__->register_method({              },              "delete sdn dns object failed", +            $lock_token,          );          return undef;  | 
