Skip to content

Commit 3f3723c

Browse files
committed
Update README a little
1 parent 455153e commit 3f3723c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ All `allocate` functions are implemented as static methods.
2020
Examples
2121
--------
2222

23-
Allocating new host::
24-
25-
client = oca.Client('user:password', 'http:12.12.12.12:2633/RPC2')
26-
new_host_id = oca.Host.allocate(client, 'host_name', 'im_xen', 'vmm_xen', 'tm_nfs')
27-
hostpool = oca.HostPool(client)
28-
hostpool.info()
29-
vm = hostpool.get_by_id(new_host_id)
30-
print vm.name, vm.str_state
23+
Show all running virtual machines::
24+
25+
client = oca.Client('user:password', 'http://12.12.12.12:2633/RPC2')
26+
client.version()
27+
vm_pool = oca.VirtualMachinePool(c)
28+
vm_pool.info()
29+
for vm in vm_pool:
30+
print "%s (memory: %s MB)" % ( vm.name, vm.template.memory)
31+
3132

3233
License
3334
-------

0 commit comments

Comments
 (0)