parameters: (self, type_, url, tags, origin=None)
docstring: :param type_: data source type, e.g. TYPE_YAML, TYPE_GBPDISTRO
  
          :param url: URL of data location.  For file resources, must
            start with the file:// scheme.  For remote resources, URL
            must include a path.
  
          :param tags: tags for matching data source to configurations
          :param origin: filename or other indicator of where data came from for debugging.
  
          :raises: :exc:`ValueError` if parameters do not validate
docstring_summary: :param type_: data source type, e.g. TYPE_YAML, TYPE_GBPDISTRO
docstring_tokens: : param type_ : data source type e . g . TYPE_YAML TYPE_GBPDISTRO
function: def __init__(self, type_, url, tags, origin=None):
          """
          :param type_: data source type, e.g. TYPE_YAML, TYPE_GBPDISTRO
  
          :param url: URL of data location.  For file resources, must
            start with the file:// scheme.  For remote resources, URL
            must include a path.
  
          :param tags: tags for matching data source to configurations
          :param origin: filename or other indicator of where data came from for debugging.
  
          :raises: :exc:`ValueError` if parameters do not validate
          """
          # validate inputs
          if not type_ in VALID_TYPES:
              raise ValueError("type must be one of [%s]"%(','.join(VALID_TYPES)))
          parsed = urlparse.urlparse(url)
          if not parsed.scheme or (parsed.scheme != 'file' and not parsed.netloc) or parsed.path in ('', '/'):
              raise ValueError("url must be a fully-specified URL with scheme, hostname, and path: %s"%(str(url)))
          if not type(tags) == list:
              raise ValueError("tags must be a list: %s"%(str(tags)))
  
          self.type = type_
          self.tags = tags
  
          self.url = url
          self.origin = origin
function_tokens: def __init__ ( self , type_ , url , tags , origin = None ) : # validate inputs if not type_ in VALID_TYPES : raise ValueError ( "type must be one of [%s]" % ( ',' . join ( VALID_TYPES ) ) ) parsed = urlparse . urlparse ( url ) if not parsed . scheme or ( parsed . scheme != 'file' and not parsed . netloc ) or parsed . path in ( '' , '/' ) : raise ValueError ( "url must be a fully-specified URL with scheme, hostname, and path: %s" % ( str ( url ) ) ) if not type ( tags ) == list : raise ValueError ( "tags must be a list: %s" % ( str ( tags ) ) ) self . type = type_ self . tags = tags self . url = url self . origin = origin