All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstack4j.openstack.manila.internal.SchedulerStatsServiceImpl Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.openstack.manila.internal;

import org.openstack4j.api.manila.SchedulerStatsService;
import org.openstack4j.model.manila.BackendStoragePool;
import org.openstack4j.openstack.manila.domain.ManilaBackendStoragePool;

import java.util.List;

public class SchedulerStatsServiceImpl extends BaseShareServices implements SchedulerStatsService {
    @Override
    public List pools() {
        return list(false);
    }

    @Override
    public List poolsDetail() {
        return list(true);
    }

    private List list(boolean detail) {
        return get(ManilaBackendStoragePool.BackendStoragePools.class, uri("/scheduler-stats/pools" +  (detail ? "/detail" : "")))
                .execute()
                .getList();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy