Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
fd934a28
Commit
fd934a28
authored
16 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Some whitespace changes
Aligned the comments in Instance.hs
parent
7dfaafb1
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Instance.hs
+12
-12
12 additions, 12 deletions
src/Instance.hs
with
12 additions
and
12 deletions
src/Instance.hs
+
12
−
12
View file @
fd934a28
...
...
@@ -6,11 +6,11 @@ intelligence is in the "Node" and "Cluster" modules.
-}
module
Instance
where
data
Instance
=
Instance
{
mem
::
Int
-- ^ memory of the instance
,
dsk
::
Int
-- ^ disk size of instance
data
Instance
=
Instance
{
mem
::
Int
-- ^ memory of the instance
,
dsk
::
Int
-- ^ disk size of instance
,
pnode
::
Int
-- ^ original primary node
,
snode
::
Int
-- ^ original secondary node
,
idx
::
Int
-- ^ internal index for book-keeping
,
idx
::
Int
-- ^ internal index for book-keeping
}
deriving
(
Show
)
create
::
String
->
String
->
Int
->
Int
->
Instance
...
...
@@ -23,27 +23,27 @@ create mem_init dsk_init pn sn = Instance {
}
-- | Changes the primary node of the instance.
setPri
::
Instance
-- ^ the original instance
->
Int
-- ^ the new primary node
setPri
::
Instance
-- ^ the original instance
->
Int
-- ^ the new primary node
->
Instance
-- ^ the modified instance
setPri
t
p
=
t
{
pnode
=
p
}
-- | Changes the secondary node of the instance.
setSec
::
Instance
-- ^ the original instance
->
Int
-- ^ the new secondary node
setSec
::
Instance
-- ^ the original instance
->
Int
-- ^ the new secondary node
->
Instance
-- ^ the modified instance
setSec
t
s
=
t
{
snode
=
s
}
-- | Changes both nodes of the instance.
setBoth
::
Instance
-- ^ the original instance
->
Int
-- ^ new primary node index
->
Int
-- ^ new secondary node index
setBoth
::
Instance
-- ^ the original instance
->
Int
-- ^ new primary node index
->
Int
-- ^ new secondary node index
->
Instance
-- ^ the modified instance
setBoth
t
p
s
=
t
{
pnode
=
p
,
snode
=
s
}
-- | Changes the index.
-- This is used only during the building of the data structures.
setIdx
::
Instance
-- ^ the original instance
->
Int
-- ^ new index
setIdx
::
Instance
-- ^ the original instance
->
Int
-- ^ new index
->
Instance
-- ^ the modified instance
setIdx
t
i
=
t
{
idx
=
i
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment