Skip to content
Browse files

Enable removal of all allowed IP addresses from a VIF via the CLI.

Calling String.split on an empty string returns [""] - String.get_words
will instead return an empty list.

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
1 parent 075a4d2 commit e1fc3218ad8905f051d4dc3082eccfabece008b7 @johnelse committed Sep 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 ocaml/client_records/records.ml
View
4 ocaml/client_records/records.ml
@@ -375,13 +375,13 @@ let vif_record rpc session_id vif =
~get_set:(fun () -> (x ()).API.vIF_ipv4_allowed)
~add_to_set:(fun value -> Client.VIF.add_ipv4_allowed rpc session_id vif value)
~remove_from_set:(fun value -> Client.VIF.remove_ipv4_allowed rpc session_id vif value)
- ~set:(fun value -> Client.VIF.set_ipv4_allowed rpc session_id vif (String.split ',' value)) ();
+ ~set:(fun value -> Client.VIF.set_ipv4_allowed rpc session_id vif (String.get_words ',' value)) ();
make_field ~name:"ipv6-allowed"
~get:(fun () -> String.concat "; " (x ()).API.vIF_ipv6_allowed)
~get_set:(fun () -> (x ()).API.vIF_ipv6_allowed)
~add_to_set:(fun value -> Client.VIF.add_ipv6_allowed rpc session_id vif value)
~remove_from_set:(fun value -> Client.VIF.remove_ipv6_allowed rpc session_id vif value)
- ~set:(fun value -> Client.VIF.set_ipv6_allowed rpc session_id vif (String.split ',' value)) ();
+ ~set:(fun value -> Client.VIF.set_ipv6_allowed rpc session_id vif (String.get_words ',' value)) ();
]}

0 comments on commit e1fc321

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