use of org.ovirt.engine.api.model.OpenStackNetwork in project ovirt-engine by oVirt.
the class BackendOpenStackSubnetResource method addParents.
@Override
protected OpenStackSubnet addParents(OpenStackSubnet subnet) {
OpenStackNetworkProvider provider = new OpenStackNetworkProvider();
provider.setId(providerId);
OpenStackNetwork network = new OpenStackNetwork();
network.setId(networkId);
network.setOpenstackNetworkProvider(provider);
subnet.setOpenstackNetwork(network);
return super.addParents(subnet);
}
use of org.ovirt.engine.api.model.OpenStackNetwork in project ovirt-engine by oVirt.
the class BackendOpenStackSubnetsResource method addParents.
@Override
protected OpenStackSubnet addParents(OpenStackSubnet subnet) {
OpenStackNetworkProvider provider = new OpenStackNetworkProvider();
provider.setId(providerId);
OpenStackNetwork network = new OpenStackNetwork();
network.setId(networkId);
network.setOpenstackNetworkProvider(provider);
subnet.setOpenstackNetwork(network);
return super.addParents(subnet);
}
use of org.ovirt.engine.api.model.OpenStackNetwork in project ovirt-engine by oVirt.
the class OpenStackNetworkMapper method map.
@Mapping(from = Network.class, to = OpenStackNetwork.class)
public static OpenStackNetwork map(Network entity, OpenStackNetwork template) {
OpenStackNetwork model = template != null ? template : new OpenStackNetwork();
ProviderNetwork providedBy = entity.getProvidedBy();
if (providedBy != null) {
if (providedBy.getExternalId() != null) {
model.setId(providedBy.getExternalId());
}
}
if (entity.getName() != null) {
model.setName(entity.getName());
}
return model;
}
Aggregations