Just a couple of notes on this: 1) it should have been submitted on devel-2.7, as it represents a bug affecting 2.7. Same for any other bug you find, please don't fix things just on master. 2) we should move to uuids instead of names, but I opened a bug for that. :)
thanks, Guido On Tue, Feb 5, 2013 at 2:14 PM, Michele Tartara <[email protected]> wrote: > On Tue, Feb 5, 2013 at 2:13 PM, Helga Velroyen <[email protected]> wrote: >> >> Hi! >> >> correction: >> >> -- | Helper function to look up a network's UUID by its name >>> >>> getNetworkUuid :: ConfigData -> String -> Maybe String >>> getNetworkUuid cfg name = >>> - let nets = filter (\n -> name == fromNonEmpty (networkName n)) >>> + let net = find (\n -> name == fromNonEmpty (networkName n)) >>> ((Map.elems . fromContainer . configNetworks) cfg) >>> - in case nets of >>> - [] -> Nothing >>> - net:_ -> Just ((fromNonEmpty . networkName) net) >>> + in fmap (fromNonEmpty . networkName) net >> >> >> This should of course be: >> + in fmap networkUuid net >> > > LGTM, thanks. > Michele -- Guido Trotter Ganeti engineering Google Germany
