Revision 8c3b6093 src/Ganeti/Query/Network.hs

b/src/Ganeti/Query/Network.hs
55 55
  [ (FieldDefinition "name" "Network" QFTText "Name",
56 56
     FieldSimple (rsNormal . networkName), QffNormal)
57 57
  , (FieldDefinition "network" "Subnet" QFTText "IPv4 subnet",
58
     FieldSimple (rsNormal . networkNetwork), QffNormal)
58
     FieldSimple (rsMaybeUnavail . networkNetwork), QffNormal)
59 59
  , (FieldDefinition "gateway" "Gateway" QFTOther "IPv4 gateway",
60 60
     FieldSimple (rsMaybeUnavail . networkGateway), QffNormal)
61 61
  , (FieldDefinition "network6" "IPv6Subnet" QFTOther "IPv6 subnet",
......
156 156
--
157 157
-- This doesn't use the netmask for validation of the length, instead
158 158
-- simply iterating over the reservations string.
159
getReservations :: Ip4Network -> String -> [Ip4Address]
160
getReservations (Ip4Network net _) =
159
getReservations :: Maybe Ip4Network -> String -> [Ip4Address]
160
getReservations Nothing = \_ -> []
161
getReservations (Just $ Ip4Network net _) =
161 162
  reverse .
162 163
  fst .
163 164
  foldl' (\(accu, addr) c ->

Also available in: Unified diff