//
// addEndpoint(service, baseUrl + "/openstack/identity/v2.0");
// }
if (project != null) {
Service service = new Service();
services.add(service);
service.id = service.name = "nova";
service.type = ServiceType.COMPUTE.getType();
addEndpoint(service, baseUrl + "/openstack/compute/" + project.getId());
}
if (project != null) {
Service service = new Service();
services.add(service);
service.id = service.name = "trove";
service.type = ServiceType.DBAAS.getType();
addEndpoint(service, baseUrl + "/openstack/dbaas/" + project.getId());
}
// if (project != null) {
// Service service = new Service();
// services.add(service);
//
// service.id = service.name = "heat";
// service.type = ServiceTypes.ORCHESTRATION;
//
// addEndpoint(service, baseUrl + "/openstack/orchestration/" +
// project.getId());
// }
{
Service service = new Service();
services.add(service);
service.name = "glance";
service.type = ServiceType.IMAGE.getType();
addEndpoint(service, baseUrl + "/openstack/images");
}
if (project != null) {
Service service = new Service();
services.add(service);
service.name = "swift";
service.type = ServiceType.OBJECT_STORE.getType();
addEndpoint(service, baseUrl + "/openstack/storage/" + project.getId());
}
List<ServiceType> enabledServices = Lists.newArrayList();
Project genericProject = new Project(project.getId());
for (ExtensionModule extension : extensions.getExtensions()) {
if (extension instanceof OpenstackExtension) {
List<ServiceType> extensionServices = ((OpenstackExtension) extension).getServices(genericProject,
baseUrl);
enabledServices.addAll(extensionServices);
}
}
for (ServiceType serviceType : enabledServices) {
Service service = new Service();
services.add(service);
service.name = serviceType.getName();
service.id = service.name;
service.type = serviceType.getType();