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

com.github.narcissujsk.openstackjsk.openstack.trove.internal.DBFlavorServiceImpl Maven / Gradle / Ivy

The newest version!
package com.github.narcissujsk.openstackjsk.openstack.trove.internal;

import com.github.narcissujsk.openstackjsk.api.trove.InstanceFlavorService;
import com.github.narcissujsk.openstackjsk.model.trove.Flavor;
import com.github.narcissujsk.openstackjsk.openstack.trove.domain.TroveInstanceFlavor;
import com.github.narcissujsk.openstackjsk.openstack.trove.domain.TroveInstanceFlavor.Flavors;
import com.github.narcissujsk.openstackjsk.openstack.trove.internal.BaseTroveServices;

import java.util.List;

/**
 * Flavor API Implementation
 *
 * @author sumit gandhi
 */
public class DBFlavorServiceImpl extends BaseTroveServices implements InstanceFlavorService {

    /**
     * {@inheritDoc}
     */
    @Override
    public List list() {
        return get(Flavors.class, uri("/flavors")).execute().getList();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Flavor get(String id) {
        return get(TroveInstanceFlavor.class, uri("/flavors/%s", id)).execute();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy