Add DomainMaster Object to designate objects

Change-Id: I60dbe23be0d6f2ea6b6f3f9d7bd26ce2e2f7686f
This commit is contained in:
Graham Hayes
2015-07-21 15:05:29 +01:00
parent d602a6421c
commit ea4b054ac6
14 changed files with 371 additions and 87 deletions

View File

@@ -40,6 +40,18 @@ class RelationNotLoaded(Base):
error_code = 500
error_type = 'relation_not_loaded'
def __init__(self, *args, **kwargs):
self.relation = kwargs.pop('relation', None)
super(RelationNotLoaded, self).__init__(*args, **kwargs)
self.error_message = "%(relation)s is not loaded on %(object)s" % \
{"relation": self.relation, "object": self.object.obj_name()}
def __str__(self):
return self.error_message
class AdapterNotFound(Base):
error_code = 500
@@ -318,6 +330,10 @@ class DomainNotFound(NotFound):
error_type = 'domain_not_found'
class DomainMasterNotFound(NotFound):
error_type = 'domain_master_not_found'
class DomainAttributeNotFound(NotFound):
error_type = 'domain_attribute_not_found'