Example #1
0
 def setUp(self):
     super(DirectTestCase, self).setUp()
     direct.register_service('fake', FakeService())
     self.router = direct.PostParamsMiddleware(
         direct.JsonParamsMiddleware(direct.Router()))
     self.auth_router = direct.DelegatedAuthMiddleware(self.router)
     self.context = context.RequestContext('user1', 'proj1')
Example #2
0
 def setUp(self):
     super(DirectCloudTestCase, self).setUp()
     compute_handle = compute.API(network_api=self.cloud.network_api,
                                  volume_api=self.cloud.volume_api)
     direct.register_service('compute', compute_handle)
     self.router = direct.JsonParamsMiddleware(direct.Router())
     proxy = direct.Proxy(self.router)
     self.cloud.compute_api = proxy.compute
Example #3
0
    def setUp(self):
        super(DirectCloudTestCase, self).setUp()
        compute_handle = compute.API(image_service=self.cloud.image_service)
        volume_handle = volume.API()
        network_handle = network.API()
        direct.register_service('compute', compute_handle)
        direct.register_service('volume', volume_handle)
        direct.register_service('network', network_handle)

        self.router = direct.JsonParamsMiddleware(direct.Router())
        proxy = direct.Proxy(self.router)
        self.cloud.compute_api = proxy.compute
        self.cloud.volume_api = proxy.volume
        self.cloud.network_api = proxy.network
        compute_handle.volume_api = proxy.volume
        compute_handle.network_api = proxy.network