def __init__(self, server_config=None, **kwargs): self._fields = { 'ignore_me': IntegerField(), 'many': OneToManyField(SampleEntity), 'none': OneToOneField(SampleEntity), 'one': OneToOneField(SampleEntity), } self._meta = {'api_path': ''} super(TestEntity, self).__init__(server_config, **kwargs)
class EntityWithRead(orm.Entity, orm.EntityReadMixin): """An entity which inherits from :class:`robottelo.orm.EntityReadMixin`.""" one_to_one = OneToOneField(SampleEntity) one_to_many = OneToManyField(SampleEntity) class Meta(object): """Non-field attributes for this entity.""" # (too-few-public-methods) pylint:disable=R0903 api_path = ''
def __init__(self, server_config=None, **kwargs): self._fields = { 'int': IntegerField(required=True), 'int_choices': IntegerField(choices=(1, 2), required=True), 'int_default': IntegerField(default=5, required=True), 'many': OneToManyField(SampleEntity, required=True), 'one': OneToOneField(SampleEntity, required=True), } super().__init__(server_config, **kwargs)
def __init__(self, server_config=None, **kwargs): self._fields = {'other': OneToOneField(SampleEntity)} super(TestEntity, self).__init__(server_config, **kwargs)
def __init__(self, server_config=None, **kwargs): self._fields = { 'one_to_one': OneToOneField(SampleEntityTwo), 'list': ListField() } super(SampleEntityThree, self).__init__(server_config, **kwargs)
def __init__(self, server_config=None, **kwargs): self._fields = { 'one': OneToOneField(SampleEntity), 'many': OneToManyField(SampleEntity), } super(EntityWithSearch2, self).__init__(server_config, **kwargs)