use of org.openstack.model.common.Extension in project platformlayer by platformlayer.
the class CloudBehaviours method getCachedInfo.
CachedInfo getCachedInfo() throws OpsException {
// TODO: We key on endpoint, to avoid repeated calls.
// Is it safe to assume that everyone has the same capabilities on a cloud??
CachedInfo info = cachedInfo.get(cloud.endpoint);
if (info == null) {
OpenstackCloudHelpers helpers = new OpenstackCloudHelpers();
OpenstackComputeClient compute = helpers.buildOpenstackComputeClient(cloud);
List<Extension> extensions = Lists.newArrayList(compute.root().extensions().list());
info = new CachedInfo(extensions);
cachedInfo.put(cloud.endpoint, info);
}
return info;
}
Aggregations