"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "neutron/policy.py" between
neutron-14.0.2.tar.gz and neutron-14.0.3.tar.gz

About: OpenStack Neutron (Core Service: Networking) enables network connectivity as a service for other OpenStack services, such as OpenStack Compute. Provides an API for users to define networks and the attachments into them. Has a pluggable architecture that supports many popular networking vendors and technologies.
The "Stein" series (maintained release).

policy.py  (neutron-14.0.2):policy.py  (neutron-14.0.3)
skipping to change at line 368 skipping to change at line 368
# to treat it in "special" way as it may be used for resources other # to treat it in "special" way as it may be used for resources other
# than network, e.g. for port or subnet # than network, e.g. for port or subnet
target_value = None target_value = None
if self.resource == "networks" and self.field == constants.SHARED: if self.resource == "networks" and self.field == constants.SHARED:
target_network_id = target_dict.get("network_id") target_network_id = target_dict.get("network_id")
if not target_network_id: if not target_network_id:
LOG.debug("Unable to find network_id field in target: " LOG.debug("Unable to find network_id field in target: "
"%(target_dict)s", "%(target_dict)s",
{'field': self.field, 'target_dict': target_dict}) {'field': self.field, 'target_dict': target_dict})
return return
project_id = target_dict.get('project_id')
ctx = (context.Context(tenant_id=project_id) if project_id
else context.get_admin_context())
plugin = directory.get_plugin() plugin = directory.get_plugin()
network = plugin.get_network( network = plugin.get_network(ctx, target_network_id)
context.get_admin_context(), target_network_id)
target_value = network.get(self.field) target_value = network.get(self.field)
if target_value is None: if target_value is None:
LOG.debug("Unable to find requested field: %(field)s in target: " LOG.debug("Unable to find requested field: %(field)s in target: "
"%(target_dict)s", "%(target_dict)s",
{'field': self.field, 'target_dict': target_dict}) {'field': self.field, 'target_dict': target_dict})
return target_value return target_value
def _prepare_check(context, action, target, pluralized): def _prepare_check(context, action, target, pluralized):
"""Prepare rule, target, and credentials for the policy engine.""" """Prepare rule, target, and credentials for the policy engine."""
# Compare with None to distinguish case in which target is {} # Compare with None to distinguish case in which target is {}
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added

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