Skip to content

Instantly share code, notes, and snippets.

@keithchambers
Created March 28, 2015 17:41
Show Gist options
  • Select an option

  • Save keithchambers/81e3bec8da15cee5731e to your computer and use it in GitHub Desktop.

Select an option

Save keithchambers/81e3bec8da15cee5731e to your computer and use it in GitHub Desktop.
Service Template Schema (kwalify)
type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
version:
type: str
length: { min: 1, max: 35 }
required: yes
schema_version:
type: int
required: yes
relations:
type: map
mapping:
provides:
type: seq
sequence:
- type: map
mapping:
capability:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
consumes:
type: seq
sequence:
- type: map
mapping:
capability:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
required:
type: bool
roles:
type: seq
sequence:
- type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
version:
type: str
length: { min: 1, max: 35 }
required: yes
packages:
type: seq
sequence:
- type: str
length: { min: 1, max: 256 }
parameters:
type: seq
sequence:
- type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
pattern: /^[a-zA-Z0-9\-\_]+$/
description:
type: str
length: { min: 0, max: 140 }
type:
type: str
enum: [string, number, collection]
hidden:
type: bool
peer_exposed:
type: bool
required:
type: bool
min:
type: number
max:
type: number
min_len:
type: int
range: { min: 0 }
max_len:
type: int
range: { min: 1 }
applied_scopes:
type: seq
sequence:
- type: str
enum: [role, host]
allowed_pattern:
type: str
length: { min: 1, max: 256 }
default_value:
type: any
allowed_values:
type: seq
sequence:
- type: scalar
schema:
type: seq
sequence:
- type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
pattern: /^[a-zA-Z0-9\-\_]+$/
description:
type: str
length: { min: 0, max: 140 }
type:
type: str
enum: [string, number]
hidden:
type: bool
required:
type: bool
min:
type: number
max:
type: number
min_len:
type: int
range: { min: 0 }
max_len:
type: int
range: { min: 1 }
allowed_pattern:
type: str
length: { min: 1, max: 256 }
default_value:
type: text
allowed_values:
type: seq
sequence:
- type: scalar
profiles:
type: seq
sequence:
- type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
vmware:
type: map
mapping:
cpus:
type: int
memory:
type: int
partitions:
type: map
mapping:
"=":
type: map
mapping:
size:
type: number
range: { min: 0.01 }
type:
type: str
enum: [ext2, ext3, ext4]
aws:
type: map
mapping:
instance_type:
type: str
enum:
- m1.small
- m1.medium
- m1.large
- m1.xlarge
- m3.xlarge
- m3.2xlarge
- t1.micro
- m2.xlarge
- m2.2xlarge
- m2.4xlarge
- c1.medium
- c1.xlarge
- cc2.8xlarge
- cr1.8xlarge
- cg1.4xlarge
- hi1.4xlarge
- hs1.8xlarge
partitions:
type: map
mapping:
"=":
type: map
mapping:
size:
type: number
range: { min: 0.01 }
type:
type: str
enum: [ext3, ext4]
openstack:
type: map
mapping:
flavor:
type: str
required: yes
partitions:
type: map
mapping:
"=":
type: map
mapping:
size:
type: number
range: { min: 0.01 }
type:
type: str
enum: [ext3, ext4]
bare:
type: map
mapping:
os_template:
type: str
required: yes
partitions:
type: map
mapping:
"=":
type: map
mapping:
size:
type: number
range: { min: 0.01 }
type:
type: str
enum: [ext3, ext4]
virtualbox:
type: map
mapping:
cpus:
type: int
memory:
type: int
partitions:
type: map
mapping:
"=":
type: map
mapping:
size:
type: number
range: { min: 0.01 }
type:
type: str
enum: [ext2, ext3, ext4]
host_types:
type: seq
sequence:
- type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
profile:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
roles:
type: seq
sequence:
- type: str
length: { min: 1, max: 35 }
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
min:
type: int
range: { min: 0 }
required: yes
max:
type: int
range: { min: 1 }
handlers:
type: seq
sequence:
- type: map
mapping:
name:
type: str
length: { min: 1, max: 35 }
required: yes
pattern: /^(?=.*[a-zA-Z])([^\s]+)$/
async:
type: bool
required: yes
code:
type: str
required: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment