I ran into the same issue. The problem appears to be in:
keystone/cmd/cli.py
This block of code:
rules = MappingEngineTester.read_rules(CONF.command.rules) rules = MappingEngineTester.normalize_rules(rules) mapping_engine.validate_mapping_structure(rules)
assertion = MappingEngineTester.read_file(CONF.command.input) assertion = MappingEngineTester.normalize_assertion(assertion) rp = mapping_engine.RuleProcessor(rules['rules']) print(jsonutils.dumps(rp.process(assertion), indent=2))
I was able to get it working with this change to the 2nd to last line:
assertion = MappingEngineTester.read_file(CONF.command.input) assertion = MappingEngineTester.normalize_assertion(assertion) rp = mapping_engine.RuleProcessor(assertion, rules['rules']) # Passing the assertion too print(jsonutils.dumps(rp.process(assertion), indent=2))
I don't know if this is the 'correct' fix, but this is what got it working for me.
I ran into the same issue. The problem appears to be in:
keystone/cmd/cli.py
This block of code:
rules = MappingEngineTe ster.read_ rules(CONF. command. rules) ster.normalize_ rules(rules)
mapping_ engine. validate_ mapping_ structure( rules)
rules = MappingEngineTe
assertion = MappingEngineTe ster.read_ file(CONF. command. input) ster.normalize_ assertion( assertion) engine. RuleProcessor( rules[' rules'] )
print( jsonutils. dumps(rp. process( assertion) , indent=2))
assertion = MappingEngineTe
rp = mapping_
I was able to get it working with this change to the 2nd to last line:
rules = MappingEngineTe ster.read_ rules(CONF. command. rules) ster.normalize_ rules(rules)
mapping_ engine. validate_ mapping_ structure( rules)
rules = MappingEngineTe
assertion = MappingEngineTe ster.read_ file(CONF. command. input) ster.normalize_ assertion( assertion) engine. RuleProcessor( assertion, rules['rules']) # Passing the assertion too
print( jsonutils. dumps(rp. process( assertion) , indent=2))
assertion = MappingEngineTe
rp = mapping_
I don't know if this is the 'correct' fix, but this is what got it working for me.