[objets] __repr__ plus parlant pour proprio et machine
This commit is contained in:
parent
c0054a070c
commit
7808221099
1 changed files with 6 additions and 0 deletions
|
@ -522,6 +522,9 @@ class proprio(CransLdapObject):
|
|||
|
||||
attribs = [attributs.nom, attributs.chbre, attributs.paiement, attributs.info, attributs.blacklist, attributs.controle, attributs.historique]
|
||||
|
||||
def __repr__(self):
|
||||
return str(self.__class__) + " : " + str(self['nom'][0])
|
||||
|
||||
def __init__(self, conn, dn, mode='ro', ldif=None):
|
||||
super(proprio, self).__init__(conn, dn, mode, ldif)
|
||||
self._machines = None
|
||||
|
@ -634,6 +637,9 @@ class machine(CransLdapObject):
|
|||
attributs.ipHostNumber, attributs.ip6HostNumber, attributs.historique,
|
||||
attributs.dnsIpv6, attributs.machineAlias]
|
||||
|
||||
def __repr__(self):
|
||||
return str(self.__class__) + " : " + str(self['host'][0])
|
||||
|
||||
def __init__(self, conn, dn, mode='ro', ldif = None):
|
||||
super(machine, self).__init__(conn, dn, mode, ldif)
|
||||
self._proprio = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue