def __init__(self, name, uuid): super(ScriptAlreadyExists, self).__init__( _("Script %(name)s already exists (UUID: %(uuid)s)") % { 'name': name, 'uuid': uuid }) self.name = name self.uuid = uuid
def __init__(self, name=None, uuid=None): super(NoSuchScript, self).__init__( _("No such script: %(name)s (UUID: %(uuid)s)") % { 'name': name, 'uuid': uuid }) self.name = name self.uuid = uuid
class CloudkittyUpgradeChecks(upgradecheck.UpgradeCommands): def _storage_version(self): if CONF.storage.version < 2: return upgradecheck.Result( upgradecheck.Code.WARNING, 'Storage version is inferior to 2. Support for v1 storage ' 'will be dropped in a future release.', ) return upgradecheck.Result(upgradecheck.Code.SUCCESS) _upgrade_checks = ((_('Storage version'), _storage_version), )
def __init__(self, threshold, parent_id=None, parent_type=None, uuid=None, tenant_id=None): # TODO(sheeprine): UUID is deprecated parent_id = parent_id if parent_id else uuid super(ThresholdAlreadyExists, self).__init__( _("Threshold '%(threshold)s' already exists for %(p_type)s " "'%(p_id)s', tenant: '%(t_id)s'") % {'threshold': threshold, 'p_type': parent_type, 'p_id': parent_id, 't_id': tenant_id}) self.threshold = threshold self.uuid = parent_id self.parent_id = parent_id self.parent_type = parent_type self.tenant_id = tenant_id
def __init__(self, mapping, parent_id=None, parent_type=None, uuid=None, tenant_id=None): # TODO(sheeprine): UUID is deprecated parent_id = parent_id if parent_id else uuid super(MappingAlreadyExists, self).__init__( _("Mapping '%(mapping)s' already exists for %(p_type)s '%(p_id)s'," " tenant: '%(t_id)s'") % {'mapping': mapping, 'p_type': parent_type, 'p_id': parent_id, 't_id': tenant_id}) self.mapping = mapping self.uuid = parent_id self.parent_id = parent_id self.parent_type = parent_type self.tenant_id = tenant_id
def __init__(self, map_type): msg = (_("No mapping type: %s") % map_type) super(NoSuchType, self).__init__(msg) self.map_type = map_type
def __init__(self, uuid): msg = (_("No such threshold: %s") % uuid) super(NoSuchThreshold, self).__init__(msg) self.uuid = uuid
def __init__(self, uuid): msg = (_("No such mapping: %s") % uuid) super(NoSuchMapping, self).__init__(msg) self.uuid = uuid
def __init__(self, uuid): super(NoSuchField, self).__init__( _("No such field: %s") % uuid) self.uuid = uuid
def __init__(self, uuid): super(ThresholdHasNoGroup, self).__init__( _("Threshold has no group (UUID: %s)") % uuid) self.uuid = uuid
def __init__(self, uuid): super(MappingHasNoGroup, self).__init__( _("Mapping has no group (UUID: %s)") % uuid) self.uuid = uuid
def __init__(self, field, uuid): super(FieldAlreadyExists, self).__init__( _("Field %(field)s already exists (UUID: %(uuid)s)") % {'field': field, 'uuid': uuid}) self.field = field self.uuid = uuid