getFilledInstOsParams :: ConfigData -> Instance -> OsParams
getFilledInstOsParams cfg inst =
  let maybeOsLookupName = liftM (takeWhile (/= '+')) (instOs inst)
      osParamMap = fromContainer . clusterOsparams $ configCluster cfg
      childOsParams = instOsparams inst
  in case withMissingParam "Instance without OS"
            (flip (getItem' "OsParams") osParamMap)
            maybeOsLookupName of
       Ok parentOsParams -> GenericContainer $
                              fillDict (fromContainer parentOsParams)
                                       (fromContainer childOsParams) []
       Bad _             -> childOsParams

-- | Looks up an instance's primary node.
getFilledInstOsParams :: ConfigData -> Instance -> OsParams
getFilledInstOsParams cfg inst =
  let maybeOsLookupName = liftM (takeWhile (/= '+')) (instOs inst)
      osParamMap = fromContainer . clusterOsparams $ configCluster cfg
      childOsParams = instOsparams inst
  in case withMissingParam "Instance without OS"
            (flip (getItem' "OsParams") osParamMap)
            maybeOsLookupName of
       Ok parentOsParams -> GenericContainer $
                              fillDict (fromContainer parentOsParams)
                                       (fromContainer childOsParams) []
       Bad _             -> childOsParams

-- | Looks up an instance's primary node.
getFilledInstOsParams cfg inst =
  let maybeOsLookupName = liftM (takeWhile (/= '+')) (instOs inst)
      osParamMap = fromContainer . clusterOsparams $ configCluster cfg
      childOsParams = instOsparams inst
  in case withMissingParam "Instance without OS"
            (flip (getItem' "OsParams") osParamMap)
            maybeOsLookupName of
       Ok parentOsParams -> GenericContainer $
                              fillDict (fromContainer parentOsParams)
                                       (fromContainer childOsParams) []
       Bad _             -> childOsParams

-- | Looks up an instance's primary node.