use of org.ovirt.engine.core.common.queries.ProviderQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getProviderCertificateChain.
public void getProviderCertificateChain(AsyncQuery<List<CertificateInfo>> aQuery, Provider provider) {
aQuery.converterCallback = new ListConverter<>();
Frontend.getInstance().runQuery(QueryType.GetProviderCertificateChain, new ProviderQueryParameters(provider), aQuery);
}
use of org.ovirt.engine.core.common.queries.ProviderQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getExternalProviderHostGroupList.
public void getExternalProviderHostGroupList(AsyncQuery<List<ExternalHostGroup>> aQuery, Provider provider) {
aQuery.converterCallback = new ListConverter<>();
ProviderQueryParameters params = new ProviderQueryParameters();
params.setProvider(provider);
Frontend.getInstance().runQuery(QueryType.GetHostGroupsFromExternalProvider, params, aQuery);
}
use of org.ovirt.engine.core.common.queries.ProviderQueryParameters in project ovirt-engine by oVirt.
the class BackendExternalProviderCertificateResource method get.
@Override
public Certificate get() {
// The resource identifier is actually the index of the certificate in the chain:
int i;
try {
i = Integer.parseInt(id);
} catch (NumberFormatException exception) {
return notFound();
}
// The backend doesn't have a mechanism to retrieve just one of the certificates of the chain, so we have to
// retrieve them all and find the one that matches the identifier:
Provider provider = BackendExternalProviderHelper.getProvider(this, providerId);
ProviderQueryParameters parameters = new ProviderQueryParameters();
parameters.setProvider(provider);
List<CertificateInfo> entities = getBackendCollection(CertificateInfo.class, QueryType.GetProviderCertificateChain, parameters);
if (entities != null && i >= 0 && i < entities.size()) {
CertificateInfo entity = entities.get(i);
Certificate model = populate(map(entity), entity);
model.setId(id);
return model;
}
// No luck:
return notFound();
}
use of org.ovirt.engine.core.common.queries.ProviderQueryParameters in project ovirt-engine by oVirt.
the class BackendExternalProviderCertificatesResource method list.
@Override
public Certificates list() {
Provider provider = BackendExternalProviderHelper.getProvider(this, providerId);
ProviderQueryParameters parameters = new ProviderQueryParameters();
parameters.setProvider(provider);
return mapCollection(getBackendCollection(QueryType.GetProviderCertificateChain, parameters));
}
use of org.ovirt.engine.core.common.queries.ProviderQueryParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getExternalProviderDiscoveredHostList.
public void getExternalProviderDiscoveredHostList(AsyncQuery<List<ExternalDiscoveredHost>> aQuery, Provider provider) {
aQuery.converterCallback = new ListConverter<>();
ProviderQueryParameters params = new ProviderQueryParameters();
params.setProvider(provider);
Frontend.getInstance().runQuery(QueryType.GetDiscoveredHostListFromExternalProvider, params, aQuery);
}
Aggregations