def match()

in terranova/resources.py [0:0]


    def match(self, resource: Resource) -> bool:
        """
        Returns:
            true if the selector matches the resource, otherwise false.
        """
        attr_value = resource.attrs.get(self.name)
        if self.value and attr_value and self.value not in attr_value:
            return False
        if not attr_value:
            return False
        return True