On 10.05.21 08:40, Alexandre Derumier wrote:
> diff --git a/test/zones/simple/ipv4v6nogateway/sdn_config 
> b/test/zones/simple/ipv4v6nogateway/sdn_config
> new file mode 100644
> index 0000000..dbd75c9
> --- /dev/null
> +++ b/test/zones/simple/ipv4v6nogateway/sdn_config
> @@ -0,0 +1,25 @@
> +{
> +  version => 1,
> +  vnets   => {
> +               ids => {
> +                        myvnet => { type => "vnet", zone => "myzone" },
> +                      },
> +             },
> +  zones   => {
> +               ids => { myzone => { ipam => "pve", type => "simple" } },
> +             },
> +  subnets => {
> +             ids => {
> +                     'myzone-192.168.0.0-24' => {
> +                                                     'type' => 'subnet',
> +                                                     'vnet' => 'myvnet',
> +                                             },
> +                     'myzone-2a08:2142:302:3::-64' => {
> +                                                     'type' => 'subnet',
> +                                                     'vnet' => 'myvnet',
> +                                                     }
> +             }
> +             }
> +}

In general:
can we please format this "pretty" human-readable?

Also, anything against switching that to JSON? I do not really like the eval on
file content in the test framework and the original running config is also in 
JSON...

I could just do that with a simple perl script like
perl -MJSON -e 'my $d=""; while(<>) {$d .= $_;} print to_json(eval $d, 
{pretty=>1,canonical=>1});' FILEs...
put in a bash loop.


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to