Skip to content

Commit

Permalink
CA-225365: Trim the output of CLI commands
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Hoes <[email protected]>
  • Loading branch information
robhoes committed Oct 17, 2016
1 parent d0b67b0 commit 25e0a6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/network_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,12 @@ module Ovs = struct

let bridge_to_vlan name =
try
Some (vsctl ["br-to-parent"; name], int_of_string (vsctl ["br-to-vlan"; name]))
with _ -> None
let parent = vsctl ["br-to-parent"; name] |> String.rtrim in
let vlan = vsctl ["br-to-vlan"; name] |> String.rtrim |> int_of_string in
Some (parent, vlan)
with e ->
debug "bridge_to_vlan: %s" (Printexc.to_string e);
None

let get_bond_link_status name =
try
Expand Down

0 comments on commit 25e0a6b

Please sign in to comment.