# neutron_lib.objects.exceptions module

exception neutron_lib.objects.exceptions.NeutronDbObjectDuplicateEntry(object_class, db_exception)

  Bases: `Conflict`

  Duplicate entry at unique column error.

  Raised when made an attempt to write to a unique column the same entry as existing one. :attr: columns available on an instance of the exception and could be used at error handling:

      try:
          obj_ref.save()
      except NeutronDbObjectDuplicateEntry as e:
          if 'colname' in e.columns:
              # Handle error.

  message = 'Failed to create a duplicate %(object_type)s: for attribute(s) %(attributes)s with value(s) %(values)s'

exception neutron_lib.objects.exceptions.NeutronDbObjectNotFoundByModel(**kwargs)

  Bases: `NotFound`

  message = 'NeutronDbObject not found by model %(model)s.'

exception neutron_lib.objects.exceptions.NeutronObjectUpdateForbidden(**kwargs)

  Bases: `NeutronException`

  message = 'Unable to update the following object fields: %(fields)s'

exception neutron_lib.objects.exceptions.NeutronObjectValidatorException(**kwargs)

  Bases: `NeutronException`

  message = 'Synthetic field(s) %(fields)s undefined, misspelled, or otherwise invalid'

exception neutron_lib.objects.exceptions.NeutronPrimaryKeyMissing(object_class, missing_keys)

  Bases: `BadRequest`

  message = 'For class %(object_type)s missing primary keys: %(missing_keys)s'

exception neutron_lib.objects.exceptions.NeutronRangeConstrainedIntegerInvalidLimit(**kwargs)

  Bases: `NeutronException`

  message = 'Incorrect range limits specified: start = %(start)s, end = %(end)s'

exception neutron_lib.objects.exceptions.NeutronSyntheticFieldMultipleForeignKeys(**kwargs)

  Bases: `NeutronException`

  message = "Synthetic field %(field)s shouldn't have more than one foreign key"

exception neutron_lib.objects.exceptions.NeutronSyntheticFieldsForeignKeysNotFound(**kwargs)

  Bases: `NeutronException`

  message = '%(child)s does not define a foreign key for %(parent)s'

this page last updated: 2026-03-03 11:51:03

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug