def fetch_tool_versions(app, tool_shed_repository):
 try:
  tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry(app, str(tool_shed_repository.tool_shed))
  params = dict(name=str(tool_shed_repository.name), owner=str(tool_shed_repository.owner), changeset_revision=str(tool_shed_repository.changeset_revision))
  pathspec = ['repository', 'get_tool_versions']
  url = util.build_url(tool_shed_url, pathspec=pathspec, params=params)
  text = util.url_get(tool_shed_url, password_mgr=app.tool_shed_registry.url_auth(tool_shed_url), pathspec=pathspec, params=params)
  if text:
   return json.loads(text)
  else:
   raise Exception(('No content returned from Tool Shed repository version request to %s' % url))
 except Exception:
  log.exception('Failed to fetch tool version information for Tool Shed repository.')
  raise

def fetch_tool_versions ( app , tool_shed_repository ) : try : tool_shed_url = common_util . get_tool_shed_url_from_tool_shed_registry ( app , str ( tool_shed_repository . tool_shed ) ) params = dict ( name = str ( tool_shed_repository . name ) , owner = str ( tool_shed_repository . owner ) , changeset_revision = str ( tool_shed_repository . changeset_revision ) ) pathspec = [ 'repository' , 'get_tool_versions' ] url = util . build_url ( tool_shed_url , pathspec = pathspec , params = params ) text = util . url_get ( tool_shed_url , password_mgr = app . tool_shed_registry . url_auth ( tool_shed_url ) , pathspec = pathspec , params = params ) if text : return json . loads ( text ) else : raise Exception ( ( 'No content returned from Tool Shed repository version request to %s' % url ) ) except Exception : log . exception ( 'Failed to fetch tool version information for Tool Shed repository.' ) raise
fetch a data structure describing tool shed versions from the tool shed corresponding to a tool_shed_repository object .