示例#1
0
def get_workspace_storage_estimate(namespace, name):
    headers = firecloud_api._fiss_access_headers()

    uri = "{0}/workspaces/{1}/{2}/storageCostEstimate".format(
        get_fc_url(), namespace, name)

    return requests.get(uri, headers=headers)
示例#2
0
def get_entity_by_page(namespace, name, entity_type, page, page_size):
    headers = firecloud_api._fiss_access_headers()

    uri = "{0}workspaces/{1}/{2}/entityQuery/{3}?page={4}&pageSize={5}".format(
        get_fc_url(), namespace, name, entity_type, page, page_size)

    return requests.get(uri, headers=headers).json()
示例#3
0
def setup():
    firecloud_api._fiss_access_headers = _fiss_access_headers_local
    registration_info = requests.get("https://api.firecloud.org/register", headers=firecloud_api._fiss_access_headers())
    if registration_info.status_code != 200:
        fail("This account is not registered with FireCloud.")

    sys.stderr.write("Using credentials for firecloud account: %s\n" % registration_info.json()["userInfo"]["userEmail"])
示例#4
0
def get_workflow_metadata(namespace, name, submission_id, workflow_id, *include_keys):
    headers = firecloud_api._fiss_access_headers()

    include_key_string = "includeKey=%s&" % ("%2C%20".join(list(include_keys))) if include_keys else ""
    uri = "{0}workspaces/{1}/{2}/submissions/{3}/workflows/{4}?&{5}expandSubWorkflows=false".format(
        get_fc_url(), namespace, name, submission_id, workflow_id, include_key_string)

    return requests.get(uri, headers=headers).json()