novnc novaclient python-api

asked 2013-05-22 08:19:44 -0600

Kassav gravatar image

I'm using novaclient with pyhton api when i want to get the url and the token to show a running server.

the url i get doesn't work. But if I use command line API, i get a correct url that I can run. for example

when i use python data=str(nt.servers.getvncconsole(self.getServId(), "novnc")) http://192.168.1.70:6080/vnc_auto.html?token=e65d0ca8-901f-4958-9311-379dd5c4ddc0

when i use command line api nova get-vnc-console ubuntu novnc

http://192.168.1.70:6080/vnc_auto.html?token=cad797a5-3fe7-42b7-8e7d-14c9e5d78497 (http://192.168.1.70:6080/vncauto.html?token=cad797a5-3fe7-42b7-8e7d-14c9e5d78497) I can't find the difference. Second question: does anybody have a documentation on creationg a server whith python: nt.servers.create(name, image, flavor, meta, files, reservationid, mincount, maxcount, securitygroups, userdata, keyname, availabilityzone, blockdevicemapping, nics, schedulerhints, config_drive)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-05-25 19:41:51 -0600

Kassav gravatar image

I found the problem of the url. I should start instance by nt.server.start(Id) then wait for 2 seconds the get the url.

I didn't found how to create a server with nt.servers.create(name, image, flavor, meta, files, reservationid, mincount, maxcount, securitygroups, userdata, keyname, availabilityzone, blockdevicemapping, nics, schedulerhints, config_drive). Does any body have an example

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2013-05-22 08:19:44 -0600

Seen: 484 times

Last updated: May 25 '13