code: def _hw_addr_aix(iface):
      '''
      Return the hardware address (a.k.a. MAC address) for a given interface on AIX
      MAC address not available in through interfaces
      '''
      cmd = subprocess.Popen(
          'entstat -d {0} | grep \'Hardware Address\''.format(iface),
          shell=True,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT).communicate()[0]
  
      if cmd:
          comps = cmd.split(' ')
          if len(comps) == 3:
              mac_addr = comps[2].strip('\'').strip()
              return mac_addr
  
      error_msg = ('Interface "{0}" either not available or does not contain a hardware address'.format(iface))
      log.error(error_msg)
      return error_msf _hw_addr_aix(iface):
      '''
      Return the hardware address (a.k.a. MAC address) for a given interface on AIX
      MAC address not available in through interfaces
      '''
      cmd = subprocess.Popen(
          'entstat -d {0} | grep \'Hardware Address\''.format(iface),
          shell=True,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT).communicate()[0]
  
      if cmd:
          comps = cmd.split(' ')
          if len(comps) == 3:
              mac_addr = comps[2].strip('\'').strip()
              return mac_addr
  
      error_msg = ('Interface "{0}" either not available or does not contain a hardware address'.format(iface))
      log.error(error_msg)
      return error_msg
docs: Return the hardware address (a.k.a. MAC address) for a given interface on AIX
      MAC address not available in through interfaces