Permalink
Browse files

Add an example

  • Loading branch information...
1 parent cc1c1a0 commit fefd843818fe586fa0f7b17dd874b25b7b0fcfab @msantos committed Jan 28, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.markdown
View
@@ -29,5 +29,20 @@ Erlang bindings to the libvirt virtualization API.
## EXAMPLES
+ start(Path) ->
+ {ok, Connect} = vert:open({connect, ""}),
+ {ok, XML} = file:read_file(Path),
+ {ok, Domain} = vert:define(Connect, {domain, XML}),
+ ok = vert:create(Domain),
+
+ Active = vert:resource(Connect, {domain, active}),
+ io:format("Active Domains: ~p~n", [Active]),
+
+ {ok, Connect, Domain}.
+
+ halt(Connect, Domain) ->
+ ok = vert:destroy(Domain),
+ ok = vert:close(Connect).
+
## TODO

0 comments on commit fefd843

Please sign in to comment.