Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

verx: allow passing in transport type

Use short form as argument, rather than the module name.
  • Loading branch information...
commit e08daa4a9f0f7f20712a17714dd6f461c2d4ad07 1 parent 9407e2f
Michael Santos authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 bin/verx
9 bin/verx
@@ -360,8 +360,8 @@ connect(Opt0) ->
360 360 Opt = proplists:substitute_aliases([{"connect", "uri"}], Opt0),
361 361 URI = proplists:get_value("uri", Opt, "qemu:///system"),
362 362
363   - Transport = list_to_atom(proplists:get_value("transport", Opt,
364   - "verx_client_unix")),
  363 + Transport = transport(list_to_atom(proplists:get_value("transport", Opt,
  364 + "verx_client_unix"))),
365 365
366 366 % Unix socket
367 367 Path = proplists:get_value("path", Opt, ?LIBVIRT_SOCK_PATH),
@@ -391,6 +391,11 @@ connect(Opt0) ->
391 391 ok = verx:open(Ref, [URI, 0]),
392 392 {ok, Ref}.
393 393
  394 +transport(tcp) -> verx_client_tcp;
  395 +transport(tls) -> verx_client_tls;
  396 +transport(unix) -> verx_client_unix;
  397 +transport(N) -> N.
  398 +
394 399 getopt(Opts0) ->
395 400 Opts = lists:flatmap(fun(X)-> string:tokens(X, "=") end, Opts0),
396 401 getopt(Opts, []).

0 comments on commit e08daa4

Please sign in to comment.
Something went wrong with that request. Please try again.