You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ docker run -e VAULT_ADDR=$VAULT_ADDR -v $(pwd)/aomi:/aomi -v $(pwd)/.vault-token:/.vault-token autodesk/aomi:1.6.1 diff --secretfile /aomi/Secretfile --policies /aomi/policies --verbose
Connecting to http://10.0.0.1:8200
Token derived from /.vault-token
Unexpected error: exceptions.KeyError
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/aomi-1.6.1-py2.7.egg/aomi/cli.py", line 439, in main
action_runner(parser, args)
File "/usr/local/lib/python2.7/site-packages/aomi-1.6.1-py2.7.egg/aomi/cli.py", line 414, in action_runner
aomi.seed_action.diff(client.connect(args), args)
File "/usr/local/lib/python2.7/site-packages/aomi-1.6.1-py2.7.egg/aomi/seed_action.py", line 117, in diff
ctx = Context.load(get_secretfile(opt), opt) \
File "/usr/local/lib/python2.7/site-packages/aomi-1.6.1-py2.7.egg/aomi/model/context.py", line 124, in load
ctx.add(mod(resource, opt))
File "/usr/local/lib/python2.7/site-packages/aomi-1.6.1-py2.7.egg/aomi/model/auth.py", line 185, in __init__
'policies': ','.join(obj['policies'])
KeyError: 'policies'
The error happens in AppRole.__init__. I'm not sure what's the correct way to fix it (if it has to be fixed at all), but seems like Policy.__init__ had the same issue and now it inits other fields only if self.present. Perhaps the same could be done in AppRole.__init__ right before role_obj is created.
aomi requires AppRole's
policiesto be defined even if itsstateisabsent:Error:
The error happens in
AppRole.__init__. I'm not sure what's the correct way to fix it (if it has to be fixed at all), but seems likePolicy.__init__had the same issue and now it inits other fields only ifself.present. Perhaps the same could be done inAppRole.__init__right beforerole_objis created.