Esempio n. 1
0
 def __init__(self):
     self.image_service = s3.S3ImageService()
     self.network_api = network.API()
     self.volume_api = volume.API()
     self.compute_api = compute.API(network_api=self.network_api,
                                    volume_api=self.volume_api,
                                    hostname_factory=ec2utils.id_to_ec2_id)
     self.setup()
Esempio n. 2
0
    def setUp(self):
        super(TestS3ImageService, self).setUp()
        self.flags(image_service='nova.image.fake.FakeImageService')
        self.image_service = s3.S3ImageService()
        self.context = context.RequestContext(None, None)

        # set up one fixture to test shows, should have id '1'
        nova.db.api.s3_image_create(self.context,
                                    '155d900f-4e14-4e4c-a73d-069cbf4541e6')
Esempio n. 3
0
    def setUp(self):
        super(TestS3ImageService, self).setUp()
        self.context = context.RequestContext(None, None)
        self.useFixture(fixtures.FakeLogger('boto'))

        # set up one fixture to test shows, should have id '1'
        nova.db.api.s3_image_create(self.context,
                                    '155d900f-4e14-4e4c-a73d-069cbf4541e6')

        fake.stub_out_image_service(self.stubs)
        self.image_service = s3.S3ImageService()
Esempio n. 4
0
    def setUp(self):
        super(TestS3ImageService, self).setUp()
        self.context = context.RequestContext(None, None)
        self.useFixture(fixtures.FakeLogger('boto'))

        # set up 3 fixtures to test shows, should have id '1', '2', and '3'
        db.s3_image_create(self.context,
                           '155d900f-4e14-4e4c-a73d-069cbf4541e6')
        db.s3_image_create(self.context,
                           'a2459075-d96c-40d5-893e-577ff92e721c')
        db.s3_image_create(self.context,
                           '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6')

        fake.stub_out_image_service(self.stubs)
        self.image_service = s3.S3ImageService()
        ec2utils.reset_cache()
Esempio n. 5
0
 def setUp(self):
     super(TestS3ImageService, self).setUp()
     self.flags(image_service='nova.image.fake.FakeImageService')
     self.image_service = s3.S3ImageService()
     self.context = context.RequestContext(None, None)
Esempio n. 6
0
 def setUp(self):
     super(TestS3ImageService, self).setUp()
     self.orig_image_service = FLAGS.image_service
     FLAGS.image_service = 'nova.image.fake.FakeImageService'
     self.image_service = s3.S3ImageService()
     self.context = context.RequestContext(None, None)