based on feedback on rhevm-staff mailing list [1], network labels support (as part of the setup networks api) is missing from the rest api. [1] https://post-office.corp.redhat.com/mailman/private/rhevm-staff/2014-April/msg00012.html
Moti, correct me if I'm wrong, but the new NetworkAttachment API doesn't include references to labels (as this isn't an attachment-related attribute). So this refers to having the frontend call the label/unlabel commands exposed via REST directly, instead of trusting the backend setup networks command to perform this?
(In reply to Lior Vernia from comment #1) > Moti, correct me if I'm wrong, but the new NetworkAttachment API doesn't > include references to labels (as this isn't an attachment-related > attribute). So this refers to having the frontend call the label/unlabel > commands exposed via REST directly, instead of trusting the backend setup > networks command to perform this? Yes. Network labels are properties of the network interfaces. In the new api we do not send list of interfaces and their properties. Instead we send only their identifiers (except bonds which requires more info). The label/unlabel nic commands might trigger additional setup-networks calls, hence I'd suggest first to send the setup-network command which attaches the networks to the nics or removes networks from the nics. Once this action is performed, the label/unlabel nic will be translated simply to a db call and will be terminated immediately. So it is doable without modifying any api, and basically there is no gap here.
Thanks, so this indeed seems like it belongs to the frontend component.
Alona, Per comment #2 Is this something doable for 3.6 , estimated time ?
(In reply to Barak from comment #5) > Alona, > > Per comment #2 > Is this something doable for 3.6 , estimated time ? As explained in comment #2, i don't think there is a need to extend the api to support network labels. The UI is using the new host networking api [1] (haven't reviewed yet), and should compensate the lack of the labels functionality by a consequences api calls to LabelNicCommand and UnlabelNicCommand. So as far as it concerns this bug, it should be closed. [1] https://gerrit.ovirt.org/#/c/38234/
Per comment #6 closing this bug as NOTABUG.
Eventually, we've added the labels to the new setup networks api. The api was incomplete without the networks. The suggestion of first adding/removing the networks and then calling the Label/UnLabel command is not doable since removing a network attached via a label via the setup network is forbidden.