Presets configuration plugin

Preset configuration (or sometime called Preset store) is a mechanism to fetch and prepare cluster definition/spec for VmShepherd. Preset configuration driver should implement _get_preset_spec and _list.

Initialization - consider following config:

presets:
  driver: SomeC
  param1: AAAA
  param2: BBBB
  some_x: CCC

All params will be passed as config dict to the driver init:

class vmshepherd.presets.abstract.AbstractConfigurationDriver(runtime, defaults)[source]

Bases: object

_get_preset_spec(preset_name: str)[source]

Returns configuration of specific preset

Parameters:preset_name (string) – Name of the preset

Returns dict - preset configuration

Example configuration:

name: 'C_DEV-app-dev'
count: 1
flavor: m1.small
image: ubuntu-xenial
manage_interval: 0    # interval in seconds
manage_expire: 120    # max time of manage (after this time another manage can be scheduled) - expiration in seconds
network:
  security_groups:
    - PaaS PrivateCloud
    - paas
  availability_zone: nova
  subnet:
    - pl-krk-2-something
iaas:
  project_name: PROJECT_NAME
  project_domain_name: PROJECT_DOMAIN
userdata: ''
meta_tags: {}
_list()[source]

Returns list names of presets to manage

Returns list of string. Name will be used to fetch configuration using _get_preset_spec.