RedHatSatellite / ballista

Modular and easily extendable tool to manipulate Katello/Satellite 6
GNU General Public License v3.0
16 stars 10 forks source link

issue with remove #9

Closed jvdbeemt closed 7 years ago

jvdbeemt commented 7 years ago

Hi Yoram,

I think i found a issue with removing cv's:

Found: [{u'version': u'22.0', u'environment_ids': [1], u'id': 164, u'published': u'2016-09-14 15:51:01 UTC'}, {u'version': u'20.0', u'environment_ids': [5, 4, 6], u'id': 140, u'published': u'2016-09-06 12:27:56 UTC'}] Get latest version id Latest version id: {u'version': u'20.0', u'environment_ids': [5, 4, 6], u'id': 140, u'published': u'2016-09-06 12:27:56 UTC'} We are going to promote the latest version (id: 140, name: 0) to Dev Get environment id for Dev "GET /katello/api/v2/organizations/1/environments?page=1 HTTP/1.1" 200 660 "GET /katello/api/v2/organizations/1/environments?page=2 HTTP/1.1" 200 108 Environment id is 4

If i'm right then it should remove id 164 and not 140. Can you confirm?

yhekma commented 7 years ago

Hey @jvdbeemt can you give me the command you are executing? Looking at the output it seems you are promoting cv's, but you say you expect them to be removed, so I am not sure I understand the question

jvdbeemt commented 7 years ago

Hmm typo:) i meant promoting;

[root@lx-s001 ballista]# ./ballista.py -v -c kv.ini promote-cv Dev el7 Starting new HTTPS connection (1): lx-s001*** "GET /katello/api/v2/organizations HTTP/1.1" 200 277

verbose: True url: https://lx-s001* username: admin organization: ***** module: promote_cv Getting all content views "GET /katello/api/v2/organizations?page=1 HTTP/1.1" 200 277 "GET /katello/api/v2/organizations?page=2 HTTP/1.1" 200 113 "GET /katello/api/v2/organizations/1/content_views?page=1 HTTP/1.1" 200 3765 "GET /katello/api/v2/organizations/1/content_views?page=2 HTTP/1.1" 200 109 Get content view id of el7 ID is 7 Get all version ids "GET /katello/api/v2/organizations/1/content_views?page=1 HTTP/1.1" 200 3765 "GET /katello/api/v2/organizations/1/content_views?page=2 HTTP/1.1" 200 109 Found: [{u'version': u'22.0', u'environment_ids': [1], u'id': 164, u'published': u'2016-09-14 15:51:01 UTC'}, {u'version': u'20.0', u'environment_ids': [5, 4, 6], u'id': 140, u'published': u'2016-09-06 12:27:56 UTC'}] Get latest version id Latest version id: {u'version': u'20.0', u'environment_ids': [5, 4, 6], u'id': 140, u'published': u'2016-09-06 12:27:56 UTC'} We are going to promote the latest version (id: 140, name: 0) to Dev Get environment id for Dev "GET /katello/api/v2/organizations/1/environments?page=1 HTTP/1.1" 200 660 "GET /katello/api/v2/organizations/1/environments?page=2 HTTP/1.1" 200 108 Environment id is 4

So i would expect that the latest version get's promoted, instead it promotes v20. Can you elaborate?

yhekma commented 7 years ago

ah, I see. I will look into it and let you know

yhekma commented 7 years ago

@jvdbeemt Could you have a look and see if the issue is fixed in the dev branch? I do not have access to a development environment right now, so if it is not fixed it will have to wait until later this week I'm afraid

jvdbeemt commented 7 years ago

Thx! works like a charm:)

yhekma commented 7 years ago

Ok, great!