-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5765 from BengangY/private/bengangy/vm-anti-affin…
…ity-to-master Merge `feature/vm-anti-affinity` to `master`
- Loading branch information
Showing
50 changed files
with
2,870 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
(* | ||
* Copyright (c) Cloud Software Group, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published | ||
* by the Free Software Foundation; version 2.1 only. with the special | ||
* exception on linking described in file LICENSE. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
*) | ||
|
||
open Datamodel_types | ||
open Datamodel_common | ||
open Datamodel_roles | ||
|
||
let placement_policy = | ||
Enum | ||
( "placement_policy" | ||
, [ | ||
("anti_affinity", "Anti-affinity placement policy") | ||
; ("normal", "Default placement policy") | ||
] | ||
) | ||
|
||
let t = | ||
create_obj ~name:_vm_group ~descr:"A VM group" ~doccomments:[] | ||
~gen_constructor_destructor:true ~gen_events:true ~in_db:true ~lifecycle:[] | ||
~persist:PersistEverything ~in_oss_since:None | ||
~messages_default_allowed_roles:_R_VM_ADMIN ~messages:[] | ||
~contents: | ||
[ | ||
uid _vm_group | ||
; namespace ~name:"name" ~contents:(names None RW) () | ||
; field ~qualifier:StaticRO ~lifecycle:[] ~ty:placement_policy "placement" | ||
~default_value:(Some (VEnum "normal")) | ||
"The placement policy of the VM group" | ||
; field ~qualifier:DynamicRO ~lifecycle:[] ~ty:(Set (Ref _vm)) "VMs" | ||
"The list of VMs associated with the group" | ||
] | ||
() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.