def get_facts_for_interface(interface)
      facts = interfaces_hash[interface]
      hash = {
        'link' => facts['state'] == 'up',
        'macaddress' => get_address_by_family(facts['addresses'], 'lladdr'),
        'ipaddress' => get_address_by_family(facts['addresses'], 'inet'),
      }
      hash['tag'] = facts['vlan']['id'] if facts['vlan'].present?
      hash.with_indifferent_access
    end
def get_facts_for_interface(interface)
      facts = interfaces_hash[interface]
      hash = {
        'link' => facts['state'] == 'up',
        'macaddress' => get_address_by_family(facts['addresses'], 'lladdr'),
        'ipaddress' => get_address_by_family(facts['addresses'], 'inet'),
      }
      hash['tag'] = facts['vlan']['id'] if facts['vlan'].present?
      hash.with_indifferent_access
    end
meant to be implemented in inheriting classes
 should return hash with indifferent access in following format:
 { 'link': 'true',
   'macaddress': '00:00:00:00:00:FF',
   'ipaddress': nil,
   'any_other_fact': 'value' }

 note that link and macaddress are mandatory