summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2018-11-09 16:53:30 -0700
committerSean Whitton2018-11-09 17:14:24 -0700
commitbe6065276a0bb80fc70916a8b212dc36ffeb7656 (patch)
treead7e41bce2312c981db2fa74e9763895cc438a18
parent62cd307be4c04cede266a8e58b29dabe7ed18fe1 (diff)
kvmDefined -> defined
The VM could be raw QEMU without KVM, and we might later extend the property to be able to Xen domains too.
-rw-r--r--src/Propellor/Property/Libvirt.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Propellor/Property/Libvirt.hs b/src/Propellor/Property/Libvirt.hs
index 2e358486..82e7e1a5 100644
--- a/src/Propellor/Property/Libvirt.hs
+++ b/src/Propellor/Property/Libvirt.hs
@@ -7,7 +7,7 @@ module Propellor.Property.Libvirt (
DiskImageType(..),
installed,
defaultNetworkAutostarted,
- kvmDefined,
+ defined,
) where
import Propellor.Base
@@ -61,7 +61,7 @@ defaultNetworkAutostarted = check (not <$> doesFileExist autostartFile)
-- > & Libvirt.defaultNetworkAutostarted
-- > `onChange` (cmdProperty "virsh" ["net-start", "default"]
-- > `assume` MadeChange)
--- > & Libvirt.kvmDefined Libvirt.Raw
+-- > & Libvirt.defined Libvirt.Raw
-- > (Libvirt.MiBMemory 2048) (Libvirt.NumVCPUs 2)
-- > Libvirt.NoAutoStart subbox
-- >
@@ -80,15 +80,15 @@ defaultNetworkAutostarted = check (not <$> doesFileExist autostartFile)
-- > (Just (Network.Gateway (IPv4 "192.168.122.1")))
-- > `requires` Network.cleanInterfacesFile
-- > & Hostname.sane
-kvmDefined
+defined
:: DiskImageType
-> MiBMemory
-> NumVCPUs
-> AutoStart
-> Host
-> Property (HasInfo + DebianLike)
-kvmDefined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
- (built `before` nuked `before` defined `before` started)
+defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
+ (built `before` nuked `before` xmlDefined `before` started)
`requires` installed
where
built :: Property (HasInfo + DebianLike)
@@ -101,8 +101,8 @@ kvmDefined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
liftIO $ removeChroot (imageLoc <.> "chroot")
liftIO $ nukeFile (imageLoc <.> "parttable")
return MadeChange)
- defined :: Property UnixLike
- defined = check (not <$> doesFileExist conf)
+ xmlDefined :: Property UnixLike
+ xmlDefined = check (not <$> doesFileExist conf)
(scriptProperty
[ "virt-install -n " ++ hostName h
++ osTypeArg ++ osVariantArg