@@ -108,20 +108,22 @@ def __getattr__(container, name):
108108 attribute = lazy_attribute (container )
109109 bases = [base .__name__ for base in lazy_attribute .__bases__ ]
110110 # Doing version check per each resource
111- container ._check_supported_versions (attribute )
111+ container ._check_supported_versions (container , attribute )
112112 if 'Resource' not in bases :
113113 setattr (container , name , attribute )
114114 return attribute
115115
116- def _check_supported_versions (container , attribute ):
116+ def _check_supported_versions (self , container , attribute ):
117117 tmos_v = container ._meta_data ['bigip' ].tmos_version
118118 minimum = attribute ._meta_data ['minimum_version' ]
119119 if LooseVersion (tmos_v ) < LooseVersion (minimum ):
120- error = "There was an attempt to access API which " \
121- "has not been implemented or supported " \
122- "in the device's TMOS version: {}. " \
123- "Minimum TMOS version supported is {}" .format (
124- tmos_v , minimum )
120+ error = "There was an attempt to access resource: \n {}\n which " \
121+ "is not implemented in the device's TMOS version: {}. " \
122+ "The minimum TMOS version in which this resource *is*" \
123+ "supported is {}" .format (
124+ attribute ._meta_data ['uri' ],
125+ tmos_v ,
126+ minimum )
125127 raise UnsupportedTmosVersion (error )
126128
127129
0 commit comments