problem setting up bonding via rest in ovirt 3.6.6.2

--j9oOhf6Grf0fFqlEVUxQMWAcfqJklkQI7 Content-Type: multipart/mixed; boundary="T7QE2T6V8U03TuXieVjo1CtXdRsCW5TA8" From: Sven Kieske <s.kieske@mittwald.de> To: users@ovirt.org Cc: devel <devel@ovirt.org> Message-ID: <69e3d02d-ac52-37d7-e8f6-5bc8be8c0d40@mittwald.de> X-Authenticated-mymxserver.com: Yes Subject: problem setting up bonding via rest in ovirt 3.6.6.2 --T7QE2T6V8U03TuXieVjo1CtXdRsCW5TA8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I'd like to setup host network in the following way: I have 4 interfaces: eth0, eno1, eno2, eno3 ovirtmgmt network resides on eth0 and is working. Now I want to setup a bonding with the slave interfaces eno2 and eno3 via the hosts "setupnetworks" function: URL: https://engine-fqdn/api/hosts/9cdcc85b-dd87-4dcf-9275-b993ee5b5e9c/nics/s= etupnetworks Request: { "modified_bonds": { "host_nic": [{ "name": "bond0", "bonding": { "options": { "option": [{ "name": "mode", "value": "1" }, { "name": "miimon", "value": "100" }] }, "slaves": { "host_nic": [{ "name": "eno2" }, { "name": "eno3" }] } } }] } } Response from ovirt-engine: <?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?> <fault> <reason>Incomplete parameters</reason> <detail>Action [hostNics] required for setupNetworks</detail> </fault> When I look at the rsdl docs this seems perfectly fine. I tried google with this error condition but it didn't return anything useful unfortunately. Your help would be greatly appreciated. The official RH docs also do not mention anything else: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtuali= zation/3.6/html-single/REST_API_Guide/index.html#Multiple_Network_Setup_A= ction https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtuali= zation/3.6/html-single/REST_API_Guide/index.html#Bonded_Interfaces Also this tool doesn't seem to mention anything else: https://jhernand.fedorapeople.org/ovirt-api-explorer/#/services/host/meth= ods/setup_networks --=20 Mit freundlichen Gr=C3=BC=C3=9Fen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG K=C3=B6nigsberger Stra=C3=9Fe 6 32339 Espelkamp T: +495772 293100 F: +495772 293333 https://www.mittwald.de Gesch=C3=A4ftsf=C3=BChrer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhause= n Komplement=C3=A4rin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oey= nhausen --T7QE2T6V8U03TuXieVjo1CtXdRsCW5TA8-- --j9oOhf6Grf0fFqlEVUxQMWAcfqJklkQI7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXqfNTAAoJEMby9TMDAbQR9NwQAJ4xm0JeDqRnjW8DuAae6wCz RLWbGMyhn5jqcL7bRQAU/oppW0FAFGo+So72kwvX29AkII+qRZJnHyHWMo6nnO3s XnCR23uAk33KH02jmyzVNq9cA6VmckTHX3CWU6cq6WxTA8jhDKNSu7SLkUvOD3/u pUDGNvoYZJTsN2DU6qQJiROMkIu+zgm0LF9RXKdVcA+tE1G9XuOwz+QBqgAfiWgc bCD3mWIF+OBfwQoN1GIhe7sxZm3TxJs+Y7UtpotN/hYULXIJffsjU/Lo6e5pEYJY aPIfPUscPlAr51alEiR11zN9pgzhShqvRW61GHxsxkxTXPn8JVsch2uD4sCe8pQn 8C8Tz9+gdq0tM/gvM3nyYTIcHmMr7ZDn44lyd+x98uJWsUNOuraQH18nAIrs+kaw TfonDACJKM5t8DQM1FgmUA0nWdS3X5UCcY8LSIHpA5dhLk9sRUWehfvqPl1zDrpJ uTcOF5/POD7vgpf4Aja9vOlcgrKZJGrKPWGDq2IJkX1OoaeGe2KsIf3VqzqxFG0g l8UlR9zIeXwslLcfvRpt4YUJT27l3zHkaC6glZo+vkXbvb0fUPVwKfV3Xcyaz9G+ BIs1dC1iYrVGUURaDu8yZ/SZQ5zigD/I/wudKvTgelR8Wd8Y3MStmpkADozqBwY3 hQG0y+cMX/7gvpOsD7cw =0XKM -----END PGP SIGNATURE----- --j9oOhf6Grf0fFqlEVUxQMWAcfqJklkQI7--

This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TLCQwmSRCl22U1wagWMElBKUnvdH1EOia Content-Type: multipart/mixed; boundary="9bSa01EmgRhB6ni2i5jjAagEfeeLvfrnS" From: =?UTF-8?Q?Juan_Hern=c3=a1ndez?= <jhernand@redhat.com> To: Sven Kieske <s.kieske@mittwald.de>, users@ovirt.org Cc: devel <devel@ovirt.org> Message-ID: <9bea3ca2-c856-09fb-07e8-869c081e9aac@redhat.com> Subject: Re: [ovirt-users] problem setting up bonding via rest in ovirt 3.6.6.2 References: <69e3d02d-ac52-37d7-e8f6-5bc8be8c0d40@mittwald.de> In-Reply-To: <69e3d02d-ac52-37d7-e8f6-5bc8be8c0d40@mittwald.de> --9bSa01EmgRhB6ni2i5jjAagEfeeLvfrnS Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 08/09/2016 05:14 PM, Sven Kieske wrote:
Hi, =20 I'd like to setup host network in the following way: =20 I have 4 interfaces: eth0, eno1, eno2, eno3 =20 ovirtmgmt network resides on eth0 and is working. =20 Now I want to setup a bonding with the slave interfaces eno2 and eno3 via the hosts "setupnetworks" function: =20 URL: =20 https://engine-fqdn/api/hosts/9cdcc85b-dd87-4dcf-9275-b993ee5b5e9c/nics= /setupnetworks =20
Request: =20 { "modified_bonds": { "host_nic": [{ "name": "bond0", "bonding": { "options": { "option": [{ "name": "mode", "value": "1" }, { "name": "miimon", "value": "100" }] }, "slaves": { "host_nic": [{ "name": "eno2" }, { "name": "eno3" }] } } }] } } =20 Response from ovirt-engine: =20 <?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?> <fault> <reason>Incomplete parameters</reason> <detail>Action [hostNics] required for setupNetworks</detail> </fault> =20 When I look at the rsdl docs this seems perfectly fine. =20 =20 I tried google with this error condition but it didn't return anything useful unfortunately. =20 Your help would be greatly appreciated. =20 The official RH docs also do not mention anything else: =20 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtua=
=20 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtua=
=20 Also this tool doesn't seem to mention anything else: =20 https://jhernand.fedorapeople.org/ovirt-api-explorer/#/services/host/me=
You are using "nics/setupnetworks", which is the old and deprecated method. You should try to use "hosts/{host:id}/setupnetworks" instead. For example, with curl: ---8<--- #!/bin/bash -ex url=3D"https://engine-fqdn/api" user=3D"admin@internal" password=3D"..." curl \ --verbose \ --request POST \ --cacert /etc/pki/ovirt-engine/ca.pem \ --user "${user}:${password}" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Version: 3" \ --data ' { "modified_bonds": { "host_nic": [ { "name": "bond0", "bonding": { "options": { "option": [ { "name": "mode", "value": "1" }, { "name": "miimon", "value": "100" } ] }, "slaves": { "host_nic": [ { "name": "eth1" }, { "name": "eth2" } ] } } } ] } } ' \ "${url}/hosts/5d6741c0-d5f3-44f6-9ff5-fce2a3e8fe02/setupnetworks" --->8--- Other than that you request looks correct and I think it should work. NOTE: Consider using "/ovirt-engine/api" as "/api" won't work with version 4 of the engine. lization/3.6/html-single/REST_API_Guide/index.html#Multiple_Network_Setup= _Action lization/3.6/html-single/REST_API_Guide/index.html#Bonded_Interfaces thods/setup_networks
=20
--=20 Direcci=F3n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3=BAD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid =96 C.I.F. B82657941 - Red Hat S.= L. --9bSa01EmgRhB6ni2i5jjAagEfeeLvfrnS-- --TLCQwmSRCl22U1wagWMElBKUnvdH1EOia Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAleqRcoACgkQC0R1qG9iu2etPgCgwcsuxLG+b03o/eMwklYBSVpS Yu8AnjsYXwcL9aT2yLofboL2vmc2bzYi =Y2Mt -----END PGP SIGNATURE----- --TLCQwmSRCl22U1wagWMElBKUnvdH1EOia--
participants (2)
-
Juan Hernández
-
Sven Kieske