Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias FunctionDef arguments args NameParam defaults NameLoad body Expr Yield NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str Str Str Str Str attr NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str keyword NameLoad attr Call NameLoad Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str attr Call NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr TupleLoad Str Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str Str Str Str attr NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str Str Str Str attr NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Str Str ListLoad Str Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Str Str ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str ListLoad Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr TupleLoad Str Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Num attr Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Num attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad Str Str NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str attr NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword Str attr Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A contextlib N/A tarfile N/A eventlet N/A six nova.image glance nova test nova.virt.xenapi.client session xenapi_session nova.virt.xenapi.image vdi_through_dev fake_context N/A N/A result N/A None N/A N/A N/A result N/A N/A contextlib contextmanager TestDelegatingToCommand N/A N/A test NoDBTestCase N/A test_upload_image_is_delegated_to_command N/A N/A self N/A N/A N/A command N/A N/A N/A self mox CreateMock N/A vdi_through_dev UploadToGlanceAsRawTgz N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev UploadToGlanceAsRawTgz N/A N/A N/A N/A N/A vdi_through_dev UploadToGlanceAsRawTgz ctx session instance image_id vdis AndReturn command N/A N/A N/A N/A N/A command upload_image AndReturn result N/A N/A N/A N/A self mox ReplayAll N/A store N/A N/A vdi_through_dev VdiThroughDevStore N/A result N/A N/A store upload_image ctx session instance image_id vdis N/A N/A N/A self assertEqual result result N/A N/A TestUploadToGlanceAsRawTgz N/A N/A test NoDBTestCase N/A test_upload_image N/A N/A self N/A N/A N/A store N/A N/A vdi_through_dev UploadToGlanceAsRawTgz context session instance id N/A vdi0 vdi1 N/A N/A N/A N/A self mox StubOutWithMock store _perform_upload N/A N/A N/A N/A self mox StubOutWithMock store _get_vdi_ref N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev glance N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev vm_utils N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev utils N/A N/A N/A N/A N/A store _get_vdi_ref AndReturn vdi_ref N/A N/A N/A N/A N/A N/A vdi_through_dev vm_utils vdi_attached_here session vdi_ref read_only True AndReturn N/A fake_context dev N/A N/A N/A N/A N/A N/A vdi_through_dev utils make_dev_path dev AndReturn devpath N/A N/A N/A N/A N/A N/A vdi_through_dev utils temporary_chown devpath AndReturn N/A fake_context N/A N/A N/A store _perform_upload devpath N/A N/A N/A N/A self mox ReplayAll N/A N/A N/A store upload_image N/A test__perform_upload N/A N/A self N/A N/A N/A producer N/A N/A N/A self mox CreateMock N/A vdi_through_dev TarGzProducer N/A consumer N/A N/A N/A self mox CreateMock N/A glance UpdateGlanceImage N/A pool N/A N/A N/A self mox CreateMock N/A eventlet GreenPool N/A store N/A N/A vdi_through_dev UploadToGlanceAsRawTgz context session instance id N/A vdi0 vdi1 N/A N/A N/A N/A self mox StubOutWithMock store _create_pipe N/A N/A N/A N/A self mox StubOutWithMock store _get_virtual_size N/A N/A N/A N/A self mox StubOutWithMock producer get_metadata N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev TarGzProducer N/A N/A N/A N/A self mox StubOutWithMock glance UpdateGlanceImage N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev eventlet N/A N/A N/A N/A N/A producer get_metadata AndReturn metadata N/A N/A N/A N/A N/A store _get_virtual_size AndReturn 324 N/A N/A N/A N/A N/A store _create_pipe AndReturn N/A readfile writefile N/A N/A N/A N/A N/A vdi_through_dev TarGzProducer devpath writefile 324 disk.raw AndReturn producer N/A N/A N/A N/A N/A glance UpdateGlanceImage context id metadata readfile AndReturn consumer N/A N/A N/A N/A N/A N/A vdi_through_dev eventlet GreenPool AndReturn pool N/A N/A N/A pool spawn N/A producer start N/A N/A N/A pool spawn N/A consumer start N/A N/A N/A pool waitall N/A N/A N/A N/A self mox ReplayAll N/A N/A N/A store _perform_upload devpath N/A test__get_vdi_ref N/A N/A self N/A N/A N/A session N/A N/A N/A self mox CreateMock N/A xenapi_session XenAPISession N/A store N/A N/A vdi_through_dev UploadToGlanceAsRawTgz context session instance id N/A vdi0 vdi1 N/A N/A N/A N/A N/A session call_xenapi VDI.get_by_uuid vdi0 AndReturn vdi_ref N/A N/A N/A N/A self mox ReplayAll N/A N/A N/A self assertEqual vdi_ref N/A N/A store _get_vdi_ref N/A test__get_virtual_size N/A N/A self N/A N/A N/A session N/A N/A N/A self mox CreateMock N/A xenapi_session XenAPISession N/A store N/A N/A vdi_through_dev UploadToGlanceAsRawTgz context session instance id N/A vdi0 vdi1 N/A N/A N/A N/A self mox StubOutWithMock store _get_vdi_ref N/A N/A N/A N/A N/A store _get_vdi_ref AndReturn vdi_ref N/A N/A N/A session call_xenapi VDI.get_virtual_size vdi_ref N/A N/A N/A N/A self mox ReplayAll N/A N/A N/A store _get_virtual_size N/A test__create_pipe N/A N/A self N/A N/A N/A store N/A N/A vdi_through_dev UploadToGlanceAsRawTgz context session instance id N/A vdi0 vdi1 N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev os N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev greenio N/A N/A N/A N/A N/A N/A vdi_through_dev os pipe AndReturn N/A rpipe wpipe N/A N/A N/A N/A N/A N/A vdi_through_dev greenio GreenPipe rpipe rb 0 AndReturn rfile N/A N/A N/A N/A N/A N/A vdi_through_dev greenio GreenPipe wpipe wb 0 AndReturn wfile N/A N/A N/A N/A self mox ReplayAll N/A result N/A N/A store _create_pipe N/A N/A N/A self assertEqual N/A rfile wfile result N/A N/A TestTarGzProducer N/A N/A test NoDBTestCase N/A test_constructor N/A N/A self N/A N/A N/A producer N/A N/A vdi_through_dev TarGzProducer devpath writefile 100 fname N/A N/A N/A self assertEqual devpath N/A producer fpath N/A N/A N/A self assertEqual writefile N/A producer output N/A N/A N/A self assertEqual 100 N/A producer size N/A N/A N/A self assertEqual writefile N/A producer output N/A test_start N/A N/A self N/A N/A N/A outf N/A N/A six StringIO N/A producer N/A N/A vdi_through_dev TarGzProducer fpath outf 100 fname N/A tfile N/A N/A N/A self mox CreateMock N/A tarfile TarFile N/A tinfo N/A N/A N/A self mox CreateMock N/A tarfile TarInfo N/A inf N/A N/A N/A self mox CreateMock open N/A N/A N/A N/A self mox StubOutWithMock vdi_through_dev tarfile N/A N/A N/A N/A self mox StubOutWithMock producer _open_file N/A N/A N/A N/A N/A N/A vdi_through_dev tarfile TarInfo name fname AndReturn tinfo N/A N/A N/A N/A N/A N/A vdi_through_dev tarfile open fileobj outf mode w|gz AndReturn N/A fake_context tfile N/A N/A N/A N/A N/A producer _open_file fpath rb AndReturn N/A fake_context inf N/A N/A N/A tfile addfile tinfo fileobj inf N/A N/A N/A outf close N/A N/A N/A N/A self mox ReplayAll N/A N/A N/A producer start N/A N/A N/A self assertEqual 100 N/A tinfo size N/A test_get_metadata N/A N/A self N/A N/A N/A producer N/A N/A vdi_through_dev TarGzProducer devpath writefile 100 fname N/A N/A N/A self assertEqual N/A disk_format container_format raw tgz N/A N/A producer get_metadata N/A N/A