login->host (pour machines)

This commit is contained in:
Daniel STAN 2014-08-31 16:54:46 +02:00
parent d627da4e47
commit 0987d2be0a
2 changed files with 8 additions and 5 deletions

View file

@ -21,9 +21,11 @@ class Ticket(object):
self.add_entry({'login': login, 'pass': mdp})
def add_machine(self, machine):
login = machine['host'][0].split('.', 1)[0]
todo = {'login': login, 'macAddress': machine['macAddress'][0].value,
'type': 'fil'}
todo = {
'host': machine['host'][0].split('.', 1)[0],
'macAddress': machine['macAddress'][0].value,
'type': 'fil',
}
if machine.has_key('ipsec'):
todo['secret'] = machine['ipsec'][0].value
todo['type'] = 'wifi'