Example #1
0
 def handle(self, *args, **options):
     from thepian.conf import structure
     
     print net.get_mac_addresses()
     print 'mac  '+net.get_mac_address_hex()
     print 'ip   '+net.get_ip4_address()
     if structure.machine.known:
         machine = structure.machine
         print 'name '+machine['NICK'] + ' in ' + machine['cluster']
         print 'as   '+ ' '.join(machine['domains'] or [])
Example #2
0
 def get_macs(self):
     """return a list of mac adresses found on this machine as 8 hex digits"""
     return [mac.replace(':','').lstrip("0") for mac in net.get_mac_addresses()]