use of com.emc.ecs.management.entity.ListNamespaceRequest in project ecs-dashboard by carone1.
the class NamespaceBO method getNamespaces.
/**
* Gathers all namespaces present on a cluster
*
* @return List - List of namespace
*/
public List<Namespace> getNamespaces() {
List<Namespace> namespaceList = new ArrayList<Namespace>();
ListNamespaceRequest listNamespaceRequest = new ListNamespaceRequest();
// first batch
ListNamespacesResult namespacesResult = client.listNamespaces(listNamespaceRequest);
namespaceList.addAll(namespacesResult.getNamespaces());
// n subsequent batches
while (namespacesResult.getNextMarker() != null) {
listNamespaceRequest.setNextMarker(namespacesResult.getNextMarker());
namespacesResult = client.listNamespaces(listNamespaceRequest);
if (namespacesResult.getNamespaces() != null) {
namespaceList.addAll(namespacesResult.getNamespaces());
}
}
return namespaceList;
}
use of com.emc.ecs.management.entity.ListNamespaceRequest in project ecs-dashboard by carone1.
the class BillingBO method getNamespaces.
/**
* Gathers all namespaces present on a cluster
* @return List - List of namespace
*/
public List<Namespace> getNamespaces() {
// Start collecting billing data from ECS systems
List<Namespace> namespaceList = new ArrayList<Namespace>();
// collect namespace names
ListNamespaceRequest listNamespaceRequest = new ListNamespaceRequest();
// first batch
ListNamespacesResult namespacesResult = client.listNamespaces(listNamespaceRequest);
namespaceList.addAll(namespacesResult.getNamespaces());
// n subsequent batches
while (namespacesResult.getNextMarker() != null) {
listNamespaceRequest.setNextMarker(namespacesResult.getNextMarker());
namespacesResult = client.listNamespaces(listNamespaceRequest);
if (namespacesResult.getNamespaces() != null) {
namespaceList.addAll(namespacesResult.getNamespaces());
}
}
return namespaceList;
}
Aggregations