Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Filters field in Role entity #459

Merged
merged 1 commit into from
Nov 22, 2017

Conversation

jyejare
Copy link
Member

@jyejare jyejare commented Nov 22, 2017

$subject

@oshtaier
Copy link
Contributor

add a quick example as we usually do in nailgun PRs like the field is returned in POST or GET queries

@jyejare
Copy link
Member Author

jyejare commented Nov 22, 2017

For test results please look at -> SatelliteQE/robottelo#5592 (comment)

@coveralls
Copy link

coveralls commented Nov 22, 2017

Coverage Status

Coverage remained the same at 98.671% when pulling e8689d1 on jyejare:filter_field_in_role into 6a5a02c on SatelliteQE:master.

@jyejare
Copy link
Member Author

jyejare commented Nov 22, 2017

@oshtaier ,

In [12]: entities.Role(id=2).read()
Out[12]: nailgun.entities.Role(location=[], filters=[nailgun.entities.Filter(id=40), nailgun.entities.Filter(id=41), nailgun.entities.Filter(id=42), nailgun.entities.Filter(id=43), nailgun.entities.Filter(id=44), nailgun.entities.Filter(id=45), nailgun.entities.Filter(id=46), nailgun.entities.Filter(id=47), nailgun.entities.Filter(id=48), nailgun.entities.Filter(id=49), nailgun.entities.Filter(id=50), nailgun.entities.Filter(id=51), nailgun.entities.Filter(id=52), nailgun.entities.Filter(id=53), nailgun.entities.Filter(id=54), nailgun.entities.Filter(id=55), nailgun.entities.Filter(id=56), nailgun.entities.Filter(id=57), nailgun.entities.Filter(id=58), nailgun.entities.Filter(id=59), nailgun.entities.Filter(id=60), nailgun.entities.Filter(id=61), nailgun.entities.Filter(id=62), nailgun.entities.Filter(id=63), nailgun.entities.Filter(id=64), nailgun.entities.Filter(id=65), nailgun.entities.Filter(id=66), nailgun.entities.Filter(id=67), nailgun.entities.Filter(id=68), nailgun.entities.Filter(id=69), nailgun.entities.Filter(id=70), nailgun.entities.Filter(id=71), nailgun.entities.Filter(id=72), nailgun.entities.Filter(id=73), nailgun.entities.Filter(id=74), nailgun.entities.Filter(id=75), nailgun.entities.Filter(id=76), nailgun.entities.Filter(id=77), nailgun.entities.Filter(id=150), nailgun.entities.Filter(id=151), nailgun.entities.Filter(id=152), nailgun.entities.Filter(id=157), nailgun.entities.Filter(id=158), nailgun.entities.Filter(id=179), nailgun.entities.Filter(id=180), nailgun.entities.Filter(id=181), nailgun.entities.Filter(id=182), nailgun.entities.Filter(id=208), nailgun.entities.Filter(id=218), nailgun.entities.Filter(id=219), nailgun.entities.Filter(id=220), nailgun.entities.Filter(id=221), nailgun.entities.Filter(id=222), nailgun.entities.Filter(id=223), nailgun.entities.Filter(id=224), nailgun.entities.Filter(id=225), nailgun.entities.Filter(id=240), nailgun.entities.Filter(id=260), nailgun.entities.Filter(id=261), nailgun.entities.Filter(id=262), nailgun.entities.Filter(id=263)], organization=[], id=2, name=u'Organization admin')

In [13]: entities.Role(name='jitenRole').create()
Out[13]: nailgun.entities.Role(location=[], filters=[], organization=[], id=55, name=u'jitenRole')

Copy link
Contributor

@abalakh abalakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@@ -5586,6 +5586,7 @@ def __init__(self, server_config=None, **kwargs):
),
'location': entity_fields.OneToManyField(Location),
'organization': entity_fields.OneToManyField(Organization),
'filters': entity_fields.OneToManyField(Filter),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, btw, please sort fields alphabetically

@jyejare jyejare force-pushed the filter_field_in_role branch from e8689d1 to 434c52f Compare November 22, 2017 11:57
@jyejare
Copy link
Member Author

jyejare commented Nov 22, 2017

@abalakh , Sorted alphabetically!

@coveralls
Copy link

coveralls commented Nov 22, 2017

Coverage Status

Coverage remained the same at 98.671% when pulling 434c52f on jyejare:filter_field_in_role into 6a5a02c on SatelliteQE:master.

Copy link
Contributor

@oshtaier oshtaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@oshtaier oshtaier merged commit 5c388e8 into SatelliteQE:master Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants