Skip to content

Commit 7bb7333

Browse files
committed
Move Datamodel Messagee type into a submodule
Signed-off-by: Jon Ludlam <[email protected]>
1 parent 8d1f028 commit 7bb7333

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

ocaml/idl/datamodel.ml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9215,7 +9215,7 @@ module Blob = struct
92159215
()
92169216
end
92179217

9218-
let message =
9218+
module Message = struct
92199219
let cls =
92209220
Enum ("cls", [ "VM", "VM";
92219221
"Host", "Host";
@@ -9226,7 +9226,7 @@ let message =
92269226
"PVS_proxy","PVS_proxy";
92279227
"VDI","VDI";
92289228
])
9229-
in
9229+
92309230
let create = call
92319231
~name:"create"
92329232
~in_product_since:rel_orlando
@@ -9239,15 +9239,15 @@ let message =
92399239
~result:(Ref _message, "The reference of the created message")
92409240
~allowed_roles:_R_POOL_OP
92419241
()
9242-
in
9242+
92439243
let destroy = call
92449244
~name:"destroy"
92459245
~in_product_since:rel_orlando
92469246
~params:[Ref _message, "self", "The reference of the message to destroy"]
92479247
~flags:[`Session]
92489248
~allowed_roles:_R_POOL_OP
92499249
()
9250-
in
9250+
92519251
let get_all = call
92529252
~name:"get_all"
92539253
~in_product_since:rel_orlando
@@ -9256,7 +9256,7 @@ let message =
92569256
~result:(Set(Ref _message), "The references to the messages")
92579257
~allowed_roles:_R_READ_ONLY
92589258
()
9259-
in
9259+
92609260
let get = call
92619261
~name:"get"
92629262
~in_product_since:rel_orlando
@@ -9267,7 +9267,7 @@ let message =
92679267
~result:(Map(Ref _message, Record _message), "The relevant messages")
92689268
~allowed_roles:_R_READ_ONLY
92699269
()
9270-
in
9270+
92719271
let get_since = call
92729272
~name:"get_since"
92739273
~in_product_since:rel_orlando
@@ -9276,7 +9276,7 @@ let message =
92769276
~result:(Map(Ref _message, Record _message), "The relevant messages")
92779277
~allowed_roles:_R_READ_ONLY
92789278
()
9279-
in
9279+
92809280
let get_by_uuid = call
92819281
~name:"get_by_uuid"
92829282
~in_product_since:rel_orlando
@@ -9285,7 +9285,7 @@ let message =
92859285
~result:(Ref _message, "The message reference")
92869286
~allowed_roles:_R_READ_ONLY
92879287
()
9288-
in
9288+
92899289
let get_record = call
92909290
~name:"get_record"
92919291
~in_product_since:rel_orlando
@@ -9294,7 +9294,7 @@ let message =
92949294
~result:(Record _message, "The message record")
92959295
~allowed_roles:_R_READ_ONLY
92969296
()
9297-
in
9297+
92989298
let get_all_records = call
92999299
~name:"get_all_records"
93009300
~in_product_since:rel_orlando
@@ -9303,7 +9303,7 @@ let message =
93039303
~result:(Map(Ref _message, Record _message), "The messages")
93049304
~allowed_roles:_R_READ_ONLY
93059305
()
9306-
in
9306+
93079307
let get_all_records_where = call
93089308
~name:"get_all_records_where"
93099309
~in_product_since:rel_orlando
@@ -9312,19 +9312,22 @@ let message =
93129312
~result:(Map(Ref _message, Record _message), "The messages")
93139313
~allowed_roles:_R_READ_ONLY
93149314
()
9315-
in
9316-
create_obj ~in_db:false ~in_product_since:rel_orlando ~in_oss_since:None ~persist:PersistNothing ~gen_constructor_destructor:false ~name:_message ~descr:"An message for the attention of the administrator" ~gen_events:true
9317-
~doccomments:[] ~internal_deprecated_since:None
9318-
~messages_default_allowed_roles:_R_POOL_OP
9319-
~messages:[create;destroy;get;get_all; get_since; get_record; get_by_uuid; get_all_records; get_all_records_where] ~contents:
9320-
[ uid _message;
9321-
field ~qualifier:DynamicRO ~ty:String "name" "The name of the message";
9322-
field ~qualifier:DynamicRO ~ty:Int "priority" "The message priority, 0 being low priority";
9323-
field ~qualifier:DynamicRO ~ty:cls "cls" "The class of the object this message is associated with";
9324-
field ~qualifier:DynamicRO ~ty:String "obj_uuid" "The uuid of the object this message is associated with";
9325-
field ~qualifier:DynamicRO ~ty:DateTime "timestamp" "The time at which the message was created";
9326-
field ~qualifier:DynamicRO ~ty:String "body" "The body of the message"; ]
9327-
()
9315+
9316+
let t =
9317+
create_obj ~in_db:false ~in_product_since:rel_orlando ~in_oss_since:None ~persist:PersistNothing ~gen_constructor_destructor:false ~name:_message ~descr:"An message for the attention of the administrator" ~gen_events:true
9318+
~doccomments:[] ~internal_deprecated_since:None
9319+
~messages_default_allowed_roles:_R_POOL_OP
9320+
~messages:[create;destroy;get;get_all; get_since; get_record; get_by_uuid; get_all_records; get_all_records_where] ~contents:
9321+
[ uid _message;
9322+
field ~qualifier:DynamicRO ~ty:String "name" "The name of the message";
9323+
field ~qualifier:DynamicRO ~ty:Int "priority" "The message priority, 0 being low priority";
9324+
field ~qualifier:DynamicRO ~ty:cls "cls" "The class of the object this message is associated with";
9325+
field ~qualifier:DynamicRO ~ty:String "obj_uuid" "The uuid of the object this message is associated with";
9326+
field ~qualifier:DynamicRO ~ty:DateTime "timestamp" "The time at which the message was created";
9327+
field ~qualifier:DynamicRO ~ty:String "body" "The body of the message"; ]
9328+
()
9329+
9330+
end
93289331

93299332
let secret =
93309333
let introduce = call
@@ -10410,7 +10413,7 @@ let all_system =
1041010413
User.t;
1041110414
Data_source.t;
1041210415
Blob.t;
10413-
message;
10416+
Message.t;
1041410417
secret;
1041510418
Tunnel.t;
1041610419
pci;

0 commit comments

Comments
 (0)