}
public void testCreateUpdateAndDeleteNetwork() {
for (String zone : api.getConfiguredZones()) {
NetworkApi networkApi = api.getNetworkApiForZone(zone);
Network net = networkApi.create(CreateNetworkOptions.builder().name("jclouds-test").networkType(NetworkType.LOCAL).build());
Network test = networkApi.create();
assertNotNull(net);
Network network = networkApi.get(net.getId());
assertEquals(network.getId(), net.getId());
assertEquals(network.getName(), "jclouds-test");
assertEquals(network.getNetworkType(), NetworkType.LOCAL);
assertTrue(network.getSubnets().isEmpty());
assertTrue(networkApi.update(net.getId(), UpdateNetworkOptions.builder().name("jclouds-live-test").build()));
network = networkApi.get(net.getId());
assertEquals(network.getId(), net.getId());
assertEquals(network.getName(), "jclouds-live-test");
assertTrue(network.getSubnets().isEmpty());
Network net2 = networkApi.create(CreateNetworkOptions.builder().name("jclouds-test2").networkType(NetworkType.LOCAL).build());
assertNotNull(net2);
assertTrue(networkApi.delete(net.getId()));
assertTrue(networkApi.delete(net2.getId()));
assertTrue(networkApi.delete(test.getId()));
}
}