Search in sources :

Example 1 with GetExternalSubnetsOnProviderByExternalNetworkQueryParameters

use of org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters in project ovirt-engine by oVirt.

the class BackendOpenStackSubnetResource method get.

@Override
public OpenStackSubnet get() {
    GetExternalSubnetsOnProviderByExternalNetworkQueryParameters parameters = new GetExternalSubnetsOnProviderByExternalNetworkQueryParameters();
    parameters.setProviderId(asGuid(providerId));
    parameters.setNetworkId(networkId);
    List<ExternalSubnet> subnets = getBackendCollection(ExternalSubnet.class, QueryType.GetExternalSubnetsOnProviderByExternalNetwork, parameters);
    if (subnets != null) {
        for (ExternalSubnet subnet : subnets) {
            if (Objects.equals(subnet.getId(), id)) {
                return addLinks(populate(map(subnet), subnet));
            }
        }
    }
    return notFound();
}
Also used : ExternalSubnet(org.ovirt.engine.core.common.businessentities.network.ExternalSubnet) GetExternalSubnetsOnProviderByExternalNetworkQueryParameters(org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters)

Example 2 with GetExternalSubnetsOnProviderByExternalNetworkQueryParameters

use of org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters in project ovirt-engine by oVirt.

the class BackendOpenStackSubnetsResource method getBackendCollection.

private List<ExternalSubnet> getBackendCollection() {
    GetExternalSubnetsOnProviderByExternalNetworkQueryParameters parameters = new GetExternalSubnetsOnProviderByExternalNetworkQueryParameters();
    parameters.setProviderId(asGuid(providerId));
    parameters.setNetworkId(networkId);
    return getBackendCollection(QueryType.GetExternalSubnetsOnProviderByExternalNetwork, parameters);
}
Also used : GetExternalSubnetsOnProviderByExternalNetworkQueryParameters(org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters)

Example 3 with GetExternalSubnetsOnProviderByExternalNetworkQueryParameters

use of org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters in project ovirt-engine by oVirt.

the class BackendOpenStackSubnetsResource method getSubnets.

protected List<ExternalSubnet> getSubnets() {
    GetExternalSubnetsOnProviderByExternalNetworkQueryParameters parameters = new GetExternalSubnetsOnProviderByExternalNetworkQueryParameters();
    parameters.setProviderId(asGuid(providerId));
    parameters.setNetworkId(networkId);
    return getBackendCollection(ExternalSubnet.class, QueryType.GetExternalSubnetsOnProviderByExternalNetwork, parameters);
}
Also used : GetExternalSubnetsOnProviderByExternalNetworkQueryParameters(org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters)

Aggregations

GetExternalSubnetsOnProviderByExternalNetworkQueryParameters (org.ovirt.engine.core.common.queries.GetExternalSubnetsOnProviderByExternalNetworkQueryParameters)3 ExternalSubnet (org.ovirt.engine.core.common.businessentities.network.ExternalSubnet)1