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

udiator.sword.examples.0.1.0.source-code.CreateVirtualMachineExample Maven / Gradle / Ivy

The newest version!
import de.uniulm.omi.cloudiator.sword.api.domain.HardwareFlavor;
import de.uniulm.omi.cloudiator.sword.api.domain.Image;
import de.uniulm.omi.cloudiator.sword.api.domain.Location;
import de.uniulm.omi.cloudiator.sword.api.domain.VirtualMachine;
import de.uniulm.omi.cloudiator.sword.api.service.ComputeService;

import java.util.function.Supplier;

/**
 * An example showing the steps needed to create a virtual machine
 * using the compute service.
 */
public class CreateVirtualMachineExample implements Supplier {

    private final ComputeService computeService;

    public CreateVirtualMachineExample(
        ComputeService computeService) {
        this.computeService = computeService;
    }

    @Override public VirtualMachine get() {
        //todo fix example
        return computeService.createVirtualMachine(null);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy