mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
oracle: connect to the API when instantiating
This commit is contained in:
parent
e1d296d5dc
commit
5f9152bec3
2 changed files with 5 additions and 3 deletions
|
@ -38,7 +38,7 @@ def resolve_tasks(taskset, manifest):
|
||||||
])
|
])
|
||||||
|
|
||||||
if 'credentials' in manifest.provider:
|
if 'credentials' in manifest.provider:
|
||||||
taskset.add(tasks.api.InstantiateAPIClient)
|
taskset.add(tasks.api.Connect)
|
||||||
taskset.add(tasks.image.UploadImageTarball)
|
taskset.add(tasks.image.UploadImageTarball)
|
||||||
if manifest.provider.get('verify', False):
|
if manifest.provider.get('verify', False):
|
||||||
taskset.add(tasks.image.DownloadImageTarball)
|
taskset.add(tasks.image.DownloadImageTarball)
|
||||||
|
|
|
@ -3,8 +3,8 @@ from bootstrapvz.common import phases
|
||||||
from bootstrapvz.providers.oracle.apiclient import OracleStorageAPIClient
|
from bootstrapvz.providers.oracle.apiclient import OracleStorageAPIClient
|
||||||
|
|
||||||
|
|
||||||
class InstantiateAPIClient(Task):
|
class Connect(Task):
|
||||||
description = 'Instantiating Oracle Storage Cloud API client'
|
description = 'Connecting to the Oracle Storage Cloud API'
|
||||||
phase = phases.preparation
|
phase = phases.preparation
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -15,3 +15,5 @@ class InstantiateAPIClient(Task):
|
||||||
identity_domain=info.manifest.provider['credentials']['identity-domain'],
|
identity_domain=info.manifest.provider['credentials']['identity-domain'],
|
||||||
container=info.manifest.provider['container'],
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue