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

add arch param to CV Filter Rule #505

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

sean797
Copy link
Contributor

@sean797 sean797 commented Jun 28, 2018

No description provided.

@coveralls
Copy link

coveralls commented Jun 28, 2018

Coverage Status

Coverage remained the same at 97.668% when pulling 7e8d8d6 on sean797:cv-filter-arch into 8f2211a on SatelliteQE:master.

@oshtaier
Copy link
Contributor

oshtaier commented Jul 2, 2018

I am definitely see 'architecture': entity_fields.OneToOneField(Architecture) in application API:

architecture | package: architecture
optional       |  Validations:String

but see nothing that is similar to

'type': entity_fields.StringField(
    choices=('all', 'greater', 'equal', 'less', 'range'),
),

There is an erratum type variable, but it has other possible values:

types | erratum: types (enhancement, bugfix, security)
optional | Validations:Must be an array of any type

Choices provided by you looks more as a search criteria rather than entity possible variable

Do you use a new build? Or what was a source of information for that change?
Anyway, please provide console outputs of command execution for PR, so everyone can see what application returns and that no errors happen with these new changes

@sean797
Copy link
Contributor Author

sean797 commented Jul 2, 2018

Sorry, I did add info about type to the commit message (copied below) note there is type and types param confusing I know,. :/


More info on this param can be found in https://github.com/Katello/katello/blob/cdc03f0836cde3b41675fd4df13cc96048c333af/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter.factory.js#L29-L39

@oshtaier
Copy link
Contributor

oshtaier commented Jul 2, 2018

Thanks, I reviewed mentioned code
Still question is: Do we have application build where that code applied? And if we have, can you create rule using nailgun and provide output here? Like both GET and POST results as create() will subsequently call read()

@sean797
Copy link
Contributor Author

sean797 commented Jul 2, 2018

I'm in the middle of creating an ansible module for CV filters. See sean797/foreman-ansible-modules@ec86dca which you are welcome to test.

@sean797
Copy link
Contributor Author

sean797 commented Jul 23, 2018

@oshtaier okay if I remove type and we can merge this?
I don't strictly need type and would like this merged soon.

@sean797
Copy link
Contributor Author

sean797 commented Aug 2, 2018

updated, thanks.

@@ -1876,6 +1876,7 @@ def __init__(self, server_config=None, **kwargs):
'types': entity_fields.ListField(),
'version': entity_fields.StringField(),
'uuid': entity_fields.StringField(),
'architecture': entity_fields.OneToOneField(Architecture),
Copy link
Contributor

Choose a reason for hiding this comment

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

I am facing issue with this,

In [56]: arch[0]
Out[56]: nailgun.entities.Architecture(id=1, name=u'x86_64')
In [57]: entities.ContentViewFilterRule(server,content_view_filter=acvf,architecture=arch[0],name='test_arch1',version='2').create()
Out[57]: nailgun.entities.ContentViewFilterRule(version=u'2', name=u'test_arch1', id=7, content_view_filter=nailgun.entities.AbstractContentViewFilter(repository=[], inclusion=False, content_view=nailgun.entities.ContentView(id=20), description=None, type=u'rpm', id=8, name=u'qnplZzsAtK'))

Production log:

2018-08-03T09:42:07 [I|app|] Started POST "/katello/api/v2/content_view_filters/8/rules" for 10.67.116.203 at 2018-08-03 09:42:07 -0400
2018-08-03T09:42:07 [I|app|a3ad2] Processing by Katello::Api::V2::ContentViewFilterRulesController#create as */*
2018-08-03T09:42:07 [I|app|a3ad2]   Parameters: {"version"=>"2", "architecture_id"=>1, "name"=>"test_arch1", "content_view_filter_id"=>"8", "api_version"=>"v2", "content_view_filter_rule"=>{"version"=>"2", "architecture_id"=>1, "name"=>"test_arch1", "content_view_filter_id"=>"8"}}
2018-08-03T09:42:07 [I|app|a3ad2] Current user: foreman_admin (administrator)
2018-08-03T09:42:07 [I|app|a3ad2] Authorized user admin(Admin User)
2018-08-03T09:42:07 [I|app|a3ad2] Current user: admin (administrator)
2018-08-03T09:42:07 [I|app|a3ad2]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.7/app/views/katello/api/v2/common/create.json.rabl within katello/api/v2/layouts/resource
2018-08-03T09:42:07 [I|app|a3ad2]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.7/app/views/katello/api/v2/common/create.json.rabl within katello/api/v2/layouts/resource (3.4ms)
2018-08-03T09:42:07 [I|app|a3ad2] Completed 200 OK in 50ms (Views: 4.4ms | ActiveRecord: 12.0ms)
2018-08-03T09:42:32 [I|app|] Started GET "/katello/api/v2/content_view_filters/8/rules" for 10.67.116.203 at 2018-08-03 09:42:32 -0400
2018-08-03T09:42:32 [I|app|01e85] Processing by Katello::Api::V2::ContentViewFilterRulesController#index as */*
2018-08-03T09:42:32 [I|app|01e85]   Parameters: {"content_view_filter_id"=>"8", "api_version"=>"v2", "content_view_filter_rule"=>{"content_view_filter_id"=>"8"}}
2018-08-03T09:42:33 [I|app|01e85] Current user: foreman_admin (administrator)
2018-08-03T09:42:33 [I|app|01e85] Authorized user admin(Admin User)
2018-08-03T09:42:33 [I|app|01e85] Current user: admin (administrator)
2018-08-03T09:42:33 [I|app|01e85]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.7/app/views/katello/api/v2/content_view_filter_rules/index.json.rabl within katello/api/v2/layouts/collection
2018-08-03T09:42:33 [I|app|01e85]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.7/app/views/katello/api/v2/content_view_filter_rules/index.json.rabl within katello/api/v2/layouts/collection (16.6ms)

Filter is not able to associate the arch, I also checked from UI.
Looks like even though controller doesn't complain about taking in "architecture_id"=>1 , it still needs architecture as String.
I guess this would be a product issue?

@sean797
Copy link
Contributor Author

sean797 commented Aug 3, 2018

Thanks @san7ket I've updated to string, which I think it was originally.. Anyway:

>>> ContentViewFilterRule(server,content_view_filter=acvf,architecture='x86_64',name='bash').create()
nailgun.entities.ContentViewFilterRule(name=u'bash', id=11, architecture=u'x86_64', content_view_filter=nailgun.entities.AbstractContentViewFilter(repository=[], inclusion=True, content_view=nailgun.entities.ContentView(id=24), description=None, type=u'rpm', id=26, name=u'filer'))
>>> 

@san7ket
Copy link
Contributor

san7ket commented Aug 6, 2018

@abalakh @ldjebran can you guys take a look

Copy link
Contributor

@ldjebran ldjebran left a comment

Choose a reason for hiding this comment

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

ACK

@ldjebran ldjebran merged commit 39f6722 into SatelliteQE:master Aug 6, 2018
@ldjebran
Copy link
Contributor

ldjebran commented Aug 6, 2018

@sean797 many thanks.

san7ket added a commit to san7ket/nailgun that referenced this pull request Aug 17, 2018
Shortlog of commits since last release:

    Bernhard Suttner (1):
          Adding locked state to ptable (SatelliteQE#503)

    Evgeni Golov (1):
          ActivationKey: implement copying of AKs (SatelliteQE#517)

    Jitendra Yejare (2):
          Merge pull request SatelliteQE#523 from san7ket/update_pypi_maintainer
          Merge pull request SatelliteQE#524 from SatelliteQE/revert-521-master

    Lukas Hellebrandt (1):
          RHEV APIv4 feature: Add checkbox to select between API v4 and v3.

    Manuel Bonk (1):
          Fix docstring in read_raw (SatelliteQE#492)

    Nikhil Kathole (4):
          Revert "added ignorable_content for Repository"
          Merge pull request SatelliteQE#502 from SatelliteQE/revert-498-ignorable_content-repo-entity
          Merge pull request SatelliteQE#510 from jyejare/fix_smartparams
          Merge pull request SatelliteQE#509 from pondrejk/resubmit-ignorable-content

    Oleksandr Shtaier (1):
          Change password type for better support for UI tests (SatelliteQE#507)

    Peter Ondrejka (3):
          added ignorable_content for Repository
          added ignorable_content for Repository
          Revert "added ignorable_content for Repository"

    Sanket Jagtap (8):
          Merge pull request SatelliteQE#494 from jyejare/verify_ssl_repository
          Merge pull request SatelliteQE#504 from sean797/cv-filter-search
          Merge pull request SatelliteQE#506 from sean797/cv-filter-rule-errata
          Merge pull request SatelliteQE#521 from san7ket/master
          Revert "Release version 0.31.0"
          Merge pull request SatelliteQE#525 from san7ket/master
          Revert "Release version 0.31.0"
          Merge pull request SatelliteQE#526 from SatelliteQE/revert-525-master

    Sean O'Keeffe (4):
          allow searching Content View filters
          create, search & update ContentViewFilterRule should send errata_id not DB ID
          add PackageGroup Entity (SatelliteQE#508)
          add arch param to CV Filter Rule (SatelliteQE#505)

    jyejare (3):
          SSL verification option in Repository entity
          New Entities TemplateImport and TemplateExport
          Fix Override Value data syntax for smart class parameter and smart variable

    san7ket (3):
          Release version 0.31.0
          Updates the Pypi user for travis-ci
          Release version 0.31.0

    sghai (2):
          Merge pull request SatelliteQE#499 from jyejare/import_export_entity
          reverted locked state to ptable
rochacbruno pushed a commit that referenced this pull request Aug 17, 2018
Shortlog of commits since last release:

    Bernhard Suttner (1):
          Adding locked state to ptable (#503)

    Evgeni Golov (1):
          ActivationKey: implement copying of AKs (#517)

    Jitendra Yejare (2):
          Merge pull request #523 from san7ket/update_pypi_maintainer
          Merge pull request #524 from SatelliteQE/revert-521-master

    Lukas Hellebrandt (1):
          RHEV APIv4 feature: Add checkbox to select between API v4 and v3.

    Manuel Bonk (1):
          Fix docstring in read_raw (#492)

    Nikhil Kathole (4):
          Revert "added ignorable_content for Repository"
          Merge pull request #502 from SatelliteQE/revert-498-ignorable_content-repo-entity
          Merge pull request #510 from jyejare/fix_smartparams
          Merge pull request #509 from pondrejk/resubmit-ignorable-content

    Oleksandr Shtaier (1):
          Change password type for better support for UI tests (#507)

    Peter Ondrejka (3):
          added ignorable_content for Repository
          added ignorable_content for Repository
          Revert "added ignorable_content for Repository"

    Sanket Jagtap (8):
          Merge pull request #494 from jyejare/verify_ssl_repository
          Merge pull request #504 from sean797/cv-filter-search
          Merge pull request #506 from sean797/cv-filter-rule-errata
          Merge pull request #521 from san7ket/master
          Revert "Release version 0.31.0"
          Merge pull request #525 from san7ket/master
          Revert "Release version 0.31.0"
          Merge pull request #526 from SatelliteQE/revert-525-master

    Sean O'Keeffe (4):
          allow searching Content View filters
          create, search & update ContentViewFilterRule should send errata_id not DB ID
          add PackageGroup Entity (#508)
          add arch param to CV Filter Rule (#505)

    jyejare (3):
          SSL verification option in Repository entity
          New Entities TemplateImport and TemplateExport
          Fix Override Value data syntax for smart class parameter and smart variable

    san7ket (3):
          Release version 0.31.0
          Updates the Pypi user for travis-ci
          Release version 0.31.0

    sghai (2):
          Merge pull request #499 from jyejare/import_export_entity
          reverted locked state to ptable
sean797 added a commit to theforeman/foreman-ansible-modules that referenced this pull request Aug 20, 2018
lpramuk pushed a commit to lpramuk/nailgun that referenced this pull request Sep 26, 2023
lpramuk pushed a commit to lpramuk/nailgun that referenced this pull request Sep 26, 2023
Shortlog of commits since last release:

    Bernhard Suttner (1):
          Adding locked state to ptable (SatelliteQE#503)

    Evgeni Golov (1):
          ActivationKey: implement copying of AKs (SatelliteQE#517)

    Lukas Hellebrandt (1):
          RHEV APIv4 feature: Add checkbox to select between API v4 and v3.

    Manuel Bonk (1):
          Fix docstring in read_raw (SatelliteQE#492)

    Nikhil Kathole (4):
          Revert "added ignorable_content for Repository"
          Merge pull request SatelliteQE#502 from SatelliteQE/revert-498-ignorable_content-repo-entity
          Merge pull request SatelliteQE#510 from jyejare/fix_smartparams
          Merge pull request SatelliteQE#509 from pondrejk/resubmit-ignorable-content

    Oleksandr Shtaier (1):
          Change password type for better support for UI tests (SatelliteQE#507)

    Peter Ondrejka (3):
          added ignorable_content for Repository
          added ignorable_content for Repository
          Revert "added ignorable_content for Repository"

    Sanket Jagtap (3):
          Merge pull request SatelliteQE#494 from jyejare/verify_ssl_repository
          Merge pull request SatelliteQE#504 from sean797/cv-filter-search
          Merge pull request SatelliteQE#506 from sean797/cv-filter-rule-errata

    Sean O'Keeffe (4):
          allow searching Content View filters
          create, search & update ContentViewFilterRule should send errata_id not DB ID
          add PackageGroup Entity (SatelliteQE#508)
          add arch param to CV Filter Rule (SatelliteQE#505)

    jyejare (3):
          SSL verification option in Repository entity
          New Entities TemplateImport and TemplateExport
          Fix Override Value data syntax for smart class parameter and smart variable

    sghai (2):
          Merge pull request SatelliteQE#499 from jyejare/import_export_entity
          reverted locked state to ptable
lpramuk pushed a commit to lpramuk/nailgun that referenced this pull request Sep 26, 2023
Shortlog of commits since last release:

    Bernhard Suttner (1):
          Adding locked state to ptable (SatelliteQE#503)

    Evgeni Golov (1):
          ActivationKey: implement copying of AKs (SatelliteQE#517)

    Jitendra Yejare (2):
          Merge pull request SatelliteQE#523 from san7ket/update_pypi_maintainer
          Merge pull request SatelliteQE#524 from SatelliteQE/revert-521-master

    Lukas Hellebrandt (1):
          RHEV APIv4 feature: Add checkbox to select between API v4 and v3.

    Manuel Bonk (1):
          Fix docstring in read_raw (SatelliteQE#492)

    Nikhil Kathole (4):
          Revert "added ignorable_content for Repository"
          Merge pull request SatelliteQE#502 from SatelliteQE/revert-498-ignorable_content-repo-entity
          Merge pull request SatelliteQE#510 from jyejare/fix_smartparams
          Merge pull request SatelliteQE#509 from pondrejk/resubmit-ignorable-content

    Oleksandr Shtaier (1):
          Change password type for better support for UI tests (SatelliteQE#507)

    Peter Ondrejka (3):
          added ignorable_content for Repository
          added ignorable_content for Repository
          Revert "added ignorable_content for Repository"

    Sanket Jagtap (5):
          Merge pull request SatelliteQE#494 from jyejare/verify_ssl_repository
          Merge pull request SatelliteQE#504 from sean797/cv-filter-search
          Merge pull request SatelliteQE#506 from sean797/cv-filter-rule-errata
          Merge pull request SatelliteQE#521 from san7ket/master
          Revert "Release version 0.31.0"

    Sean O'Keeffe (4):
          allow searching Content View filters
          create, search & update ContentViewFilterRule should send errata_id not DB ID
          add PackageGroup Entity (SatelliteQE#508)
          add arch param to CV Filter Rule (SatelliteQE#505)

    jyejare (3):
          SSL verification option in Repository entity
          New Entities TemplateImport and TemplateExport
          Fix Override Value data syntax for smart class parameter and smart variable

    san7ket (2):
          Release version 0.31.0
          Updates the Pypi user for travis-ci

    sghai (2):
          Merge pull request SatelliteQE#499 from jyejare/import_export_entity
          reverted locked state to ptable
lpramuk pushed a commit to lpramuk/nailgun that referenced this pull request Sep 26, 2023
Shortlog of commits since last release:

    Bernhard Suttner (1):
          Adding locked state to ptable (SatelliteQE#503)

    Evgeni Golov (1):
          ActivationKey: implement copying of AKs (SatelliteQE#517)

    Jitendra Yejare (2):
          Merge pull request SatelliteQE#523 from san7ket/update_pypi_maintainer
          Merge pull request SatelliteQE#524 from SatelliteQE/revert-521-master

    Lukas Hellebrandt (1):
          RHEV APIv4 feature: Add checkbox to select between API v4 and v3.

    Manuel Bonk (1):
          Fix docstring in read_raw (SatelliteQE#492)

    Nikhil Kathole (4):
          Revert "added ignorable_content for Repository"
          Merge pull request SatelliteQE#502 from SatelliteQE/revert-498-ignorable_content-repo-entity
          Merge pull request SatelliteQE#510 from jyejare/fix_smartparams
          Merge pull request SatelliteQE#509 from pondrejk/resubmit-ignorable-content

    Oleksandr Shtaier (1):
          Change password type for better support for UI tests (SatelliteQE#507)

    Peter Ondrejka (3):
          added ignorable_content for Repository
          added ignorable_content for Repository
          Revert "added ignorable_content for Repository"

    Sanket Jagtap (8):
          Merge pull request SatelliteQE#494 from jyejare/verify_ssl_repository
          Merge pull request SatelliteQE#504 from sean797/cv-filter-search
          Merge pull request SatelliteQE#506 from sean797/cv-filter-rule-errata
          Merge pull request SatelliteQE#521 from san7ket/master
          Revert "Release version 0.31.0"
          Merge pull request SatelliteQE#525 from san7ket/master
          Revert "Release version 0.31.0"
          Merge pull request SatelliteQE#526 from SatelliteQE/revert-525-master

    Sean O'Keeffe (4):
          allow searching Content View filters
          create, search & update ContentViewFilterRule should send errata_id not DB ID
          add PackageGroup Entity (SatelliteQE#508)
          add arch param to CV Filter Rule (SatelliteQE#505)

    jyejare (3):
          SSL verification option in Repository entity
          New Entities TemplateImport and TemplateExport
          Fix Override Value data syntax for smart class parameter and smart variable

    san7ket (3):
          Release version 0.31.0
          Updates the Pypi user for travis-ci
          Release version 0.31.0

    sghai (2):
          Merge pull request SatelliteQE#499 from jyejare/import_export_entity
          reverted locked state to ptable
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.

5 participants