, pHvState
, pDiskState
, pIgnoreIpolicy
+ , pHotplug
+ , pHotplugIfPossible
, pAllowRuntimeChgs
, pInstDisks
, pDiskTemplate
, ("TagTypeNode", 'C.tagNode)
, ("TagTypeGroup", 'C.tagNodegroup)
, ("TagTypeCluster", 'C.tagCluster)
+ , ("TagTypeNetwork", 'C.tagNetwork)
])
$(makeJSONInstance ''TagType)
data TagObject = TagInstance String
| TagNode String
| TagGroup String
+ | TagNetwork String
| TagCluster
deriving (Show, Eq)
tagTypeOf (TagNode {}) = TagTypeNode
tagTypeOf (TagGroup {}) = TagTypeGroup
tagTypeOf (TagCluster {}) = TagTypeCluster
+tagTypeOf (TagNetwork {}) = TagTypeNetwork
-- | Gets the potential tag object name.
tagNameOf :: TagObject -> Maybe String
tagNameOf (TagInstance s) = Just s
tagNameOf (TagNode s) = Just s
tagNameOf (TagGroup s) = Just s
+tagNameOf (TagNetwork s) = Just s
tagNameOf TagCluster = Nothing
-- | Builds a 'TagObject' from a tag type and name.
return . TagInstance $ fromJSString s
tagObjectFrom TagTypeNode (JSString s) = return . TagNode $ fromJSString s
tagObjectFrom TagTypeGroup (JSString s) = return . TagGroup $ fromJSString s
+tagObjectFrom TagTypeNetwork (JSString s) =
+ return . TagNetwork $ fromJSString s
tagObjectFrom TagTypeCluster JSNull = return TagCluster
tagObjectFrom t v =
fail $ "Invalid tag type/name combination: " ++ show t ++ "/" ++
simpleField "diskparams" [t| GenericContainer DiskTemplate
UncheckedDict |]
+-- | Whether to hotplug device.
+pHotplug :: Field
+pHotplug = defaultFalse "hotplug"
+
+pHotplugIfPossible :: Field
+pHotplugIfPossible = defaultFalse "hotplug_if_possible"
+
-- * Parameters for node resource model
-- | Set hypervisor states.