Skip to content

Commit a4dd1f1

Browse files
thomassaBob Ball
authored andcommitted
CP-20679: PGPU.compatibility_metadata in datamodel
Add a new field to PGPU. Not changing the datamodel version number just yet: waiting until we're sure the feature will not involve any more changes to fields. Supply an empty value for the new field when calling the database constructor to create a new PGPU entry. Signed-off-by: Thomas Sanders <[email protected]>
1 parent dde58cc commit a4dd1f1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

ocaml/idl/datamodel.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9375,6 +9375,7 @@ let pgpu =
93759375
field ~qualifier:DynamicRO ~ty:(Map (Ref _vgpu_type, Int)) ~lifecycle:[Published, rel_vgpu_productisation, ""] ~default_value:(Some (VMap [])) "supported_VGPU_max_capacities" "A map relating each VGPU type supported on this GPU to the maximum number of VGPUs of that type which can run simultaneously on this GPU";
93769376
field ~qualifier:DynamicRO ~ty:(pgpu_dom0_access) ~lifecycle:[Published, rel_cream, ""] ~default_value:(Some (VEnum "enabled")) "dom0_access" "The accessibility of this device from dom0";
93779377
field ~qualifier:DynamicRO ~ty:Bool ~lifecycle:[Published, rel_cream, ""] ~default_value:(Some (VBool false)) "is_system_display_device" "Is this device the system display device";
9378+
field ~qualifier:DynamicRO ~ty:(Map (String,String)) ~lifecycle:[Prototyped, rel_vgpu_migration_tech_preview, ""] ~default_value:(Some (VMap [])) "compatibility_metadata" "PGPU metadata to determine whether a VGPU can migrate between two PGPUs";
93789379
]
93799380
()
93809381

ocaml/xapi/test_common.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ let make_pgpu ~__context ?(ref=Ref.make ()) ?(uuid=make_uuid ()) ?(pCI=Ref.null)
296296
?(is_system_display_device=false) () =
297297
Db.PGPU.create ~__context ~ref ~uuid ~pCI ~gPU_group
298298
~host ~other_config ~size ~supported_VGPU_max_capacities ~dom0_access
299-
~is_system_display_device;
299+
~is_system_display_device ~compatibility_metadata:[];
300300
Db.PGPU.set_supported_VGPU_types ~__context ~self:ref
301301
~value:supported_VGPU_types;
302302
Db.PGPU.set_enabled_VGPU_types ~__context ~self:ref

ocaml/xapi/xapi_pgpu.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ let create ~__context ~pCI ~gPU_group ~host ~other_config
4040
Db.PGPU.create ~__context ~ref:pgpu ~uuid ~pCI
4141
~gPU_group ~host ~other_config ~size
4242
~supported_VGPU_max_capacities ~dom0_access
43-
~is_system_display_device;
43+
~is_system_display_device
44+
~compatibility_metadata:[];
4445
Db.PGPU.set_supported_VGPU_types ~__context
4546
~self:pgpu ~value:supported_VGPU_types;
4647
Db.PGPU.set_enabled_VGPU_types ~__context

0 commit comments

Comments
 (0)