How to get tenant id using openstack4j
Hi, is there a way to get the tenant id using openstack4j? I need it to create a config file. Getting swift's endpoint would be nice as well. Thanks!
Update: I finally did it with this:
Iterator<? extends Service> i = OS.getAccess().getServiceCatalog().iterator();
while(i.hasNext()){
Service aux = i.next();
if(aux.getName().compareTo("swift") == 0){
Iterator<? extends Endpoint> j = (aux.getEndpoints()).iterator();
while (j.hasNext()){
Endpoint ep = j.next();
System.out.println(ep.getInternalURL());
}
}
}
Is there a better solution?