Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ocaml/xapi/xapi_pool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1072,16 +1072,16 @@ let eject ~__context ~host =
let vlan_id = Int64.to_int pif.API.pIF_VLAN in
let config_base =
[ sprintf "LABEL='%s'" management_device
; sprintf "MODE=%s" mode
; sprintf "MODE='%s'" mode
] in
let config_static = if mode <> "static" then [] else
[ sprintf "IP=%s" pif.API.pIF_IP
; sprintf "NETMASK=%s" pif.API.pIF_netmask
; sprintf "GATEWAY=%s" pif.API.pIF_gateway
; sprintf "DNS=%s" pif.API.pIF_DNS
[ sprintf "IP='%s'" pif.API.pIF_IP
; sprintf "NETMASK='%s'" pif.API.pIF_netmask
; sprintf "GATEWAY='%s'" pif.API.pIF_gateway
; sprintf "DNS='%s'" pif.API.pIF_DNS
] in
let config_vlan = if vlan_id = -1 then [] else
[ sprintf "VLAN=%d" vlan_id
[ sprintf "VLAN='%d'" vlan_id
] in
let configuration_file =
List.concat
Expand Down
2 changes: 1 addition & 1 deletion scripts/xe-reset-networking
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def read_dict_file(fname):
d = {}
for l in f.readlines():
kv = l.split('=')
d[kv[0]] = kv[1][1:-2]
d[kv[0].strip()] = kv[1].strip().strip("'")
return d

def read_inventory():
Expand Down