#NEWLINE# @ classmethod #NEWLINE# def _make_image_fixtures( cls ) : #NEWLINE# #INDENT# image_id = 123 #NEWLINE# base_attrs = { #NEWLINE# #INDENT# 'created_at' : cls . NOW_GLANCE_FORMAT , #NEWLINE# 'updated_at' : cls . NOW_GLANCE_FORMAT , #NEWLINE# 'deleted_at' : None , #NEWLINE# 'deleted' : False , #NEWLINE# #UNINDENT# } #NEWLINE# fixtures = [ ] #NEWLINE# def add_fixture( **kwargs ) : #NEWLINE# #INDENT# kwargs . update ( base_attrs ) #NEWLINE# fixtures . append ( kwargs ) #NEWLINE# #UNINDENT# add_fixture ( id = image_id , name = 'public image' , is_public = True , status = 'active' , properties = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# image_id += 1 #NEWLINE# server_ref = 'http://localhost/v1.1/servers/42' #NEWLINE# snapshot_properties = { #NEWLINE# #INDENT# 'instance_ref' : server_ref , #NEWLINE# 'user_id' : 'fake' , #NEWLINE# #UNINDENT# } #NEWLINE# statuses = ( 'queued' , 'saving' , 'active' , 'killed' , 'deleted' , 'pending_delete' ) #NEWLINE# for status in statuses : #NEWLINE# #INDENT# add_fixture ( id = image_id , name = ( '%s snapshot' % status ) , is_public = False , status = status , properties = snapshot_properties ) #NEWLINE# image_id += 1 #NEWLINE# #UNINDENT# other_snapshot_properties = { #NEWLINE# #INDENT# 'instance_id' : '43' , #NEWLINE# 'user_id' : 'other' , #NEWLINE# #UNINDENT# } #NEWLINE# add_fixture ( id = image_id , name = 'someone elses snapshot' , is_public = False , status = 'active' , properties = other_snapshot_properties ) #NEWLINE# image_id += 1 #NEWLINE# add_fixture ( id = image_id , is_public = True , status = 'active' , properties = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# image_id += 1 #NEWLINE# return fixtures