'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()
    name = self.params['name']
    partition = self.params['partition']
    r = self.api.tm.net.vlans.vlan.load(name=name, partition=partition)
    ifcs = r.interfaces_s.get_collection()
    if hasattr(r, 'tag'):
        p['tag'] = int(r.tag)
    if hasattr(r, 'description'):
        p['description'] = str(r.description)
    if (len(ifcs) is not 0):
        untagged = []
        tagged = []
        for x in ifcs:
            if hasattr(x, 'tagged'):
                tagged.append(str(x.name))
            elif hasattr(x, 'untagged'):
                untagged.append(str(x.name))
        if untagged:
            p['untagged_interfaces'] = list(set(untagged))
        if tagged:
            p['tagged_interfaces'] = list(set(tagged))
    p['name'] = name
    return p
