public Snapshot getResult() { String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion.get(); Snapshot snapshot = new Snapshot(region, id, volumeId, volumeSize, status, startTime, progress, ownerId, description, ownerAlias); this.id = null; this.volumeId = null; this.volumeSize = 0; this.status = null; this.startTime = null; this.progress = 0; this.ownerId = null; this.description = null; this.ownerAlias = null; return snapshot; }
public Snapshot getResult() { String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion.get(); Snapshot snapshot = new Snapshot(region, id, volumeId, volumeSize, status, startTime, progress, ownerId, description, ownerAlias); this.id = null; this.volumeId = null; this.volumeSize = 0; this.status = null; this.startTime = null; this.progress = 0; this.ownerId = null; this.description = null; this.ownerAlias = null; return snapshot; }
public Snapshot getResult() { String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion.get(); Snapshot snapshot = new Snapshot(region, id, volumeId, volumeSize, status, startTime, progress, ownerId, description, ownerAlias); this.id = null; this.volumeId = null; this.volumeSize = 0; this.status = null; this.startTime = null; this.progress = 0; this.ownerId = null; this.description = null; this.ownerAlias = null; return snapshot; }
public Snapshot getResult() { String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion.get(); Snapshot snapshot = new Snapshot(region, id, volumeId, volumeSize, status, startTime, progress, ownerId, description, ownerAlias); this.id = null; this.volumeId = null; this.volumeSize = 0; this.status = null; this.startTime = null; this.progress = 0; this.ownerId = null; this.description = null; this.ownerAlias = null; return snapshot; }
public Snapshot getResult() { String region = AWSUtils.findRegionInArgsOrNull(getRequest()); if (region == null) region = defaultRegion.get(); Snapshot snapshot = new Snapshot(region, id, volumeId, volumeSize, status, startTime, progress, ownerId, description, ownerAlias); this.id = null; this.volumeId = null; this.volumeSize = 0; this.status = null; this.startTime = null; this.progress = 0; this.ownerId = null; this.description = null; this.ownerAlias = null; return snapshot; }
public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); InputStream is = getClass().getResourceAsStream("/describe_snapshots.xml"); Set<Snapshot> expected = Sets.newLinkedHashSet(); expected.add(new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10, Snapshot.Status.PENDING, dateService.iso8601DateParse("2008-05-07T12:51:50.000Z"), 80, "218213537122", "Daily Backup", null)); DescribeSnapshotsResponseHandler handler = injector .getInstance(DescribeSnapshotsResponseHandler.class); addDefaultRegionToHandler(handler); Set<Snapshot> result = factory.create(handler).parse(is); assertEquals(result, expected); }
public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); InputStream is = getClass().getResourceAsStream("/created_snapshot.xml"); Snapshot expected = new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10, Snapshot.Status.PENDING, dateService.iso8601DateParse("2008-05-07T12:51:50.000Z"), 60, "213457642086", "Daily Backup", null); SnapshotHandler handler = injector.getInstance(SnapshotHandler.class); addDefaultRegionToHandler(handler); Snapshot result = factory.create(handler).parse(is); assertEquals(result, expected); }
public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); InputStream is = getClass().getResourceAsStream("/describe_snapshots.xml"); Set<Snapshot> expected = Sets.newLinkedHashSet(); expected.add(new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10, Snapshot.Status.PENDING, dateService.iso8601DateParse("2008-05-07T12:51:50.000Z"), 80, "218213537122", "Daily Backup", null)); DescribeSnapshotsResponseHandler handler = injector .getInstance(DescribeSnapshotsResponseHandler.class); addDefaultRegionToHandler(handler); Set<Snapshot> result = factory.create(handler).parse(is); assertEquals(result, expected); }
public void testApplyInputStream() { DateService dateService = injector.getInstance(DateService.class); InputStream is = getClass().getResourceAsStream("/created_snapshot.xml"); Snapshot expected = new Snapshot(defaultRegion, "snap-78a54011", "vol-4d826724", 10, Snapshot.Status.PENDING, dateService.iso8601DateParse("2008-05-07T12:51:50.000Z"), 60, "213457642086", "Daily Backup", null); SnapshotHandler handler = injector.getInstance(SnapshotHandler.class); addDefaultRegionToHandler(handler); Snapshot result = factory.create(handler).parse(is); assertEquals(result, expected); }