docs: def get_by_hostname(self, hostname):
          """Get enclosure by it's hostname"""
          def filter_by_hostname(hostname, enclosure):
              is_primary_ip = ('activeOaPreferredIP' in enclosure and enclosure['activeOaPreferredIP'] == hostname)
              is_standby_ip = ('standbyOaPreferredIP' in enclosure and enclosure['standbyOaPreferredIP'] == hostname)
              return is_primary_ip or is_standby_ip
  
          enclosures = self.get_all()
          result = [x for x in enclosures if filter_by_hostname(hostname, x)]
  
          if result:
              new_resource = self.new(self._connection, result[0])
          else:
              new_resource = None
  
          return new_resource