# Path: smc/api/exceptions.py
# class UnsupportedEntryPoint(SMCException):
#     """
#     An entry point was specified that was not found in this API
#     version. This is likely due to using an older version of the
#     SMC API that does not support that feature. The exception is
#     thrown specifying the entry point specified.
#     """


import collections
from smc.api.exceptions import UnsupportedEntryPoint
    
    def all(self):
        """
        Return all resources
        
        :rtype: EntryPoint
        """
        for resource in self:
            yield resource
    
    def all_by_name(self):
        """     
        Return all resources by rel name
        
        :rtype: str
        """
        for resource in self:
            yield resource.rel
    
    def get(self, rel):
        """
        Get the resource by rel name
        
        :param str rel_name: name of rel
        :raises UnsupportedEntryPoint: entry point not found in this version
            of the API
        """
        for link in self._entry_points:
            if link.get('rel') == rel:
                return link.get('href')

# Path: smc/api/exceptions.py
# class UnsupportedEntryPoint(SMCException):
#     """
#     An entry point was specified that was not found in this API
#     version. This is likely due to using an older version of the
#     SMC API that does not support that feature. The exception is
#     thrown specifying the entry point specified.
#     """


# Path: smc/api/entry_point.py
import collections
from smc.api.exceptions import UnsupportedEntryPoint

    
    def all(self):
        """
        Return all resources
        
        :rtype: EntryPoint
        """
        for resource in self:
            yield resource
    
    def all_by_name(self):
        """     
        Return all resources by rel name
        
        :rtype: str
        """
        for resource in self:
            yield resource.rel
    
    def get(self, rel):
        """
        Get the resource by rel name
        
        :param str rel_name: name of rel
        :raises UnsupportedEntryPoint: entry point not found in this version
            of the API
        """
        for link in self._entry_points:
            if link.get('rel') == rel:
                return link.get('href')

        raise UnsupportedEntryPoint(