use of com.att.cdp.zones.SnapshotService in project AJSC by att.
the class TestOpenStackContext method testLoginLogout.
/**
* Test that we can login and out of the provider, and access the services once logged in (so we dont have to
* repeatedly login/out)
*
* @throws ZoneException
*/
@Test
@Ignore
public void testLoginLogout() throws ZoneException {
OpenStackContext context = login();
/*
* make sure we can retreive all of the services
*/
ComputeService computeService = context.getComputeService();
assertNotNull(computeService);
IdentityService identityService = context.getIdentityService();
assertNotNull(identityService);
ImageService imageService = context.getImageService();
assertNotNull(imageService);
NetworkService networkService = context.getNetworkService();
assertNotNull(networkService);
VolumeService volumeService = context.getVolumeService();
assertNotNull(volumeService);
SnapshotService snapshotService = context.getSnapshotService();
assertNotNull(snapshotService);
StackService stackService = context.getStackService();
assertNotNull(stackService);
/*
* Services are locally cached by the provider context. If we get them again, we should get the same exact
* object. Check that too.
*/
assertTrue(computeService == context.getComputeService());
assertTrue(identityService == context.getIdentityService());
assertTrue(imageService == context.getImageService());
assertTrue(networkService == context.getNetworkService());
assertTrue(volumeService == context.getVolumeService());
assertTrue(snapshotService == context.getSnapshotService());
assertTrue(stackService == context.getStackService());
/*
* Test that we can also obtain the connectors
*/
GlanceConnector glanceConnector = context.getGlanceConnector();
assertNotNull(glanceConnector);
NovaConnector novaConnector = context.getNovaConnector();
assertNotNull(novaConnector);
QuantumConnector quantumConnector = context.getQuantumConnector();
assertNotNull(quantumConnector);
/*
* Connectors are locally cached, check that
*/
assertTrue(glanceConnector == context.getGlanceConnector());
assertTrue(novaConnector == context.getNovaConnector());
assertTrue(quantumConnector == context.getQuantumConnector());
/*
* Now, check that we can obtain the tenant as well
*/
Tenant tenant = context.getTenant();
assertNotNull(tenant);
assertEquals(tenant.getName(), context.getTenantName());
assertEquals(tenant.getId(), context.getTenantId());
logout(context);
}
use of com.att.cdp.zones.SnapshotService in project AJSC by att.
the class TestSnapshotService method DeleteSnapshot.
@Test
@Ignore
public void DeleteSnapshot() throws ZoneException {
Context context = connect();
String id = "9128-20ffac0c7ccc";
SnapshotService service = context.getSnapshotService();
service.destroySnapshot(id);
}
use of com.att.cdp.zones.SnapshotService in project AJSC by att.
the class TestSnapshotService method testSnapshots.
/**
* @throws ZoneException
*/
@Test
@Ignore
public void testSnapshots() throws ZoneException {
Context context = connect();
SnapshotService service = context.getSnapshotService();
List<Snapshot> snapshots = service.getSnapshots();
assertNotNull(snapshots);
for (Snapshot snapshot : snapshots) {
assertNotNull(service.getSnapshot(snapshot.getId()));
assertNotNull(service.getSnapshots(snapshot.getName()));
}
}
use of com.att.cdp.zones.SnapshotService in project AJSC by att.
the class TestSnapshotService method CreateSnapshot.
@Test
@Ignore
public void CreateSnapshot() throws ZoneException {
Context context = connect();
Snapshot temp = new Snapshot();
temp.setName("Snapshots");
temp.setDescription("Test");
temp.setVolumeId("42d6-8a23-f357bf767f61");
SnapshotService service = context.getSnapshotService();
Snapshot snap = service.createSnapshot(temp);
assertNotNull(snap);
}
use of com.att.cdp.zones.SnapshotService in project AJSC by att.
the class TestSnapshotService method testSnapshot.
@Test(expected = Exception.class)
@Ignore
public void testSnapshot() throws ZoneException {
Context context = connect();
SnapshotService service = context.getSnapshotService();
List<Snapshot> snapshots = service.getSnapshots();
service.getSnapshot("Test");
;
service.getSnapshots("Test");
}
Aggregations