[Engine-devel] about ovirt-engine-sdk

ÕâÊÇÒ»·â MIME žñÊœµÄ¶à²¿·ÖÓÊŒþ¡£ ------=_NextPart_000_0010_01CE4723.57308C70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi,all How can I use overt-engine-sdk in the python environment below python2.7, For example, when I use it in python 2.6.5 like thus: percy@percy-desktop:~/thtf-client$ python --version Python 2.6.5 percy@percy-desktop:~/thtf-client$ python Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, None, True)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "ovirtsdk/api.py", line 107, in __init__ url='/api') File "ovirtsdk/infrastructure/proxy.py", line 129, in request last=last) File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest return params.parseString(response_body) if response_body is not None and response_body is not '' \ File "ovirtsdk/xml/params.py", line 21229, in parseString rootObj.build(rootNode) File "ovirtsdk/xml/params.py", line 20304, in build self.buildAttributes(node, node.attrib, []) File "ovirtsdk/xml/params.py", line 20309, in buildAttributes super(API, self).buildAttributes(node, attrs, already_processed) File "ovirtsdk/xml/params.py", line 4160, in buildAttributes value = find_attr_value_('xsi:type', node) File "ovirtsdk/xml/params.py", line 316, in find_attr_value_ namespace = node.nsmap.get(prefix) AttributeError: nsmap
But, when I use it in python 2.7.3, it's ok leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
------=_NextPart_000_0010_01CE4723.57308C70 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; text-align:justify; font-size:10.5pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"\6279\6CE8\6846\6587\672C Char"; margin:0cm; margin-bottom:.0001pt; text-align:justify; font-size:9.0pt; font-family:"Calibri","sans-serif";} span.Char {mso-style-name:"\6279\6CE8\6846\6587\672C Char"; mso-style-priority:99; mso-style-link:\6279\6CE8\6846\6587\672C;} span.EmailStyle19 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:windowtext;} span.EmailStyle20 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3DZH-CN link=3Dblue vlink=3Dpurple = style=3D'text-justify-trim:punctuation'> <div class=3DSection1> <p class=3DMsoNormal><span lang=3DEN-US>Hi,all<o:p></o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US> How can I use overt-engine-sdk in the python environment below = python2.7,<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>For example, when I use it in = python 2.6.5 like thus:<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US>percy@percy-desktop:~/thtf-client$ python --version<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>Python = 2.6.5<o:p></o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US>percy@percy-desktop:~/thtf-client$ = python<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>Python 2.6.5 (r265:79063, = Oct 1 2012, 22:04:36) <o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>[GCC 4.4.3] on = linux2<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>Type "help", "copyright", "credits" or "license" for = more information.<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>>>> from ovirtsdk.api = import API<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>>>> from ovirtsdk.xml = import params<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>>>> api =3D API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, None, True)<o:p></o:p></span></p> <p class=3DMsoNormal><b><span lang=3DEN-US>Traceback (most recent call = last):<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File = "<stdin>", line 1, in <module><o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File = "ovirtsdk/api.py", line 107, in __init__<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> = url=3D'/api')<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/infrastructure/proxy.py", line 129, in = request<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> = last=3Dlast)<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/infrastructure/proxy.py", line 171, in = __doRequest<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> return params.parseString(response_body) if response_body is not None and response_body is not '' \<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/xml/params.py", line 21229, in = parseString<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> rootObj.build(rootNode)<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/xml/params.py", line 20304, in = build<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> self.buildAttributes(node, node.attrib, [])<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/xml/params.py", line 20309, in = buildAttributes<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> super(API, self).buildAttributes(node, attrs, = already_processed)<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/xml/params.py", line 4160, in = buildAttributes<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> value =3D find_attr_value_('xsi:type', node)<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> File "ovirtsdk/xml/params.py", line 316, in = find_attr_value_<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US> namespace = =3D node.nsmap.get(prefix)<o:p></o:p></span></b></p> <p class=3DMsoNormal><b><span lang=3DEN-US>AttributeError: = nsmap</span></b><span lang=3DEN-US><o:p></o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US>>>><o:p> </o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>But, when I use it in python = 2.7.3, it’s ok<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US>leaboy@leaboy:~/workspace/thtf-client$ python --version<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>Python = 2.7.3<o:p></o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US>leaboy@leaboy:~/workspace/thtf-client$ python<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>Python 2.7.3 (default, Aug = 1 2012, 05:16:07) <o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>[GCC 4.6.3] on = linux2<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>Type "help", "copyright", "credits" or "license" for = more information.<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>>>> from ovirtsdk.api = import API<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>>>> from ovirtsdk.xml = import params<o:p></o:p></span></p> <p class=3DMsoNormal><span lang=3DEN-US>>>> api =3D API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)<o:p></o:p></span></p> <p class=3DMsoNormal><span = lang=3DEN-US>>>><o:p> </o:p></span></p> </div> </body> </html> ------=_NextPart_000_0010_01CE4723.57308C70--

Hi, On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not None and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
But, when I use it in python 2.7.3, it’s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
-- Michael Pasternak RedHat, ENG-Virtualization R&D

The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example, leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3 But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work, -----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 14:19 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: about ovirt-engine-sdk Hi, On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not None
and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
But, when I use it in python 2.7.3, it¡¯s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)
-- Michael Pasternak RedHat, ENG-Virtualization R&D

On 05/02/2013 11:06 AM, leaboy@126 wrote:
The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example,
you should be installing sdk in some way, cause just fetching it from the git, wasn't make it available in python, i suggest you installing official releases (unless you would like to develop & contribute) from pypi/easy_install.
leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3
But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work,
i just verified it on [1], not sure about embed linux, in any case to make it work, lxml should be installed. [1] python 2.6.6 python-lxml-2.2.3-1
-----邮件原件----- 发件人: Michael Pasternak [mailto:mpastern@redhat.com] 发送时间: 2013年5月2日 14:19 收件人: leaboy@126 抄送: engine-devel@ovirt.org 主题: Re: about ovirt-engine-sdk
Hi,
On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not None
and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
But, when I use it in python 2.7.3, it’s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)
-- Michael Pasternak RedHat, ENG-Virtualization R&D

Thinks, I just missing lxml. When I installed lxml , it works well. -----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 16:23 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: ŽðžŽ: about ovirt-engine-sdk On 05/02/2013 11:06 AM, leaboy@126 wrote:
The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example,
you should be installing sdk in some way, cause just fetching it from the git, wasn't make it available in python, i suggest you installing official releases (unless you would like to develop & contribute) from pypi/easy_install.
leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3
But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work,
i just verified it on [1], not sure about embed linux, in any case to make it work, lxml should be installed. [1] python 2.6.6 python-lxml-2.2.3-1
-----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 14:19 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: about ovirt-engine-sdk
Hi,
On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not
None
and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
But, when I use it in python 2.7.3, it¡¯s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)
-- Michael Pasternak RedHat, ENG-Virtualization R&D

On 05/02/2013 12:17 PM, leaboy@126 wrote:
Thinks, I just missing lxml. When I installed lxml , it works well.
isn't it a dependency of the rpm?
-----邮件原件----- 发件人: Michael Pasternak [mailto:mpastern@redhat.com] 发送时间: 2013年5月2日 16:23 收件人: leaboy@126 抄送: engine-devel@ovirt.org 主题: Re: 答复: about ovirt-engine-sdk
On 05/02/2013 11:06 AM, leaboy@126 wrote:
The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example,
you should be installing sdk in some way, cause just fetching it from the git, wasn't make it available in python,
i suggest you installing official releases (unless you would like to develop & contribute) from pypi/easy_install.
leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3
But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work,
i just verified it on [1], not sure about embed linux, in any case to make it work, lxml should be installed.
[1] python 2.6.6 python-lxml-2.2.3-1
-----邮件原件----- 发件人: Michael Pasternak [mailto:mpastern@redhat.com] 发送时间: 2013年5月2日 14:19 收件人: leaboy@126 抄送: engine-devel@ovirt.org 主题: Re: about ovirt-engine-sdk
Hi,
On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not
None
and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
But, when I use it in python 2.7.3, it’s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)

I get the lxml code from http://lxml.de/2.3/#old-versions And build it use : python setup.py build in the directory lxml-2.2.3/build/lib.linux-armv71-2.6/ Copy the lxml to /usr/lib/python2.6/ -----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Itamar Heim [mailto:iheim@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ3ÈÕ 4:46 ÊÕŒþÈË: leaboy@126 ³ËÍ: 'Michael Pasternak'; engine-devel@ovirt.org Ö÷Ìâ: Re: [Engine-devel] ŽðžŽ: ŽðžŽ: about ovirt-engine-sdk On 05/02/2013 12:17 PM, leaboy@126 wrote:
Thinks, I just missing lxml. When I installed lxml , it works well.
isn't it a dependency of the rpm?
-----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 16:23 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: ŽðžŽ: about ovirt-engine-sdk
On 05/02/2013 11:06 AM, leaboy@126 wrote:
The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example,
you should be installing sdk in some way, cause just fetching it from the git, wasn't make it available in python,
i suggest you installing official releases (unless you would like to
& contribute) from pypi/easy_install.
leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3
But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work,
i just verified it on [1], not sure about embed linux, in any case to make it work, lxml should be installed.
[1] python 2.6.6 python-lxml-2.2.3-1
-----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 14:19 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: about ovirt-engine-sdk
Hi,
On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below
develop python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not
None and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
But, when I use it in python 2.7.3, it¡¯s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API
from ovirtsdk.xml import params
api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)

On 05/02/2013 11:45 PM, Itamar Heim wrote:
On 05/02/2013 12:17 PM, leaboy@126 wrote:
Thinks, I just missing lxml. When I installed lxml , it works well.
isn't it a dependency of the rpm?\
it is, this why i was wondering how sdk was installed.
-----邮件原件----- 发件人: Michael Pasternak [mailto:mpastern@redhat.com] 发送时间: 2013年5月2日 16:23 收件人: leaboy@126 抄送: engine-devel@ovirt.org 主题: Re: 答复: about ovirt-engine-sdk
On 05/02/2013 11:06 AM, leaboy@126 wrote:
The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example,
you should be installing sdk in some way, cause just fetching it from the git, wasn't make it available in python,
i suggest you installing official releases (unless you would like to develop & contribute) from pypi/easy_install.
leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111', None, None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3
But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work,
i just verified it on [1], not sure about embed linux, in any case to make it work, lxml should be installed.
[1] python 2.6.6 python-lxml-2.2.3-1
-----邮件原件----- 发件人: Michael Pasternak [mailto:mpastern@redhat.com] 发送时间: 2013年5月2日 14:19 收件人: leaboy@126 抄送: engine-devel@ovirt.org 主题: Re: about ovirt-engine-sdk
Hi,
On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> from ovirtsdk.api import API
> from ovirtsdk.xml import params
> api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not
None
and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
>
But, when I use it in python 2.7.3, it’s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> from ovirtsdk.api import API
> from ovirtsdk.xml import params
> api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)
>
-- Michael Pasternak RedHat, ENG-Virtualization R&D

If I used setup.py, I could find missing lxml, ^_^ Thinks! -----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ5ÈÕ 15:05 ÊÕŒþÈË: Itamar Heim ³ËÍ: leaboy@126; engine-devel@ovirt.org Ö÷Ìâ: Re: [Engine-devel] ŽðžŽ: ŽðžŽ: about ovirt-engine-sdk On 05/02/2013 11:45 PM, Itamar Heim wrote:
On 05/02/2013 12:17 PM, leaboy@126 wrote:
Thinks, I just missing lxml. When I installed lxml , it works well.
isn't it a dependency of the rpm?\
it is, this why i was wondering how sdk was installed.
-----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 16:23 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: ŽðžŽ: about ovirt-engine-sdk
On 05/02/2013 11:06 AM, leaboy@126 wrote:
The code I got in 2013-1-27 with git, I don't know which version I got, I didn't install it , I just use it like the example,
you should be installing sdk in some way, cause just fetching it from the git, wasn't make it available in python,
i suggest you installing official releases (unless you would like to
develop
& contribute) from pypi/easy_install.
leaboy@leaboy:~/workspace/thtf-client$ python --version Python 2.7.3 leaboy@leaboy:~/workspace/thtf-client$ python Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from ovirtsdk.api import API from ovirtsdk.xml import params api = API('http://192.168.1.181', 'admin@internal', '111111',
None,
None, '~/.spicec/ca.crt', None, True)
I use it successful in ubuntu 12.04 without any other operation, Just import the modules with python 2.7.3
But when I use it in other OS, such as ubuntu 11, or embed linux for ARM, With python 2.6.*, It does't work,
i just verified it on [1], not sure about embed linux, in any case to make it work, lxml should be installed.
[1] python 2.6.6 python-lxml-2.2.3-1
-----ÓÊŒþÔŒþ----- ·¢ŒþÈË: Michael Pasternak [mailto:mpastern@redhat.com] ·¢ËÍʱŒä: 2013Äê5ÔÂ2ÈÕ 14:19 ÊÕŒþÈË: leaboy@126 ³ËÍ: engine-devel@ovirt.org Ö÷Ìâ: Re: about ovirt-engine-sdk
Hi,
On 05/02/2013 05:53 AM, leaboy@126 wrote:
Hi,all
How can I use overt-engine-sdk in the python environment below python2.
7,
For example, when I use it in python 2.6.5 like thus:
what sdk version you're using? how did you installed it? what version of lxml you have installed?
percy@percy-desktop:~/thtf-client$ python --version
Python 2.6.5
percy@percy-desktop:~/thtf-client$ python
Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> from ovirtsdk.api import API
> from ovirtsdk.xml import params
> api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, None, True)
*Traceback (most recent call last):*
* File "<stdin>", line 1, in <module>*
* File "ovirtsdk/api.py", line 107, in __init__*
* url='/api')*
* File "ovirtsdk/infrastructure/proxy.py", line 129, in request*
* last=last)*
* File "ovirtsdk/infrastructure/proxy.py", line 171, in __doRequest*
* return params.parseString(response_body) if response_body is not
None and response_body is not '' \*
* File "ovirtsdk/xml/params.py", line 21229, in parseString*
* rootObj.build(rootNode)*
* File "ovirtsdk/xml/params.py", line 20304, in build*
* self.buildAttributes(node, node.attrib, [])*
* File "ovirtsdk/xml/params.py", line 20309, in buildAttributes*
* super(API, self).buildAttributes(node, attrs, already_processed)*
* File "ovirtsdk/xml/params.py", line 4160, in buildAttributes*
* value = find_attr_value_('xsi:type', node)*
* File "ovirtsdk/xml/params.py", line 316, in find_attr_value_*
* namespace = node.nsmap.get(prefix)*
*AttributeError: nsmap*
>
But, when I use it in python 2.7.3, it¡¯s ok
leaboy@leaboy:~/workspace/thtf-client$ python --version
Python 2.7.3
leaboy@leaboy:~/workspace/thtf-client$ python
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
> from ovirtsdk.api import API
> from ovirtsdk.xml import params
> api = API('http://192.168.1.181', 'admin@internal', '111111', None,
None, '~/.spicec/ca.crt', None, True)
>
-- Michael Pasternak RedHat, ENG-Virtualization R&D
participants (3)
-
Itamar Heim
-
leaboy@126
-
Michael Pasternak