1 ##############################################################################
2 # Copyright (c) 2018 Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
9 $schema: 'http://json-schema.org/schema#'
10 $id: 'https://github.com/opnfv/pharos/blob/master/config/pdf/pod1.yaml'
14 type: 'string' # NOTE: we don't validate this is a valid addr (yet)
17 pattern: '^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'
18 # Common node schema for jumpserver, cluster nodes
24 enum: ['baremetal', 'virtual']
31 enum: ['aarch64', 'x86_64']
40 pattern: '^[0-9]+[GT]B?$'
41 required: ['type', 'vendor', 'model', 'arch', 'cpus', 'cpu_cflags', 'cores', 'memory']
42 additionalProperties: false
50 pattern: '^disk[0-9]+$'
53 pattern: '^[0-9]+[MGT]B?$'
56 enum: ['hdd', 'ssd', 'cdrom', 'tape']
59 enum: ['sata', 'sas', 'ssd', 'nvme', 'scsi', 'iscsi']
62 enum: [0, 5400, 7200, 10000, 15000]
63 required: ['name', 'disk_capacity', 'disk_type', 'disk_interface', 'disk_rotation']
64 additionalProperties: false
81 $ref: '#/definitions/ip_address'
83 $ref: '#/definitions/mac_address'
84 required: ['type', 'versions', 'user', 'pass', 'address', 'mac_address']
85 additionalProperties: false
93 pattern: '^nic[0-9]+$'
95 $ref: '#/definitions/mac_address'
98 $ref: '#/definitions/ip_address'
103 pattern: '^(native|[1-9][0-9]{0,3})(\|(native|[1-9][0-9]{0,3}))*$'
110 enum: ['1gb', '10gb', '25gb', '40gb']
111 # FIXME: mandatory for nodes?
114 type: ['string', 'null']
115 pattern: '^((dpdk|sriov)\|?)*$'
116 # FIXME: mandatory for nodes?
117 required: ['name', 'mac_address']
118 additionalProperties: false
120 # Do not allow any properties not defined here. This lets us catch typos.
121 additionalProperties: false
129 enum: ['production', 'development']
134 pattern: '^([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+[,; ]*)+$'
141 required: ['type', 'pod_owner', 'contact', 'lab', 'location', 'link']
142 additionalProperties: false
149 $ref: '#/definitions/node'
151 $ref: '#/definitions/disks'
154 remote_params: # Optional YAML anchor, contents will be validated below
157 $ref: '#/definitions/remote_management'
159 $ref: '#/definitions/interfaces'
160 required: ['name', 'node', 'disks', 'os', 'remote_management', 'interfaces']
161 additionalProperties: false
170 $ref: '#/definitions/node'
172 $ref: '#/definitions/disks'
175 remote_params: # Optional YAML anchor, contents will be validated after inject
178 $ref: '#/definitions/remote_management'
180 $ref: '#/definitions/interfaces'
181 required: ['name', 'node', 'disks', 'remote_management', 'interfaces']
182 additionalProperties: false