diff --git a/nailgun/entities.py b/nailgun/entities.py index c4831768..3357590f 100644 --- a/nailgun/entities.py +++ b/nailgun/entities.py @@ -6901,7 +6901,7 @@ def path(self, which=None): class RegistrationCommand(Entity, EntityCreateMixin, EntityReadMixin): - """A representation of a Role entity.""" + """A representation of a Registration Command entity.""" def __init__(self, server_config=None, **kwargs): self._fields = { @@ -6953,6 +6953,20 @@ def read(self, entity=None, attrs=None, ignore=None, params=None): return attrs['registration_command'] +class RegistrationTokens(Entity, EntityCreateMixin, EntityReadMixin): + """A representation of a Registration Token entity.""" + + def __init__(self, server_config=None, **kwargs): + self._fields = { + 'organization': entity_fields.OneToOneField(Organization, required=True), + 'location': entity_fields.OneToOneField(Location, required=True), + 'search': entity_fields.StringField(default=''), + } + + self._meta = {'api_path': '/api/registration_tokens'} + super().__init__(server_config=server_config, **kwargs) + + class Report(Entity): """A representation of a Report entity."""