use of com.att.cdp.zones.ComputeService in project AJSC by att.
the class TestComputeService method testHardRebootService.
@Ignore
public void testHardRebootService() throws ZoneException {
Context context = connect();
ComputeService compute = context.getComputeService();
// NetworkService network = context.getNetworkService();
List<Server> servers = compute.getServers();
Server server = servers.get(0);
compute.rebootServer(server, "HARD");
assertTrue(server.getStatus().equals("HARD_REBOOT"));
}
use of com.att.cdp.zones.ComputeService in project AJSC by att.
the class TestComputeService method testSoftRebootService.
@Ignore
public void testSoftRebootService() throws ZoneException {
Context context = connect();
ComputeService compute = context.getComputeService();
// NetworkService network = context.getNetworkService();
List<Server> servers = compute.getServers();
Server server = servers.get(0);
compute.rebootServer(server, "SOFT");
assertTrue(server.getStatus().equals("REBOOT"));
}
use of com.att.cdp.zones.ComputeService 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.ComputeService 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.ComputeService 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());
}
}
Aggregations