'Read information and transform it
The values that are returned by BIG-IP in the f5-sdk can have encoding
attached to them as well as be completely missing in some cases.
Therefore, this method will transform the data from the BIG-IP into a
format that is more easily consumable by the rest of the class and the
parameters that are supported by the module.'

def read(self):

    p = dict()
    r = self.api.tm.net.route_domains.route_domain.load(name=self.params['name'])
    p['id'] = int(r.id)
    p['name'] = str(r.name)
    if hasattr(r, 'connectionLimit'):
        p['connection_limit'] = int(r.connectionLimit)
    if hasattr(r, 'description'):
        p['description'] = str(r.description)
    if hasattr(r, 'strict'):
        p['strict'] = str(r.strict)
    if hasattr(r, 'parent'):
        p['parent'] = r.parent
    if hasattr(r, 'vlans'):
        p['vlans'] = list(set([str(x) for x in r.vlans]))
    if hasattr(r, 'routingProtocol'):
        p['routing_protocol'] = list(set([str(x) for x in r.routingProtocol]))
    if hasattr(r, 'flowEvictionPolicy'):
        p['flow_eviction_policy'] = str(r.flowEvictionPolicy)
    if hasattr(r, 'bwcPolicy'):
        p['bwc_policy'] = str(r.bwcPolicy)
    if hasattr(r, 'servicePolicy'):
        p['service_policy'] = str(r.servicePolicy)
    return p
