@Test public void testCreateServer() throws Exception { ServerInfo serverInfo = new ServerInfo.Builder() .name("New Server") .memory(new BigInteger("5368709120")) .cpu(3000) .vncPassword("new_password") .drives(ImmutableList.of(api.listDrives().concat().get(0).toServerDrive(1, "0:1", DeviceEmulationType.IDE))) .build(); createdServer = api.createServer(serverInfo); checkServer(serverInfo, createdServer); }
.uuid("ae78e68c-9daa-4471-8878-0bb87fa80260") .resourceUri(new URI("/api/2.0/drives/ae78e68c-9daa-4471-8878-0bb87fa80260/")) .build().toServerDrive(0, "0:0", DeviceEmulationType.IDE), new Drive.Builder() .uuid("22826af4-d6c8-4d39-bd41-9cea86df2976") .resourceUri(new URI("/api/2.0/drives/22826af4-d6c8-4d39-bd41-9cea86df2976/")) .build().toServerDrive(1, "0:0", DeviceEmulationType.VIRTIO))) .nics(ImmutableList.of(new NIC.Builder() .ipV4Configuration(new IPConfiguration.Builder()