module Propellor.Types.CmdLine where

import Propellor.Types.OS
import Propellor.Types.PrivData
import Propellor.Types.Container

import System.Posix.Types

-- | All the command line actions that propellor can perform.
data CmdLine
	= Run HostName
	| Spin [HostName] (Maybe HostName)
	| SimpleRun HostName
	| Set PrivDataField Context
	| Unset PrivDataField Context
	| UnsetUnused
	| Dump PrivDataField Context
	| Edit PrivDataField Context
	| ListFields
	| AddKey String
	| RmKey String
	| Merge
	| Serialized CmdLine
	| Continue CmdLine
	| Update (Maybe HostName)
	| Relay HostName
	| DockerInit HostName
	| DockerChain HostName String
	| ChrootChain HostName FilePath Bool Bool [ContainerCapability]
	| GitPush Fd Fd
	| Check
	| Build
	deriving (ReadPrec [CmdLine]
ReadPrec CmdLine
Int -> ReadS CmdLine
ReadS [CmdLine]
(Int -> ReadS CmdLine)
-> ReadS [CmdLine]
-> ReadPrec CmdLine
-> ReadPrec [CmdLine]
-> Read CmdLine
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CmdLine]
$creadListPrec :: ReadPrec [CmdLine]
readPrec :: ReadPrec CmdLine
$creadPrec :: ReadPrec CmdLine
readList :: ReadS [CmdLine]
$creadList :: ReadS [CmdLine]
readsPrec :: Int -> ReadS CmdLine
$creadsPrec :: Int -> ReadS CmdLine
Read, Int -> CmdLine -> ShowS
[CmdLine] -> ShowS
CmdLine -> String
(Int -> CmdLine -> ShowS)
-> (CmdLine -> String) -> ([CmdLine] -> ShowS) -> Show CmdLine
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CmdLine] -> ShowS
$cshowList :: [CmdLine] -> ShowS
show :: CmdLine -> String
$cshow :: CmdLine -> String
showsPrec :: Int -> CmdLine -> ShowS
$cshowsPrec :: Int -> CmdLine -> ShowS
Show, CmdLine -> CmdLine -> Bool
(CmdLine -> CmdLine -> Bool)
-> (CmdLine -> CmdLine -> Bool) -> Eq CmdLine
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CmdLine -> CmdLine -> Bool
$c/= :: CmdLine -> CmdLine -> Bool
== :: CmdLine -> CmdLine -> Bool
$c== :: CmdLine -> CmdLine -> Bool
Eq)