find latest image using filename convention
AbandonedPublic

Authored by lbrabec on Aug 25 2015, 12:26 PM.

Details

Summary

New function that searches /var/lib/testcloud/cache for the most
recent image using filename convention <date>-<release>-<template>.qcow2

Test Plan

new tests written
py.test test/

Diff Detail

Repository
rTCLOUD testcloud
Branch
feature/T575
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 124
Build 124: arc lint + arc unit
lbrabec retitled this revision from to find latest image using filename convention.Aug 25 2015, 12:26 PM
lbrabec updated this object.
lbrabec edited the test plan for this revision. (Show Details)
lbrabec added reviewers: roshi, jskladan, kparal, tflink.
tflink requested changes to this revision.Aug 25 2015, 4:02 PM

When I wrote T575, i had intended the code to go into libtaskotron instead of testcloud because I don't think this naming scheme makes sense for testcloud - it's designed to grab the official cloud images, not stuff that we're generating for Taskotron.

Unless @roshi disagrees with me, please move this code to libtaskotron

testcloud/image.py
50

please use more descriptive variables - we're not being charged per character

63

not sure we want to be returning just the name here if the code stays in testcloud - behavior should be similar to find_image

This revision now requires changes to proceed.Aug 25 2015, 4:02 PM

I agree this should go into libtaskotron. I think we should also store the images in our own directories, not in testcloud directories. Then we would just tell testcloud "please run this image: /path/to/image".

testcloud/image.py
48

I'd prefer a timestamp scheme which allows us to build several images in a single day - let's say when there's a security patch, or we just need to fix some bug. ISO8601? Or something shorter?

lbrabec abandoned this revision.Oct 12 2015, 8:02 AM

This is no longer valid, I will provide another diff.