mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
oracle: update schema and validation
This commit is contained in:
parent
12dbc6a07e
commit
c07f56b796
2 changed files with 21 additions and 3 deletions
|
@ -10,8 +10,16 @@ import tasks.packages
|
|||
|
||||
def validate_manifest(data, validator, error):
|
||||
import os.path
|
||||
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
||||
validator(data, schema_path)
|
||||
validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
||||
|
||||
keys = ['username', 'password', 'identity-domain']
|
||||
if 'credentials' in data['provider']:
|
||||
if not all(key in data['provider']['credentials'] for key in keys):
|
||||
msg = 'All Oracle Compute Cloud credentials should be specified in the manifest'
|
||||
error(msg, ['provider', 'credentials'])
|
||||
if not data['provider'].get('container'):
|
||||
msg = 'The container to which the image will be uploaded should be specified'
|
||||
error(msg, ['provider'])
|
||||
|
||||
|
||||
def resolve_tasks(taskset, manifest):
|
||||
|
|
|
@ -3,6 +3,17 @@ $schema: http://json-schema.org/draft-04/schema#
|
|||
title: Oracle manifest
|
||||
type: object
|
||||
properties:
|
||||
provider:
|
||||
type: object
|
||||
properties:
|
||||
credentials:
|
||||
type: object
|
||||
properties:
|
||||
username: {type: string}
|
||||
password: {type: string}
|
||||
identity-domain: {type: string}
|
||||
container: {type: string}
|
||||
verify: {type: boolean}
|
||||
system:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -21,7 +32,6 @@ properties:
|
|||
type:
|
||||
type: string
|
||||
enum:
|
||||
- none
|
||||
- msdos
|
||||
- gpt
|
||||
required: [backing]
|
||||
|
|
Loading…
Add table
Reference in a new issue