Changeset 7668 for TI12-security/trunk/ndg_xacml
- Timestamp:
- 28/10/10 16:39:24 (10 years ago)
- Location:
- TI12-security/trunk/ndg_xacml/ndg/xacml
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/ndg_xacml/ndg/xacml/core/apply.py
r7365 r7668 12 12 from ndg.xacml.utils import TypedList 13 13 from ndg.xacml.core.expression import Expression 14 from ndg.xacml.core.functions import (FunctionMap, UnsupportedStdFunctionError, 14 from ndg.xacml.core.functions import (FunctionMap, functionMap, 15 UnsupportedStdFunctionError, 15 16 UnsupportedFunctionError) 16 17 … … 53 54 self.__functionId = None 54 55 self.__function = None 55 self.__functionMap = FunctionMap()56 self.__functionMap = functionMap 56 57 self.__loadFunctionFromId = True 57 58 self.__expressions = TypedList(Expression) -
TI12-security/trunk/ndg_xacml/ndg/xacml/core/functions/__init__.py
r7351 r7668 598 598 return True 599 599 600 def loadAll(self): 601 """Load function map with implementations from the relevant function 602 package""" 600 def loadAllCore(self): 601 """Load all core XACML functions""" 603 602 604 603 for functionNs in XacmlFunctionNames.FUNCTION_NAMES: … … 698 697 return functionClass 699 698 700 701 699 # Function map singleton used by match and apply classes - add new keys to 700 # this dictionary to enable support for custom functions 701 functionMap = FunctionMap() 702 -
TI12-security/trunk/ndg_xacml/ndg/xacml/core/match.py
r7351 r7668 17 17 from ndg.xacml.core.attributedesignator import AttributeDesignator 18 18 from ndg.xacml.core.attributeselector import AttributeSelector 19 from ndg.xacml.core.functions import (FunctionMap, UnsupportedStdFunctionError, 19 from ndg.xacml.core.functions import (FunctionMap, functionMap, 20 UnsupportedStdFunctionError, 20 21 UnsupportedFunctionError) 21 22 from ndg.xacml.core.context.exceptions import XacmlContextError … … 82 83 83 84 self.__function = None 84 self.__functionMap = FunctionMap()85 self.__functionMap = functionMap 85 86 self.__loadFunctionFromId = True 86 87 -
TI12-security/trunk/ndg_xacml/ndg/xacml/test/context/test_pdp_with_custom_attributevalue_types.py
r7666 r7668 19 19 from ndg.xacml.core.attribute import Attribute 20 20 from ndg.xacml.core.attributevalue import AttributeValueClassFactory 21 21 from ndg.xacml.core.functions import functionMap 22 from ndg.xacml.core.functions.v1.bag import BagBase 23 from ndg.xacml.core.functions.v1.at_least_one_member_of import \ 24 AtLeastOneMemberOfBase 22 25 from ndg.xacml.core.context.request import Request 23 26 from ndg.xacml.core.context.subject import Subject 24 27 from ndg.xacml.core.context.resource import Resource 25 28 from ndg.xacml.core.context.action import Action 29 26 30 from ndg.xacml.parsers.etree.factory import ReaderFactory 27 31 from ndg.xacml.parsers.etree.attributevaluereader import ( … … 116 120 ETreeGroupRoleDataTypeReader) 117 121 122 # Add extra matching and bag functions 123 118 124 # Example policy with custom attribute value type used with ESGF 119 125 self.pdp = PDP.fromPolicySource(XACML_ESGFTEST1_FILEPATH, ReaderFactory) -
TI12-security/trunk/ndg_xacml/ndg/xacml/test/test_functions.py
r7667 r7668 28 28 def test01LoadMap(self): 29 29 funcMap = FunctionMap() 30 funcMap.loadAll ()30 funcMap.loadAllCore() 31 31 anyUriMatchNs = \ 32 32 'urn:oasis:names:tc:xacml:2.0:function:anyURI-regexp-match'
Note: See TracChangeset
for help on using the changeset viewer.