lukaszo / python-oca Goto Github PK
View Code? Open in Web Editor NEWPython bindings for opennebula xmlrpc api
Python bindings for opennebula xmlrpc api
Hi Lukas,
I am trying to get a list of templates, in the same way I can get a list of virtual machines. But it seems that the vmtemplatepool.info not yet is implemented. Can you maybe have a look at that?
Thanks!
Mattias
Hi,
How can I instantiate and deploy a VM from a VM template ?
I was able to get the VM templates with the command: vmtemplatepool.info()
Thank you
Hello,
How can I get the IP address of a virtual machine?
It is not listed as one of the attributes:
list(vmpool)[-1].xml.getchildren()
Out[15]:
[<Element ID at 305d248>,
<Element UID at 305d2d8>,
<Element USERNAME at 305d368>,
<Element NAME at 305d3f8>,
<Element LAST_POLL at 305d488>,
<Element STATE at 305d518>,
<Element LCM_STATE at 305d5a8>,
<Element STIME at 305d638>,
<Element ETIME at 305d6c8>,
<Element DEPLOY_ID at 305d758>,
<Element MEMORY at 305d7e8>,
<Element CPU at 305d878>,
<Element NET_TX at 305d908>,
<Element NET_RX at 305d998>,
<Element LAST_SEQ at 305da28>,
<Element HISTORY at 305dab8>]```
But I noticed that is provided as output of the one.vm.info function:
<IP><![CDATA[10.0.72.12]]></IP>
But all the fields that contain a CDATA value are note listed in the vmpool object.
Any ideas how to get the ip address into the vm object?
Thanks!
Hello lukaszo,
I am testing out your python wrapper to OpenNebula. If I try to get the results of one.vmpool.info I retrieve an error:
vmpool = oca.VirtualMachinePool(client)
vmpool.info()
xmlrpclib.Fault: Fault 501: 'Not enough parameters'
Looking into that into more detail, I think you also need to pass a client_id:
Doing this results in a feedback from the server:
client.call("vmpool.info", -1)
VM_POOL ... VM_POOL
According to the Ruby wrapper (http://www.opennebula.org/documentation:archives:rel2.0:ruby) there is a need to pass a second argument to VirtualMachinePool: vm_pool = VirtualMachinePool.new(client, -1)
Can you please verify this?
Thanks!
Mattias
Hey there,
would it be possible for you to add 2-3 more examples?
A little structure like
-> get list of hosts
-> get list of vms
-> associate them
but in single steps with comments would be great to help non-coders like me move over the first silly stuff.
I looked at the pydoc doc for init() and it was already too unclear for me. :/
What is "client", etc.
I then got a lot of exceptions just trying to test the example and both things combined, had to give up :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.