"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zun/tests/policy_fixture.py" between
zun-6.0.0.tar.gz and zun-7.0.0.tar.gz

About: OpenStack Zun is a Container Management service for OpenStack.
The "Wallaby" series (latest release).

policy_fixture.py  (zun-6.0.0):policy_fixture.py  (zun-7.0.0)
skipping to change at line 25 skipping to change at line 25
from oslo_policy import opts as policy_opts from oslo_policy import opts as policy_opts
from zun.common import policy as zun_policy from zun.common import policy as zun_policy
import zun.conf import zun.conf
CONF = zun.conf.CONF CONF = zun.conf.CONF
class PolicyFixture(fixtures.Fixture): class PolicyFixture(fixtures.Fixture):
def _setUp(self): def _setUp(self):
CONF(args=[], project='zun')
policy_opts.set_defaults(CONF) policy_opts.set_defaults(CONF)
zun_policy._ENFORCER = None zun_policy._ENFORCER = None
self.addCleanup(zun_policy.init().clear) self.addCleanup(zun_policy.init().clear)
def set_rules(self, rules): def set_rules(self, rules):
policy = zun_policy._ENFORCER policy = zun_policy._ENFORCER
policy.set_rules({k: _parser.parse_rule(v) policy.set_rules({k: _parser.parse_rule(v)
for k, v in rules.items()}) for k, v in rules.items()})
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)