Permalink
Browse files

Convenience wrapper around virDomainCreate/2

  • Loading branch information...
1 parent 3663217 commit c44c04128128001bf0e0992b284c4437d3b795d3 @msantos committed Aug 16, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −1 README.md
  2. +3 −1 src/vert.erl
  3. +1 −1 test/vert_tests.erl
View
@@ -55,7 +55,7 @@ To call the same functions in Erlang:
{ok, Connect} = vert:virConnectOpen("qemu:///system"),
{ok, XML} = file:read_file(Path),
{ok, Domain} = vert:virDomainDefineXML(Connect, XML),
- ok = vert:virDomainCreate(Domain, 0),
+ ok = vert:virDomainCreate(Domain),
Active = vert:virConnectNumOfDomains(Connect),
io:format("Active Domains: ~p~n", [Active]),
View
@@ -86,7 +86,7 @@
virDomainGetAutostart/1,
virDomainDestroy/1,
virDomainDefineXML/2,
- virDomainCreate/2,
+ virDomainCreate/1, virDomainCreate/2,
virDomainOpenConsole/2, virDomainOpenConsole/3,
virConnectOpen/1,
virConnectOpenReadOnly/1,
@@ -573,6 +573,8 @@ virDomainDefineXML(#resource{type = connect, res = Res}, Xml) when is_binary(Xml
%virDomainCreateXML(Conn, XmlDesc, Flags) ->
+virDomainCreate(Domain) ->
+ virDomainCreate(Domain, 0).
virDomainCreate(#resource{type = domain, res = Res}, Flags) when is_integer(Flags) ->
ok(call(virDomainCreate, [Res, Flags])).
View
@@ -62,7 +62,7 @@ create_test() ->
{ok, XML} = file:read_file(Path),
{ok, Domain} = vert:virDomainDefineXML(Connect, XML),
- ok = vert:virDomainCreate(Domain, 0),
+ ok = vert:virDomainCreate(Domain),
Active = vert:virConnectNumOfDomains(Connect),

0 comments on commit c44c041

Please sign in to comment.