diff --git a/bootstrapvz/providers/oracle/__init__.py b/bootstrapvz/providers/oracle/__init__.py index 7c2313d..7725028 100644 --- a/bootstrapvz/providers/oracle/__init__.py +++ b/bootstrapvz/providers/oracle/__init__.py @@ -38,7 +38,7 @@ def resolve_tasks(taskset, manifest): ]) if 'credentials' in manifest.provider: - taskset.add(tasks.api.InstantiateAPIClient) + taskset.add(tasks.api.Connect) taskset.add(tasks.image.UploadImageTarball) if manifest.provider.get('verify', False): taskset.add(tasks.image.DownloadImageTarball) diff --git a/bootstrapvz/providers/oracle/tasks/api.py b/bootstrapvz/providers/oracle/tasks/api.py index b1f11a5..523b928 100644 --- a/bootstrapvz/providers/oracle/tasks/api.py +++ b/bootstrapvz/providers/oracle/tasks/api.py @@ -3,8 +3,8 @@ from bootstrapvz.common import phases from bootstrapvz.providers.oracle.apiclient import OracleStorageAPIClient -class InstantiateAPIClient(Task): - description = 'Instantiating Oracle Storage Cloud API client' +class Connect(Task): + description = 'Connecting to the Oracle Storage Cloud API' phase = phases.preparation @classmethod @@ -15,3 +15,5 @@ class InstantiateAPIClient(Task): identity_domain=info.manifest.provider['credentials']['identity-domain'], container=info.manifest.provider['container'], ) + # Try to fetch the token, so it will fail early if the credentials are wrong + info._oracle['client'].auth_token