<s> from vt_manager . communication . sfa . rspecs . elements . element import Element <EOL> from vt_manager . communication . sfa . rspecs . elements . disk_image import DiskImage <EOL> class PGv2DiskImage : <EOL> @ staticmethod <EOL> def add_images ( xml , images ) : <EOL> if not images : <EOL> return <EOL> if not isinstance ( images , list ) : <EOL> images = [ images ] <EOL> for image in images : <EOL> xml . add_instance ( '<STR_LIT>' , image , DiskImage . fields ) <EOL> @ staticmethod <EOL> def get_images ( xml , filter = { } ) : <EOL> xpath = '<STR_LIT>' <EOL> image_elems = xml . xpath ( xpath ) <EOL> images = [ ] <EOL> for image_elem in image_elems : <EOL> image = DiskImage ( image_elem . attrib , image_elem ) <EOL> images . append ( image ) <EOL> return images </s>
