def verify(self, **kwargs):
        """
        Make sure all the required values are there and that the values are
        of the correct type
        """
        _spec = self.c_param
        try:
            _allowed = self.c_allowed_values
        except KeyError:
            _allowed = {}

        for (attribute, (typ, required, _, _, na)) in _spec.items():
            if attribute == "*":
                continue

            try:
                val = self._dict[attribute]
            except KeyError:
                if required:
                    raise MissingRequiredAttribute("%s" % attribute)
                continue
            else:
                if typ == bool:
                    pass
                elif not val:
                    if required:
                        raise MissingRequiredAttribute("%s" % attribute)
                    continue

            try:
                _allowed_val = _allowed[attribute]
            except KeyError:
                pass
            else:
                if not self._type_check(typ, _allowed_val, val, na):
                    raise NotAllowedValue(val)

        return True
def verify ( self , ** kwargs ) : _spec = self . c_param try : _allowed = self . c_allowed_values except KeyError : _allowed = { } for ( attribute , ( typ , required , _ , _ , na ) ) in _spec . items ( ) : if attribute == "*" : continue try : val = self . _dict [ attribute ] except KeyError : if required : raise MissingRequiredAttribute ( "%s" % attribute ) continue else : if typ == bool : pass elif not val : if required : raise MissingRequiredAttribute ( "%s" % attribute ) continue try : _allowed_val = _allowed [ attribute ] except KeyError : pass else : if not self . _type_check ( typ , _allowed_val , val , na ) : raise NotAllowedValue ( val ) return True
Make sure all the required values are there and that the values are
        of the correct type