summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Info.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-19 23:11:34 -0400
committerJoey Hess2014-11-19 23:11:34 -0400
commitd49d2518979c7b985af8f00741f2a91bcd511024 (patch)
tree9adefd40c6fa82e6f27e57c84817abd0c56b1577 /src/Propellor/Types/Info.hs
parentb7d78e679ab94a93732f48f4446c1b55bf3dae32 (diff)
separate docker container type
Docker containers are now a separate data type, cannot be included in the main host list, and are instead passed to Docker.docked. (API change)
Diffstat (limited to 'src/Propellor/Types/Info.hs')
-rw-r--r--src/Propellor/Types/Info.hs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/Propellor/Types/Info.hs b/src/Propellor/Types/Info.hs
index de072aa0..6aba1f9f 100644
--- a/src/Propellor/Types/Info.hs
+++ b/src/Propellor/Types/Info.hs
@@ -45,26 +45,22 @@ fromVal (Val a) = Just a
fromVal NoVal = Nothing
data DockerInfo = DockerInfo
- { _dockerImage :: Val String
- , _dockerRunParams :: [HostName -> String]
+ { _dockerRunParams :: [HostName -> String]
}
instance Eq DockerInfo where
x == y = and
- [ _dockerImage x == _dockerImage y
- , let simpl v = map (\a -> a "") (_dockerRunParams v)
+ [ let simpl v = map (\a -> a "") (_dockerRunParams v)
in simpl x == simpl y
]
instance Monoid DockerInfo where
- mempty = DockerInfo mempty mempty
+ mempty = DockerInfo mempty
mappend old new = DockerInfo
- { _dockerImage = _dockerImage old <> _dockerImage new
- , _dockerRunParams = _dockerRunParams old <> _dockerRunParams new
+ { _dockerRunParams = _dockerRunParams old <> _dockerRunParams new
}
instance Show DockerInfo where
show a = unlines
- [ "docker image " ++ show (_dockerImage a)
- , "docker run params " ++ show (map (\mk -> mk "") (_dockerRunParams a))
+ [ "docker run params " ++ show (map (\mk -> mk "") (_dockerRunParams a))
]