[pdm-devel] [PATCH proxmox-api-types v3 2/6] sdn: add list/create vnet endpoints

Stefan Hanreich s.hanreich at proxmox.com
Wed Sep 3 14:07:45 CEST 2025


On 9/3/25 11:36 AM, Shannon Sterz wrote:
> On Tue Sep 2, 2025 at 4:09 PM CEST, Stefan Hanreich wrote:
>> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
>> ---
>>  pve-api-types/generate.pl | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/pve-api-types/generate.pl b/pve-api-types/generate.pl
>> index 6f55fb9..eb8436c 100644
>> --- a/pve-api-types/generate.pl
>> +++ b/pve-api-types/generate.pl
>> @@ -80,6 +80,7 @@ Schema2Rust::register_format('bridge-pair' => { code => 'verifiers::verify_bridg
>>  Schema2Rust::register_format('pve-task-status-type' => { regex => '^(?i:ok|error|warning|unknown)$' });
>>
>>  Schema2Rust::register_format('pve-sdn-zone-id' => { regex => '^[a-z][a-z0-9]*[a-z0-9]$' });
>> +Schema2Rust::register_format('pve-sdn-vnet-id' => { regex => '^[a-z][a-z0-9]*[a-z0-9]$' });
> 
> nit: same as previous patch, couldn't this be `^[a-z][a-z0-9]+$`?

I just copied this over from SDN, but I don't see any issue with
shortening it, could adjust it in pve-network while I'm at it as well, I
guess.

>>  Schema2Rust::register_enum_variant('PveVmCpuConfReportedModel::486' => 'I486');
>>  Schema2Rust::register_enum_variant('QemuConfigEfidisk0Efitype::2m' => 'Mb2');
>> @@ -342,6 +343,12 @@ Schema2Rust::derive('SdnZonePending' => 'Clone', 'PartialEq');
>>  api(POST => '/cluster/sdn/zones', 'create_zone', 'param-name' => 'CreateZone');
>>  Schema2Rust::derive('CreateZone' => 'Clone', 'PartialEq');
>>
>> +api(GET => '/cluster/sdn/vnets', 'list_vnets', 'return-name' => 'SdnVnet');
>> +Schema2Rust::derive('SdnVnet' => 'Clone', 'PartialEq');
>> +Schema2Rust::derive('SdnVnetPending' => 'Clone', 'PartialEq');
>> +api(POST => '/cluster/sdn/vnets', 'create_vnet', 'param-name' => 'CreateVnet');
>> +Schema2Rust::derive('CreateVnet' => 'Clone', 'PartialEq');
>> +
>>  # NOW DUMP THE CODE:
>>  #
>>  # We generate one file for API types, and one for API method calls.
> 





More information about the pdm-devel mailing list