Commit d4c58d99 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis Committed by Klaus Aehlig
Browse files

Rename DiskParams to GroupDiskParams



DiskParams was used for the cluster/group disk parameters type. This
patch renames it to GroupDiskParams and uses the DiskParams type for
the parameters of one single Disk object.
Signed-off-by: default avatarIlias Tsitsimpis <iliastsi@grnet.gr>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 42f09de4
...@@ -250,7 +250,7 @@ getGroupIpolicy cfg ng = ...@@ -250,7 +250,7 @@ getGroupIpolicy cfg ng =
fillIPolicy (clusterIpolicy $ configCluster cfg) (groupIpolicy ng) fillIPolicy (clusterIpolicy $ configCluster cfg) (groupIpolicy ng)
-- | Computes a group\'s (merged) disk params. -- | Computes a group\'s (merged) disk params.
getGroupDiskParams :: ConfigData -> NodeGroup -> DiskParams getGroupDiskParams :: ConfigData -> NodeGroup -> GroupDiskParams
getGroupDiskParams cfg ng = getGroupDiskParams cfg ng =
GenericContainer $ GenericContainer $
fillDict (fromContainer . clusterDiskparams $ configCluster cfg) fillDict (fromContainer . clusterDiskparams $ configCluster cfg)
......
...@@ -61,7 +61,7 @@ module Ganeti.Objects ...@@ -61,7 +61,7 @@ module Ganeti.Objects
, FilledIPolicy(..) , FilledIPolicy(..)
, PartialIPolicy(..) , PartialIPolicy(..)
, fillIPolicy , fillIPolicy
, DiskParams , GroupDiskParams
, NodeGroup(..) , NodeGroup(..)
, IpFamily(..) , IpFamily(..)
, ipFamilyToRaw , ipFamilyToRaw
...@@ -274,6 +274,9 @@ instance UuidObject PartialNic where ...@@ -274,6 +274,9 @@ instance UuidObject PartialNic where
devType :: String devType :: String
devType = "dev_type" devType = "dev_type"
-- | The disk parameters type.
type DiskParams = Container JSValue
-- | The disk configuration type. This includes the disk type itself, -- | The disk configuration type. This includes the disk type itself,
-- for a more complete consistency. Note that since in the Python -- for a more complete consistency. Note that since in the Python
-- code-base there's no authoritative place where we document the -- code-base there's no authoritative place where we document the
...@@ -593,8 +596,8 @@ instance TagsObject Node where ...@@ -593,8 +596,8 @@ instance TagsObject Node where
-- * NodeGroup definitions -- * NodeGroup definitions
-- | The disk parameters type. -- | The cluster/group disk parameters type.
type DiskParams = Container (Container JSValue) type GroupDiskParams = Container DiskParams
-- | A mapping from network UUIDs to nic params of the networks. -- | A mapping from network UUIDs to nic params of the networks.
type Networks = Container PartialNicParams type Networks = Container PartialNicParams
...@@ -605,7 +608,7 @@ $(buildObject "NodeGroup" "group" $ ...@@ -605,7 +608,7 @@ $(buildObject "NodeGroup" "group" $
, simpleField "ndparams" [t| PartialNDParams |] , simpleField "ndparams" [t| PartialNDParams |]
, simpleField "alloc_policy" [t| AllocPolicy |] , simpleField "alloc_policy" [t| AllocPolicy |]
, simpleField "ipolicy" [t| PartialIPolicy |] , simpleField "ipolicy" [t| PartialIPolicy |]
, simpleField "diskparams" [t| DiskParams |] , simpleField "diskparams" [t| GroupDiskParams |]
, simpleField "networks" [t| Networks |] , simpleField "networks" [t| Networks |]
] ]
++ timeStampFields ++ timeStampFields
...@@ -702,7 +705,7 @@ $(buildObject "Cluster" "cluster" $ ...@@ -702,7 +705,7 @@ $(buildObject "Cluster" "cluster" $
, simpleField "osparams_private_cluster" [t| ClusterOsParamsPrivate |] , simpleField "osparams_private_cluster" [t| ClusterOsParamsPrivate |]
, simpleField "nicparams" [t| ClusterNicParams |] , simpleField "nicparams" [t| ClusterNicParams |]
, simpleField "ndparams" [t| FilledNDParams |] , simpleField "ndparams" [t| FilledNDParams |]
, simpleField "diskparams" [t| DiskParams |] , simpleField "diskparams" [t| GroupDiskParams |]
, simpleField "candidate_pool_size" [t| Int |] , simpleField "candidate_pool_size" [t| Int |]
, simpleField "modify_etc_hosts" [t| Bool |] , simpleField "modify_etc_hosts" [t| Bool |]
, simpleField "modify_ssh_setup" [t| Bool |] , simpleField "modify_ssh_setup" [t| Bool |]
......
...@@ -213,7 +213,7 @@ $(genOpCode "OpCode" ...@@ -213,7 +213,7 @@ $(genOpCode "OpCode"
, pOsHvp , pOsHvp
, pClusterOsParams , pClusterOsParams
, pClusterOsParamsPrivate , pClusterOsParamsPrivate
, pDiskParams , pGroupDiskParams
, pCandidatePoolSize , pCandidatePoolSize
, pMaxRunningJobs , pMaxRunningJobs
, pUidPool , pUidPool
...@@ -691,7 +691,7 @@ $(genOpCode "OpCode" ...@@ -691,7 +691,7 @@ $(genOpCode "OpCode"
[ pGroupName [ pGroupName
, pNodeGroupAllocPolicy , pNodeGroupAllocPolicy
, pGroupNodeParams , pGroupNodeParams
, pDiskParams , pGroupDiskParams
, pHvState , pHvState
, pDiskState , pDiskState
, withDoc "Group-wide ipolicy specs" pIpolicy , withDoc "Group-wide ipolicy specs" pIpolicy
...@@ -712,7 +712,7 @@ $(genOpCode "OpCode" ...@@ -712,7 +712,7 @@ $(genOpCode "OpCode"
[ pGroupName [ pGroupName
, pNodeGroupAllocPolicy , pNodeGroupAllocPolicy
, pGroupNodeParams , pGroupNodeParams
, pDiskParams , pGroupDiskParams
, pHvState , pHvState
, pDiskState , pDiskState
, withDoc "Group-wide ipolicy specs" pIpolicy , withDoc "Group-wide ipolicy specs" pIpolicy
......
...@@ -94,7 +94,7 @@ module Ganeti.OpParams ...@@ -94,7 +94,7 @@ module Ganeti.OpParams
, pSkipChecks , pSkipChecks
, pIgnoreErrors , pIgnoreErrors
, pOptGroupName , pOptGroupName
, pDiskParams , pGroupDiskParams
, pHvState , pHvState
, pDiskState , pDiskState
, pIgnoreIpolicy , pIgnoreIpolicy
...@@ -651,8 +651,8 @@ pClusterOsParamsPrivate = ...@@ -651,8 +651,8 @@ pClusterOsParamsPrivate =
simpleField "osparams_private_cluster" simpleField "osparams_private_cluster"
[t| GenericContainer String (JSObject (Private JSValue)) |] [t| GenericContainer String (JSObject (Private JSValue)) |]
pDiskParams :: Field pGroupDiskParams :: Field
pDiskParams = pGroupDiskParams =
withDoc "Disk templates' parameter defaults" . withDoc "Disk templates' parameter defaults" .
optionalField $ optionalField $
simpleField "diskparams" simpleField "diskparams"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment