Bug 1206551

Summary: Missing requires of python-warlock
Product: [Community] RDO Reporter: Miroslav Suchý <msuchy>
Component: python-glanceclientAssignee: hguemar
Status: CLOSED CURRENTRELEASE QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: IcehouseCC: eglynn, fpercoco, yeylon
Target Milestone: ---   
Target Release: Kilo   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-30 22:59:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1206544    

Description Miroslav Suchý 2015-03-27 12:08:05 UTC
Description of problem:
I am using python-glanceclient in my own code for ansible filters, but when I try to execute it, I will get:

   File "/srv/web/infra/ansible/filter_plugins/openstack.py", line 45, in image_name_to_id
    glance = GlanceClient('2', endpoint=endpoint, token=token)
  File "/usr/lib/python2.6/site-packages/glanceclient/client.py", line 20, in Client
    module = utils.import_versioned_module(version, 'client')
  File "/usr/lib/python2.6/site-packages/glanceclient/common/utils.py", line 197, in import_versioned_module
    return importutils.import_module(module)
  File "/usr/lib/python2.6/site-packages/glanceclient/openstack/common/importutils.py", line 58, in import_module
    __import__(import_str)
  File "/usr/lib/python2.6/site-packages/glanceclient/v2/client.py", line 22, in <module>
    from glanceclient.v2 import schemas
  File "/usr/lib/python2.6/site-packages/glanceclient/v2/schemas.py", line 18, in <module>
    import warlock.model as warlock
ImportError: No module named model

So correct thing would be to put in python-glanceclient.spec:
 Requires: python-warlock

Version-Release number of selected component (if applicable):
  python-glanceclient-0.12.0-1.el6.noarch

How reproducible:
deterministic

Steps to Reproduce:
1. on bare machine install python-glanceclient
2. from python:
  from glanceclient  import Client as GlanceClient
  GlanceClient('2', endpoint=endpoint, token=token)

Actual results:
Traceback. See above.

Expected results:
No errors.

Comment 1 Miroslav Suchý 2015-03-27 12:19:45 UTC
Hmm there is the requirement. However on RHEL6 there is only 
  python-warlock-0.4.0-2.el6.noarch
which does not have warlock.model module.

So we need some higher version of python-warlock in icehouse repository.

Comment 2 Miroslav Suchý 2015-03-27 13:05:10 UTC
This seems to work for the time being:
https://copr.fedoraproject.org/coprs/msuchy/python-warlock/build/83425/

Comment 3 hguemar 2015-04-03 09:20:51 UTC
Fixed and submitted for inclusion in RDO repo.It only affects EL6
https://review.gerrithub.io/#/c/229138/