on master help sign in
Bump to apiVersion 1.24 for the new docker 1.12 release
39e6a9bDeni Bertovic
src/Docker/Client/Types.hs+28−28
@@ -255,7 +255,7 @@ data DockerClientOpts = DockerClientOpts {
255
255
256defaultClientOpts :: DockerClientOpts
256defaultClientOpts :: DockerClientOpts
257defaultClientOpts = DockerClientOpts {
257defaultClientOpts = DockerClientOpts {
258− apiVer = "v1.23"
258+ apiVer = "v1.24"
259 , baseUrl = "http://127.0.0.1:2375"
259 , baseUrl = "http://127.0.0.1:2375"
260 }
260 }
261
261
@@ -395,24 +395,24 @@ instance FromJSON Networks where
395 parseJSON _ = fail "Networks is not an object"
395 parseJSON _ = fail "Networks is not an object"
396
396
397data NetworkSettings = NetworkSettings {
397data NetworkSettings = NetworkSettings {
398− networkSettingsBridge :: Text
398+ networkSettingsBridge :: Text
399− , networkSettingsSandboxId :: Text
399+ , networkSettingsSandboxId :: Text
400− , networkSettingsHairpinMode :: Bool
400+ , networkSettingsHairpinMode :: Bool
401− , networkSettingsLinkLocalIPv6Address :: Text
401+ , networkSettingsLinkLocalIPv6Address :: Text
402 , networkSettingsLinkLocalIPv6PrefixLen :: Int
402 , networkSettingsLinkLocalIPv6PrefixLen :: Int
403− , networkSettingsPorts :: PortBindings
403+ , networkSettingsPorts :: PortBindings
404− , networkSettingsSandboxKey :: Text
404+ , networkSettingsSandboxKey :: Text
405− , networkSettingsSecondaryIPAddresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
405+ , networkSettingsSecondaryIPAddresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
406 , networkSettingsSecondaryIPv6Addresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
406 , networkSettingsSecondaryIPv6Addresses :: Maybe [Text] -- TODO: 1.24 spec is unclear
407− , networkSettingsEndpointID :: Text
407+ , networkSettingsEndpointID :: Text
408− , networkSettingsGateway :: Text
408+ , networkSettingsGateway :: Text
409− , networkSettingsGlobalIPv6Address :: Text
409+ , networkSettingsGlobalIPv6Address :: Text
410− , networkSettingsGlobalIPv6PrefixLen :: Int
410+ , networkSettingsGlobalIPv6PrefixLen :: Int
411− , networkSettingsIpAddress :: Text
411+ , networkSettingsIpAddress :: Text
412− , networkSettingsIpPrefixLen :: Int
412+ , networkSettingsIpPrefixLen :: Int
413− , networkSettingsIpv6Gateway :: Text
413+ , networkSettingsIpv6Gateway :: Text
414− , networkSettingsMacAddress :: Text
414+ , networkSettingsMacAddress :: Text
415− , networkSettingsNetworks :: Networks
415+ , networkSettingsNetworks :: Networks
416 }
416 }
417 deriving (Eq, Show)
417 deriving (Eq, Show)
418
418
@@ -804,11 +804,11 @@ instance FromJSON PortType where
804 _ -> fail "PortType: Invalid port type."
804 _ -> fail "PortType: Invalid port type."
805
805
806-- newtype NetworkInterface = NetworkInterface Text deriving (Eq, Show)
806-- newtype NetworkInterface = NetworkInterface Text deriving (Eq, Show)
807−--
807+--
808-- instance FromJSON NetworkInterface where
808-- instance FromJSON NetworkInterface where
809-- parseJSON (JSON.String v) = return $ NetworkInterface v
809-- parseJSON (JSON.String v) = return $ NetworkInterface v
810-- parseJSON _ = fail "Network interface is not a string."
810-- parseJSON _ = fail "Network interface is not a string."
811−--
811+--
812-- instance ToJSON NetworkInterface where
812-- instance ToJSON NetworkInterface where
813-- toJSON (NetworkInterface i) = JSON.String i
813-- toJSON (NetworkInterface i) = JSON.String i
814
814
@@ -854,7 +854,7 @@ instance ToJSON PortBindings where
854 toJSON (PortBindings (p:ps)) = toJSON (p:ps)
854 toJSON (PortBindings (p:ps)) = toJSON (p:ps)
855
855
856data HostPort = HostPort {
856data HostPort = HostPort {
857− hostIp :: Text
857+ hostIp :: Text
858 , hostPost :: Port
858 , hostPost :: Port
859 }
859 }
860 deriving (Eq, Show)
860 deriving (Eq, Show)
@@ -871,14 +871,14 @@ instance FromJSON HostPort where
871
871
872-- newtype HostPorts = HostPorts [HostPort]
872-- newtype HostPorts = HostPorts [HostPort]
873-- deriving (Eq, Show)
873-- deriving (Eq, Show)
874−--
874+--
875-- instance ToJSON HostPorts where
875-- instance ToJSON HostPorts where
876-- toJSON (HostPorts hps) = toJSON hps
876-- toJSON (HostPorts hps) = toJSON hps
877−--
877+--
878-- instance FromJSON HostPorts where
878-- instance FromJSON HostPorts where
879-- parseJSON (JSON.Object o) = do
879-- parseJSON (JSON.Object o) = do
880-- HostPorts <$> HM.foldlWithKey' f (return []) o
880-- HostPorts <$> HM.foldlWithKey' f (return []) o
881−--
881+--
882-- where
882-- where
883-- f accM k v = do
883-- f accM k v = do
884-- acc <- accM
884-- acc <- accM
@@ -976,7 +976,7 @@ instance FromJSON HostConfig where
976 parseJSON _ = fail "HostConfig is not an object."
976 parseJSON _ = fail "HostConfig is not an object."
977
977
978instance ToJSON HostConfig where
978instance ToJSON HostConfig where
979− toJSON HostConfig{..} =
979+ toJSON HostConfig{..} =
980 let arr = [
980 let arr = [
981 "Binds" .= binds
981 "Binds" .= binds
982 , "ContainerIDFile" .= containerIDFile
982 , "ContainerIDFile" .= containerIDFile
@@ -1004,7 +1004,7 @@ instance ToJSON HostConfig where
1004 in
1004 in
1005 object $ arr <> ( resourcesArr resources)
1005 object $ arr <> ( resourcesArr resources)
1006
1006
1007− where
1007+ where
1008 -- JP: Not sure if this is better than a separate ToJSON instance with a bunch of `HM.insert`s.
1008 -- JP: Not sure if this is better than a separate ToJSON instance with a bunch of `HM.insert`s.
1009 resourcesArr ContainerResources{..} = [
1009 resourcesArr ContainerResources{..} = [
1010 "CpuShares" .= cpuShares
1010 "CpuShares" .= cpuShares
@@ -1025,8 +1025,8 @@ instance ToJSON HostConfig where
1025 , "OomKillDisable" .= oomKillDisable
1025 , "OomKillDisable" .= oomKillDisable
1026 , "Ulimits" .= ulimits
1026 , "Ulimits" .= ulimits
1027 ]
1027 ]
1028−
1028+
1029−
1029+
1030
1030
1031
1031
1032-- { "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }
1032-- { "Name": <name>, "Soft": <soft limit>, "Hard": <hard limit> }
@@ -1046,7 +1046,7 @@ instance ToJSON Ulimit where
1046 fieldLabelModifier = drop 5}
1046 fieldLabelModifier = drop 5}
1047
1047
1048data DeviceWeight = DeviceWeight {
1048data DeviceWeight = DeviceWeight {
1049− deviceWeightPath :: FilePath
1049+ deviceWeightPath :: FilePath
1050 , deviceWeightWeight :: Text
1050 , deviceWeightWeight :: Text
1051 }
1051 }
1052 deriving (Show, Eq)
1052 deriving (Show, Eq)