<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        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:"\@宋体";
        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;
        font-size:12.0pt;
        font-family:宋体;}
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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=ZH-CN link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi, Jarod. W:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'> I got your demo, and a build libcurl, but I can’t get
any info<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>from https://{ovirt-engine }/api .<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>my code like this:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>int
main(void)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>{<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
CURL *curl;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
CURLcode res;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl = curl_easy_init();<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
if (curl)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
{<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
printf("enter....\n");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl_easy_setopt(curl, CURLOPT_URL, "<b>https://192.168.1.201/api</b>");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callback_func);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl_easy_setopt(curl, CURLOPT_USERPWD, "<b>admin@internal:111111</b>");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl_easy_setopt(curl, CURLOPT_CAINFO,"<b>/tmp/ca.crt</b>");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl_easy_perform(curl);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
printf("exit.....\n");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
curl_easy_cleanup(curl);<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>
return 0;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>And
when I run it, just outpu :<o:p></o:p></span></p>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt;font-family:
"Calibri","sans-serif"'>enter....<o:p></o:p></span></b></p>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.5pt;font-family:
"Calibri","sans-serif"'>exit.....<o:p></o:p></span></b></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>I
got the libcurl from <a
href="http://curl.haxx.se/download.html%20and%20chosed%20curl-7.30.0.tar.gz">http://curl.haxx.se/download.html
and chosed curl-7.30.0.tar.gz</a><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>and
I use make and make install without any other options . I just guess maybe it
need<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif"'>other
SSL library supported, but I don’t know how and which .<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt'>发件人<span lang=EN-US>:</span></span></b><span
lang=EN-US style='font-size:10.0pt'> Jarod. w [mailto:work.iec23801@gmail.com] <br>
</span><b><span style='font-size:10.0pt'>发送时间<span lang=EN-US>:</span></span></b><span
lang=EN-US style='font-size:10.0pt'> 2013</span><span style='font-size:10.0pt'>年<span
lang=EN-US>6</span>月<span lang=EN-US>4</span>日<span lang=EN-US> 18:14<br>
</span><b>收件人<span lang=EN-US>:</span></b><span lang=EN-US> wlbleaboy@126<br>
</span><b>抄送<span lang=EN-US>:</span></b><span lang=EN-US>
engine-devel@ovirt.org<br>
</span><b>主题<span lang=EN-US>:</span></b><span lang=EN-US> Re: </span>答复<span
lang=EN-US>: [Engine-devel] ovirt-engine-sdk with C<o:p></o:p></span></span></p>
</div>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span lang=EN-US>2013/6/4 wlbleaboy@126 <<a
href="mailto:wlbleaboy@126.com" target="_blank">wlbleaboy@126.com</a>><o:p></o:p></span></p>
<div>
<div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-size:10.0pt'>Hi, Jarod. W:</span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-size:10.0pt'> Yes, I just want to </span><span
lang=EN-US>use c to invoke ovirt engine RestAPI,<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>Just get vm</span>’<span lang=EN-US>s id, host, port, secur-port,
and ticket,<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> How can I use libcurl to connect https, could
give me<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>a simple demo to connect <a href="https://%7bovirt-engine%7d/api"
target="_blank">https://{ovirt-engine}/api</a> with <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>--cafile, the ca.crt I get from <a
href="http://%7bovirt-engine%7d/ca.crt" target="_blank">http://{ovirt-engine}/ca.crt</a><o:p></o:p></span></p>
</div>
</div>
</blockquote>
<div>
<p class=MsoNormal><span lang=EN-US>Please download the demo from the above
url:<br>
<a href="https://github.com/jarod-w/hglibraries/blob/master/demo/restapi.c">https://github.com/jarod-w/hglibraries/blob/master/demo/restapi.c</a><br>
<o:p></o:p></span></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span
style='font-size:10.0pt'>发件人<span lang=EN-US>:</span></span></b><span
lang=EN-US style='font-size:10.0pt'> Jarod. w [mailto:<a
href="mailto:work.iec23801@gmail.com" target="_blank">work.iec23801@gmail.com</a>]
<br>
</span><b><span style='font-size:10.0pt'>发送时间<span lang=EN-US>:</span></span></b><span
lang=EN-US style='font-size:10.0pt'> 2013</span><span style='font-size:10.0pt'>年<span
lang=EN-US>5</span>月<span lang=EN-US>14</span>日<span lang=EN-US> 10:27<br>
</span><b>收件人<span lang=EN-US>:</span></b><span lang=EN-US> leaboy@126<br>
</span><b>抄送<span lang=EN-US>:</span></b><span lang=EN-US> <a
href="mailto:engine-devel@ovirt.org" target="_blank">engine-devel@ovirt.org</a><br>
</span><b>主题<span lang=EN-US>:</span></b><span lang=EN-US> Re: [Engine-devel]
ovirt-engine-sdk with C</span></span><span lang=EN-US><o:p></o:p></span></p>
</div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>2013/5/13 leaboy@126 <<a href="mailto:wlbleaboy@126.com"
target="_blank">wlbleaboy@126.com</a>><o:p></o:p></span></p>
<div>
<div>
<blockquote style='border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204,204,204)'>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>Hi</span>,<span lang=EN-US>All<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> I felt
oivrt-engine-sdk coded with Python is slowly to connect<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>ovirt-engine and console vm when a user have many vms, So, I just<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>want to rewrite the sdk with C(ANSI C Language). Just rewrite a sdk<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>with C to connect overt-engine and console vm, would anyone give <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>me some suggestion.<o:p></o:p></span></p>
</div>
</div>
</blockquote>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>Do you want to use c to invoke ovirt engine RestAPI, right?<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
lang=EN-US>If yes, you can use libcurl to do the thing, and it'll make you
happy.<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>
</div>
<blockquote style='border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204,204,204)'>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> Now, the problem is
how can I connect to ovit-engine with C, and<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>how can I get some information of vms, and how ovirrt-engine can <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>respond my action(start,stop, .eg)<o:p></o:p></span></p>
</div>
</div>
</blockquote>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>Agree with Michael Pasternak.<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>You should parse your code into the mail list, or someone can't help<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>you.<o:p></o:p></span></p>
</div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>
</div>
<blockquote style='border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204,204,204)'>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US> <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>
Leaboy@beijing<o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US>
Thinks<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
lang=EN-US><br>
_______________________________________________<br>
Engine-devel mailing list<br>
<a href="mailto:Engine-devel@ovirt.org" target="_blank">Engine-devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/engine-devel" target="_blank">http://lists.ovirt.org/mailman/listinfo/engine-devel</a><o:p></o:p></span></p>
</blockquote>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US><br>
<br clear=all>
<br>
-- <br>
---<br>
Best Regards<br>
Jarod.W<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class=MsoNormal><span lang=EN-US><br>
<br clear=all>
<br>
-- <br>
---<br>
Best Regards<br>
Jarod.W<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>