def load_transport(self, samdb):
        """Given a Transport object with an prior initialization
        for the object's DN, search for the DN and load attributes
        from the samdb.
        """
        attrs = [ "objectGUID",
                  "options",
                  "name",
                  "bridgeheadServerListBL",
                  "transportAddressAttribute" ]
        try:
            res = samdb.search(base=self.dnstr, scope=ldb.SCOPE_BASE,
                               attrs=attrs)

        except ldb.LdbError, (enum, estr):
            raise Exception("Unable to find Transport for (%s) - (%s)" %
                            (self.dnstr, estr))

        msg = res[0]
        self.guid = misc.GUID(samdb.schema_format_value("objectGUID",
                              msg["objectGUID"][0]))

        if "options" in msg:
            self.options = int(msg["options"][0])

        if "transportAddressAttribute" in msg:
            self.address_attr = str(msg["transportAddressAttribute"][0])

        if "name" in msg:
            self.name = str(msg["name"][0])

        if "bridgeheadServerListBL" in msg:
            for value in msg["bridgeheadServerListBL"]:
                dsdn = dsdb_Dn(samdb, value)
                dnstr = str(dsdn.dn)
                if dnstr not in self.bridgehead_list:
                    self.bridgehead_list.append(dnstr)
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/kcc_utils.py/Transport.load_transport/original