, simpleField "cpu_speed" [t| Double |]
])
+-- | Disk state parameters.
+--
+-- As according to the documentation this option is unused by Ganeti,
+-- the content is just a 'JSValue'.
+type DiskState = Container JSValue
+
+-- | Hypervisor state parameters.
+--
+-- As according to the documentation this option is unused by Ganeti,
+-- the content is just a 'JSValue'.
+type HypervisorState = Container JSValue
+
$(buildObject "Node" "node" $
[ simpleField "name" [t| String |]
, simpleField "primary_ip" [t| String |]
, simpleField "vm_capable" [t| Bool |]
, simpleField "ndparams" [t| PartialNDParams |]
, simpleField "powered" [t| Bool |]
+ , notSerializeDefaultField [| emptyContainer |] $
+ simpleField "hv_state_static" [t| HypervisorState |]
+ , notSerializeDefaultField [| emptyContainer |] $
+ simpleField "disk_state_static" [t| DiskState |]
]
++ timeStampFields
++ uuidFields
, simpleField "ipolicy" [t| PartialIPolicy |]
, simpleField "diskparams" [t| GroupDiskParams |]
, simpleField "networks" [t| Networks |]
+ , notSerializeDefaultField [| emptyContainer |] $
+ simpleField "hv_state_static" [t| HypervisorState |]
+ , notSerializeDefaultField [| emptyContainer |] $
+ simpleField "disk_state_static" [t| DiskState |]
]
++ timeStampFields
++ uuidFields
-- | The master candidate client certificate digests
type CandidateCertificates = Container String
--- | Disk state parameters.
---
--- As according to the documentation this option is unused by Ganeti,
--- the content is just a 'JSValue'.
-type DiskState = Container JSValue
-
--- | Hypervisor state parameters.
---
--- As according to the documentation this option is unused by Ganeti,
--- the content is just a 'JSValue'.
-type HypervisorState = Container JSValue
-
-- * Cluster definitions
$(buildObject "Cluster" "cluster" $
[ simpleField "rsahostkeypub" [t| String |]
arbitrary = Node <$> genFQDN <*> genFQDN <*> genFQDN
<*> arbitrary <*> arbitrary <*> arbitrary <*> genFQDN
<*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
- <*> arbitrary <*> arbitrary <*> genFQDN <*> arbitrary
- <*> (Set.fromList <$> genTags)
+ <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
+ <*> genFQDN <*> arbitrary <*> (Set.fromList <$> genTags)
$(genArbitrary ''BlockDriver)
nic_param_list <- vectorOf num_networks (arbitrary::Gen PartialNicParams)
net_map <- pure (GenericContainer . Map.fromList $
zip net_uuid_list nic_param_list)
+ hv_state <- arbitrary
+ disk_state <- arbitrary
-- timestamp fields
ctime <- arbitrary
mtime <- arbitrary
serial <- arbitrary
tags <- Set.fromList <$> genTags
let group = NodeGroup name members ndparams alloc_policy ipolicy diskparams
- net_map ctime mtime uuid serial tags
+ net_map hv_state disk_state ctime mtime uuid serial tags
return group
instance Arbitrary NodeGroup where