org.openstack4j.openstack.compute.internal.ext.MigrationServiceImpl Maven / Gradle / Ivy
package org.openstack4j.openstack.compute.internal.ext;
import java.util.List;
import org.openstack4j.api.compute.ext.MigrationService;
import org.openstack4j.model.compute.ext.Migration;
import org.openstack4j.model.compute.ext.MigrationsFilter;
import org.openstack4j.openstack.compute.domain.ext.ExtMigration.Migrations;
import org.openstack4j.openstack.compute.internal.BaseComputeServices;
/**
* API which supports the "os-migrations" extension.
*
* @author Jeremy Unruh
*/
public class MigrationServiceImpl extends BaseComputeServices implements MigrationService {
/**
* {@inheritDoc}
*/
@Override
public List extends Migration> list() {
return list(null);
}
/**
* {@inheritDoc}
*/
@Override
public List extends Migration> list(MigrationsFilter filter) {
Invocation inv = get(Migrations.class, uri("/os-migrations"));
if (filter != null) {
inv.params(filter.getConstraints());
}
return inv.execute().getList();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy