
--_000_4488206DC085244C886DBC9E7038B68918D382CEMTRDAG01mtlcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I'm using ovirt-sdk to attach and detach a network to a host's Interface. Once the network is attached to the interface I try to detach the network f= rom the interface using the following steps: 1.Detach the network from the cluster through the GUI. 2.Remove the network from the datacenter through the GUI. 3.Detach the network from the host's interface using the SDK: nic =3D api.hosts.get(name=3Dhost).nics.get(name=3Dif_name) net =3D params.Network(name=3Dnet_name) act =3D params.Action(network=3Dnet) nic.detach(act) api.hosts.get(name=3Dhost).commitnetconfig() Then I get the error: http://pastebin.com/3Md07huE The same flow using the GUI works fine. Network removal from the Datacenter is a trigger for me to run the detachme= nt operation therefore I use this flow. I use the following components: rhevm-3.0.2_0001-2 ovirt-sdk (Using the latest from git repository) Please advise how to proceed. Thanks, Itzik --_000_4488206DC085244C886DBC9E7038B68918D382CEMTRDAG01mtlcom_ 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-micr= osoft-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=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)"> <style><!-- /* Font Definitions */ @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:"Courrier New"; panose-1:0 0 0 0 0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; text-align:right; direction:rtl; unicode-bidi:embed; font-size:11.0pt; 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;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri","sans-serif";} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.WordSection1 {page:WordSection1;} --></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=3D"EN-US" link=3D"blue" vlink=3D"purple"> <div class=3D"WordSection1"> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Hi,<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">I'm using ovirt-sdk to attach and detach a network to a host's Inter= face.<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Once the network is attached to the interface I try to detach the ne= twork from the interface using the following steps:<span lang=3D"HE" dir=3D= "RTL" style=3D"font-family:"Arial","sans-serif""><o:p><= /o:p></span></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">1.Detach the network from the cluster through the GUI.<o:p></o:p></p=
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">2.Remove the network from the datacenter through the GUI.<o:p></o:p>= </p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">3.Detach the network from the host's interface using the SDK:<o:p></= o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi= on:ltr;unicode-bidi:embed"> <span style=3D"font-size:10.0pt;font-family:"Courrier New"">nic = =3D api.hosts.get(name=3Dhost).nics.get(name=3Dif_name)<span style=3D"color= :#404040;background:gray;mso-highlight:gray"><o:p></o:p></span></span></p> <p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi= on:ltr;unicode-bidi:embed"> <span style=3D"font-size:10.0pt;font-family:"Courrier New"">net = =3D params.Network(name=3Dnet_name)<span style=3D"color:#404040;background:= gray;mso-highlight:gray"><o:p></o:p></span></span></p> <p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi= on:ltr;unicode-bidi:embed"> <span style=3D"font-size:10.0pt;font-family:"Courrier New"">act = =3D params.Action(network=3Dnet)<span style=3D"color:#404040;background:gra= y;mso-highlight:gray"><o:p></o:p></span></span></p> <p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi= on:ltr;unicode-bidi:embed"> <span style=3D"font-size:10.0pt;font-family:"Courrier New"">nic.d= etach(act)<span style=3D"color:#404040;background:gray;mso-highlight:gray">= <o:p></o:p></span></span></p> <p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi= on:ltr;unicode-bidi:embed"> <span style=3D"font-size:10.0pt;font-family:"Courrier New"">api.h= osts.get(name=3Dhost).commitnetconfig()<span style=3D"color:#404040;backgro= und:gray;mso-highlight:gray"><o:p></o:p></span></span></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Then I get the error:<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><a href=3D"http://pastebin.com/3Md07huE">http://pastebin.com/3Md07hu= E</a><o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">The same flow using the GUI works fine.<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Network removal from the Datacenter is a trigger for me to run the d= etachment operation therefore I use this flow.<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">I use the following components:<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><span style=3D"font-size:10.0pt;font-family:"Courrier New"= ">rhevm-3.0.2_0001-2</span><o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">ovirt-sdk (Using the latest from git repository)<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Please advise how to proceed.<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Thanks,<o:p></o:p></p> <p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:= embed">Itzik<o:p></o:p></p> </div> </body> </html> --_000_4488206DC085244C886DBC9E7038B68918D382CEMTRDAG01mtlcom_--