-
Notifications
You must be signed in to change notification settings - Fork 0
DataModel_02Properties
When created, objects in SOMA are at the same time:
- fully specified
- contain only the bare minimum of information
This means for any given object, there are no optional unset fields that can be used to specify some additional piece of specific information. Which in turn means that it is not possible to specify additional fields.
To further specify objects SOMA provides properties that can be attached dynamically.
Properties are either key/value pairs or dictionaries of key/value pairs that can be attached to an object. The different types of properties provided are:
service
system
oncall
custom
native
Service properties are dictionaries of key/value pairs called
attribute
. The available attribute keys that can be used to assemble
a service are a global namespace, ie. are shared between all services.
Service definitions are per team
. Every attribute
has a
cardinality
that specifies if a service can have this attribute
once or more than once.
Example services:
somaadm attributes create uid cardinality once
somaadm attributes create transport_protocol cardinality multi
...
somaadm property create service unbound
transport_protocol tcp
transport_protocol udp
port 53
process_comm unbound
process_args '/usr/sbin/unbound'
file_path '/etc/unbound/unbound.conf'
team 'Generic Operations Engineering Team'
somaadm property create service OpenSSH
transport_protocol tcp
port 22
process_comm sshd
file_path '/etc/ssh/sshd_config'
software_provider 'OpenBSD'
uid 0
application_protocol 'SSHv2'
team 'Generic Operations Engineering Team'
System properties are key/value pairs with global, predefined keys.
For every defined system property key the system has a validity specification
that further describes that property. It specifies if
an object can have this property:
- directly by setting it on the object
- via inheritance
An unspecified validity defaults to false. For example, this is the
validity specification for the system property cluster_state
:
somaadm property create system cluster_state
somaadm validity create cluster_state on cluster
direct true
inherited false
somaadm validity create cluster_state on node
direct false
inherited true
This results in the following:
- repositories can not have a
cluster_state
- buckets can not have a
cluster_state
- groups can not have a
cluster_state
- clusters can only have a
cluster_state
if the property is set on them - nodes can only have a
cluster_state
by being a member of a cluster and inheriting the value
Oncall properties are used to assign oncall duty teams to the tree.
Custom properties are arbitrary, per-repository key/value pairs that
can be freely defined. They do not have a validity specification
and
can be used anywhere in the tree.
Native properties are introspection meta properties, ie. they can not be assigned but can be used to make inquiries about the tree itself. These are the most inflexible since they must be handled in code and can not be defined at runtime.
- Data Model
- Check Deployment Workflow
- init
- attributes
- create
- delete
- list
- show
- buckets
- create
- delete
- restore
- purge
- freeze
- thaw
- rename
- list
- show
- tree
- property
- add
- delete
- capabilities
- declare
- revoke
- list
- show
- checks
- clusters
- create
- delete
- rename
- list
- show
- tree
- members
- add
- delete
- list
- property
- add
- delete
- datacenters
- add
- remove
- rename
- list
- show
- synclist
- environments
- add
- remove
- rename
- list
- show
- groups
- create
- delete
- rename
- list
- show
- tree
- members
- add
- delete
- list
- property
- add
- delete
- jobs
- list
- show
- local
- outstanding
- update
- list
- prune
- levels
- create
- delete
- list
- show
- metrics
- create
- delete
- list
- show
- modes
- create
- delete
- list
- show
- monitoring
- create
- delete
- list
- show
- nodes
- create
- delete
- purge
- restore
- update
- rename
- repossess
- relocate
- online
- offline
- assign
- list
- synclist
- show
- tree
- config
- property
- add
- delete
- oncall
- add
- remove
- rename
- update
- list
- show
- member
- add
- remove
- list
- permissions
- category
- add
- remove
- list
- show
- add
- remove
- list
- show
- category
- predicates
- create
- delete
- list
- show
- property
- create
- delete
- show
- list
- providers
- create
- delete
- list
- show
- rights
- grant
- global
- system
- revoke
- global
- system
- grant
- repository
- create
- delete
- restore
- purge
- clear
- rename
- repossess
- activate
- list
- show
- tree
- property
- servers
- states
- add
- remove
- rename
- list
- show
- status
- create
- delete
- list
- show
- teams
- add
- remove
- rename
- migrate
- list
- synclist
- show
- update
- types
- add
- remove
- rename
- list
- show
- units
- create
- delete
- list
- show
- users
- create
- delete
- purge
- update
- activate
- password
- list
- show
- synclist
- validity
- create
- delete
- list
- show
- views
- add
- remove
- rename
- list
- show
- ops