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 =
fillIPolicy (clusterIpolicy $ configCluster cfg) (groupIpolicy ng)
-- | Computes a group\'s (merged) disk params.
getGroupDiskParams :: ConfigData -> NodeGroup -> DiskParams
getGroupDiskParams :: ConfigData -> NodeGroup -> GroupDiskParams
getGroupDiskParams cfg ng =
GenericContainer $
fillDict (fromContainer . clusterDiskparams $ configCluster cfg)
......
......@@ -61,7 +61,7 @@ module Ganeti.Objects
, FilledIPolicy(..)
, PartialIPolicy(..)
, fillIPolicy
, DiskParams
, GroupDiskParams
, NodeGroup(..)
, IpFamily(..)
, ipFamilyToRaw
......@@ -274,6 +274,9 @@ instance UuidObject PartialNic where
devType :: String
devType = "dev_type"
-- | The disk parameters type.
type DiskParams = Container JSValue
-- | The disk configuration type. This includes the disk type itself,
-- for a more complete consistency. Note that since in the Python
-- code-base there's no authoritative place where we document the
......@@ -593,8 +596,8 @@ instance TagsObject Node where
-- * NodeGroup definitions
-- | The disk parameters type.
type DiskParams = Container (Container JSValue)
-- | The cluster/group disk parameters type.
type GroupDiskParams = Container DiskParams
-- | A mapping from network UUIDs to nic params of the networks.
type Networks = Container PartialNicParams
......@@ -605,7 +608,7 @@ $(buildObject "NodeGroup" "group" $
, simpleField "ndparams" [t| PartialNDParams |]
, simpleField "alloc_policy" [t| AllocPolicy |]
, simpleField "ipolicy" [t| PartialIPolicy |]
, simpleField "diskparams" [t| DiskParams |]
, simpleField "diskparams" [t| GroupDiskParams |]
, simpleField "networks" [t| Networks |]
]
++ timeStampFields
......@@ -702,7 +705,7 @@ $(buildObject "Cluster" "cluster" $
, simpleField "osparams_private_cluster" [t| ClusterOsParamsPrivate |]
, simpleField "nicparams" [t| ClusterNicParams |]
, simpleField "ndparams" [t| FilledNDParams |]
, simpleField "diskparams" [t| DiskParams |]
, simpleField "diskparams" [t| GroupDiskParams |]
, simpleField "candidate_pool_size" [t| Int |]
, simpleField "modify_etc_hosts" [t| Bool |]
, simpleField "modify_ssh_setup" [t| Bool |]
......
......@@ -213,7 +213,7 @@ $(genOpCode "OpCode"
, pOsHvp
, pClusterOsParams
, pClusterOsParamsPrivate
, pDiskParams
, pGroupDiskParams
, pCandidatePoolSize
, pMaxRunningJobs
, pUidPool
......@@ -691,7 +691,7 @@ $(genOpCode "OpCode"
[ pGroupName
, pNodeGroupAllocPolicy
, pGroupNodeParams
, pDiskParams
, pGroupDiskParams
, pHvState
, pDiskState
, withDoc "Group-wide ipolicy specs" pIpolicy
......@@ -712,7 +712,7 @@ $(genOpCode "OpCode"
[ pGroupName
, pNodeGroupAllocPolicy
, pGroupNodeParams
, pDiskParams
, pGroupDiskParams
, pHvState
, pDiskState
, withDoc "Group-wide ipolicy specs" pIpolicy
......
......@@ -94,7 +94,7 @@ module Ganeti.OpParams
, pSkipChecks
, pIgnoreErrors
, pOptGroupName
, pDiskParams
, pGroupDiskParams
, pHvState
, pDiskState
, pIgnoreIpolicy
......@@ -651,8 +651,8 @@ pClusterOsParamsPrivate =
simpleField "osparams_private_cluster"
[t| GenericContainer String (JSObject (Private JSValue)) |]
pDiskParams :: Field
pDiskParams =
pGroupDiskParams :: Field
pGroupDiskParams =
withDoc "Disk templates' parameter defaults" .
optionalField $
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