[PVE-User] My suggestion about explicit name in bridge configuration

Diaolin diaolin at diaolin.com
Fri Jan 31 14:38:42 CET 2014


As proposed by Dietmar i will add a new label in the network
configuration but i've a problem

i've created in pvemanagerlib.js
this input field

812,8816d8811
<           column2.push({
<               xtype: 'textfield',
<               fieldLabel: gettext('Network Name'),
<               name: 'network_name'
<           });

and this for reading and showing the field

9147,9151d9141
<                       },
<                       {
<                           header: gettext('Network Name'),
<                           sortable: false,
<                           dataIndex: 'network_name'
9188c9178
<           'netmask', 'gateway', 'network_name'
---
>           'netmask', 'gateway'

after this i've added to perl5/PVE/API2/Network.pm
this definition


     network_name => {
         description => 'Network Name',
         type => 'string',
         optional => 1,
     }


and then in perl5/PVE/Inotify.pm

if (($id eq 'address') || ($id eq 'netmask') || ($id eq 'broadcast') || 
($id eq 'network_name')) {


and
     $raw .= "iface $iface inet $d->{method}\n";
     $raw .= "\taddress  $d->{address}\n" if $d->{address};
     $raw .= "\tnetmask  $d->{netmask}\n" if $d->{netmask};
     $raw .= "\tgateway  $d->{gateway}\n" if $d->{gateway};
     $raw .= "\tbroadcast  $d->{broadcast}\n" if $d->{broadcast};
     $raw .= "\tnetwork_name  $d->{network_name}\n" if 
$d->{network_name};


Ok, i hope that this is all ok but i have a problem

i see the network_name in the network table
i see the input in the network modifier
but whenever i attempt to save it says:

"
Parameter verification failed. (400)

network_name: property is not defined in schema and the schema does not 
allow additional properties
"

My question: how can i create an additional property and where?



I've tested the result and the field network_name makes no problem

If anyone has a hint...


Many thanks.
Diaolin


in the same file


---


S’à destacà l’ultima föia dal bósch nét
crodàda l’ei, solàgna, ‘n mèzz ai sàssi
e ‘ntant fis-ciava ‘n zìfol de oseleti
a tegnìr vìo ‘l pensér che vèn matìna
[Diaolin]



More information about the pve-user mailing list