--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
got that, thanks=20
On Tue, Dec 11, 2012 at 04:33:56AM -0500, Alex Jia wrote:
Hi Mohua,
The following link should be helpful for you(see add() of the class HostM=
anager):
518c78bfb4823
=20
--=20
Regards, =20
Alex
=20
=20
----- Original Message -----
From: "Mohua Li" <moli(a)redhat.com>
To: users(a)ovirt.org
Sent: Tuesday, December 11, 2012 3:22:43 PM
Subject: [Users] How to approve the host to custom cluster instead the de=
fault
cluster
=20
Hi all,
=20
In admin portal, when try to approve a host, need to select the cluster f=
irst,
but with rest api,
=20
/*code*/
=20
try:
api =3D API(url=3D"HOST",
username=3D"USER",
password=3D"PASS",
ca_file=3D"ca.crt")
h =3D api.hosts.get(name=3D"Atlantic")
if(h.approve()):
print "Host '%s' approved (Status: %s)." % (h.get_name(),
h.get_status().get_state())
else:
print "Approval of '%s' failed." % h.get_name()
api.disconnect()
except Exception as ex:
print "Unexpected error: %s" % ex
=20
above code will register to the default cluster, could you give me an exa=
mple how
to register to the custom=20
cluster instead the default? or i misunderstand some workflow,
light me=
pls, thanks
=20
=20
=20
Regards,
Mohua Li
=20
=20
=20
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
--=20
=E6=88=91=E5=8F=AA=E6=8B=85=E5=BF=83=E4=B8=80=E4=BB=B6=E4=BA=8B=EF=BC=8C=E6=
=88=91=E6=80=95=E6=88=91=E9=85=8D=E4=B8=8D=E4=B8=8A=E6=88=91=E6=89=80=E9=81=
=AD=E5=8F=97=E7=9A=84=E8=8B=A6=E9=9A=BE
--6c2NcOVqGQ03X4Wi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAEBAgAGBQJQxwe3AAoJEKa5n96c5rR6KwoH/3ZpeXd3op4A0vZMGK5JCwAJ
iH3cw3040rIvJTfKlTf59KDeI9ItFu1jXbTyLCnkeV/ba5iUGbeX0wubnEPe0Zfk
piEyHqE7rbd3SUa/Amj/mcAhYDP3U8tlq4Vk4y7YlaY3ITf8wnNc7yrvCCeCNsTa
+W6o4+j8Qj+EykwUOA3ARneu0xluUFpvuM0ZkndQ1Wk3ckitjAZ3JZ0QcpyEy3Ej
wpsBmiDlOZ2iucuIs3GY+MQiZvnucwSICwMfzJrD/NZkXdmebfjqLrVE6GcfnS64
dmYDFdOK8sRgczFLfZHmRcSbLq4+AB7UZkM+/lm1H+jH8vlPJeB0tjc3NrssXF8=
=X8f2
-----END PGP SIGNATURE-----
--6c2NcOVqGQ03X4Wi--