--- a/usr/src/lib/pyrad/client.py Wed Oct 05 11:47:20 2011 -0400
+++ b/usr/src/lib/pyrad/client.py Thu Oct 06 06:26:04 2011 -0700
@@ -725,6 +725,10 @@
self._stability = unpacker.unpack_enum()
self._type = types.typeref(unpacker)
+ def read(self, instance):
+ up = xdrlib.Unpacker(instance._payload)
+ return self._type.read(up, True)
+
class RadApiVersion(object):
def __init__(self, unpacker):
stabilities = 'undefined', 'private', 'uncommitted', 'committed'
@@ -765,6 +769,14 @@
raise InvalidFeatureError(instance._name,
"%s has no attribute %s" % (instance._name, attr))
+ def read_event(self):
+ instance = self._connection.read_event()
+ try:
+ return self._events[instance._event].read(instance)
+ except KeyError:
+ raise InvalidFeatureError(instance._name,
+ "%s has no event %s" % (instance._name, event))
+
def write(self, instance, attr, value):
try:
self._attributes[attr].write(instance, value)