def _set_default_values(storage_lvm): defaults = { 'backend': constants.SB_TYPE_LVM, 'name': constants.SB_DEFAULT_NAMES[constants.SB_TYPE_LVM], 'state': constants.SB_STATE_CONFIGURING, 'task': constants.SB_TASK_NONE, 'services': None, 'capabilities': {} } sl = api_helper.set_backend_data(storage_lvm, defaults, HIERA_DATA, constants.SB_LVM_SVCS_SUPPORTED) return sl
def _set_defaults_ceph_external(storage_ceph_ext): defaults = { 'backend': constants.SB_TYPE_CEPH_EXTERNAL, 'name': constants.SB_DEFAULT_NAMES[constants.SB_TYPE_CEPH_EXTERNAL].format(0), 'state': constants.SB_STATE_CONFIGURING, 'task': None, 'services': None, 'ceph_conf': None, 'capabilities': {}, } sc = api_helper.set_backend_data(storage_ceph_ext, defaults, HIERA_DATA, constants.SB_CEPH_EXTERNAL_SVCS_SUPPORTED) return sc