0

I’m trying to come up with a keystone extension that provides dependency injections as described in the keystone docs (and other extensions) but when i try to access the dependency’s functions in my controller, i get an “AttributeError: ‘MyExtControllerV3′ object has no attribute ‘myext_api’”

In my core.py file, i have :-

@dependency.provider(‘myext_api’)
class Manager(manager.Manager):

in controllers.py:-

@dependency.requires(‘myext_api’)
class MyExtControllerV3(controller.V3Controller):

Any pointers?

mrmoje
  • 3,714
  • 3
  • 20
  • 18

1 Answers1

0

Is your manager being loaded anywhere in the code? I think this is due to the fact that you are not loading your Manager anywhere, and the dependencies are nor being registered (maybe something similar to this bug, but I'm not sure: https://bugs.launchpad.net/keystone/+bug/1275695)

Alvaro
  • 2,227
  • 1
  • 14
  • 11