Search in sources :

Example 6 with NetworkLabels

use of org.ovirt.engine.api.model.NetworkLabels in project ovirt-engine by oVirt.

the class BackendNetworkLabelResource method get.

@Override
public NetworkLabel get() {
    NetworkLabels labels = parent.list();
    if (labels != null) {
        for (NetworkLabel label : labels.getNetworkLabels()) {
            if (label.getId().equals(id)) {
                label.setNetwork(new Network());
                label.getNetwork().setId(parent.getNetworkId().toString());
                return addLinks(label);
            }
        }
    }
    return notFound();
}
Also used : NetworkLabels(org.ovirt.engine.api.model.NetworkLabels) Network(org.ovirt.engine.api.model.Network) NetworkLabel(org.ovirt.engine.api.model.NetworkLabel)

Aggregations

NetworkLabels (org.ovirt.engine.api.model.NetworkLabels)6 NetworkLabel (org.ovirt.engine.api.model.NetworkLabel)3 Network (org.ovirt.engine.api.model.Network)2 HostNic (org.ovirt.engine.api.model.HostNic)1 NetworkUsage (org.ovirt.engine.api.model.NetworkUsage)1 Properties (org.ovirt.engine.api.model.Properties)1 Statistics (org.ovirt.engine.api.model.Statistics)1 V3Network (org.ovirt.engine.api.v3.types.V3Network)1