Skip to content

Commit

Permalink
Convert SUPPORTED_PROVIDERS to a dict reflecting their order in wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Aug 5, 2018
1 parent ab77415 commit 9d15ce4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/managers/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"Please install CloudBridge or modify ObjectStore configuration."
)

SUPPORTED_PROVIDERS = "{aws, azure, openstack}"
SUPPORTED_PROVIDERS = {"aws": 0, "azure": 1, "openstack": 2}

DOWNLOAD_TOOL = "download_to_cloud"
DOWNLOAD_TOOL_VERSION = "0.1.0"
Expand Down Expand Up @@ -140,7 +140,7 @@ def configure_provider(provider, credentials):
connection = CloudProviderFactory().create_provider(ProviderList.OPENSTACK, config)
else:
raise RequestParameterInvalidException("Unrecognized provider '{}'; the following are the supported "
"providers: {}.".format(provider, SUPPORTED_PROVIDERS))
"providers: {}.".format(provider, SUPPORTED_PROVIDERS.keys()))

try:
if connection.authenticate():
Expand Down Expand Up @@ -302,7 +302,7 @@ def download(self, trans, history_id, provider, bucket, credentials, dataset_ids
f.write(json.dumps(credentials))
connection = credentials
connection["provider"] = provider
connection["__current_case__"] = 0
connection["__current_case__"] = SUPPORTED_PROVIDERS[provider]
object_label = hda.name.replace(" ", "_")
args = {
"connection": connection,
Expand Down

0 comments on commit 9d15ce4

Please sign in to comment.