mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +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:
|
||||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue