Bug 1118944

Summary: [RFE][oslo]: policy.json - Comparing kind against match
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/oslo/+spec/policy-compare-kind-with-match
Whiteboard: upstream_milestone_none upstream_definition_new upstream_status_unknown
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 16:52:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description RHOS Integration 2014-07-12 04:06:51 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/oslo/+spec/policy-compare-kind-with-match.

Description:

As of now if you want to do the comparison of 'kind' and 'match',
you need to pass this data in the 'credential' and then match it.
'credential' is a dictionary which consist of information about users, tenants
and roles. So if the comparison need to be done on the basis of image or
instance properties, you need to pass these properties explicitly through the
'credential' dictionary, otherwise 'KeyError' will be raised as this
information is not present in the 'credential' dictionary and the particular
policy rule will not work as per expectation.

The feature proposed in this blueprint is, in GenericCheck class, we will add a
simple check to compare 'kind' with 'match'. If this comparison is matched
then it will return True or else it will compare using 'credential' dictionary.

For example,
if self.kind == match:
    return True

Specification URL (additional information):

None