use of com.att.cdp.zones.Context in project AJSC by att.
the class TestNetworkService method testCreateAndDeletePort.
/**
* Tests that we can create and delete a port
*
* @throws ZoneException
* If the test cannot connect to the provider
*/
@Test
@Ignore
public void testCreateAndDeletePort() throws ZoneException {
Context context = connect();
NetworkService service = context.getNetworkService();
List<Subnet> subnets = service.getSubnets();
assertNotNull(subnets);
assertFalse(subnets.isEmpty());
Subnet subnet = subnets.get(0);
Port port = service.createPort(subnet);
assertNotNull(port);
assertEquals(port.getSubnetId(), subnet.getId());
assertNotNull(port.getMacAddr());
assertNotNull(port.getId());
assertNotNull(port.getNetwork());
service.deletePort(port);
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class TestComputeService method testServerGetHypervisor.
/**
* This test case is designed to test geting the hypervisor for a sever.
*
* @throws ZoneException
* If something goes horribly wrong
*/
@SuppressWarnings("nls")
@Ignore
@Test
public void testServerGetHypervisor() throws ZoneException {
Context context = connect();
ComputeService computeService = context.getComputeService();
List<Server> servers = computeService.getServers();
for (Server server : servers) {
System.out.println(server.toString());
if (server.getHypervisor() != null) {
System.out.println(server.getHypervisor().toString());
}
}
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class TestComputeService method testListServers.
/**
* This test case is designed to simply list the existing servers.
*
* @throws ZoneException
* If something goes horribly wrong
*/
@SuppressWarnings("nls")
@Ignore
@Test
public void testListServers() throws ZoneException {
Context context = connect();
ComputeService computeService = context.getComputeService();
List<Server> servers = computeService.getServers();
for (Server server : servers) {
System.out.println(server.toString());
if (server.getImage() == null) {
// Map<String, String> attachments = server.getAttachments();
Map<String, Volume> attachments = server.getVolumes();
System.out.println("+++No image, volume attachments are: " + attachments.toString());
}
}
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class TestComputeService method testListHypervisors.
/**
* This test case is designed to simply list the existing hypervisors.
*
* @throws ZoneException
* If something goes horribly wrong
*/
@SuppressWarnings("nls")
@Ignore
@Test
public void testListHypervisors() throws ZoneException {
Context context = connect();
ComputeService computeService = context.getComputeService();
List<Hypervisor> hypervisors = computeService.getHypervisors();
for (Hypervisor hypervisor : hypervisors) {
System.out.println(hypervisor.toString());
}
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class TestImages method listImages.
/**
* Verifies that we can list the existing templates on a provider. This test requires that the provider actually has
* templates installed.
*
* @throws ZoneException
*/
@Ignore
@Test
public void listImages() throws ZoneException {
Context context = connect();
ImageService service = context.getImageService();
List<Image> images = service.listImages();
assertNotNull(images);
assertFalse(images.isEmpty());
for (Image image : images) {
System.out.println(image.toString());
}
}
Aggregations