Skip to content

Commit 6300e9d

Browse files
committed
CA-81442: SM services are now also allowed to VM power admins
Signed-off-by: Thomas Gazagnaire <[email protected]>
1 parent 1a8d51f commit 6300e9d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

ocaml/idl/constants.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
let services_uri = "/services" (* ocaml/xapi/xapi_services.ml *)
1717
let xenops_uri = "/services/xenops" (* ocaml/xapi/xapi_services.ml *)
18+
let sm_uri = "/services/SM" (* ocaml/xapi/xapi_services.ml *)
1819
let import_vdi_uri = "/import_vdi" (* Currently unused *)
1920
let import_raw_vdi_uri = "/import_raw_vdi" (* ocaml/xapi/import_raw_vdi.ml *)
2021
let export_uri = "/export" (* ocaml/xapi/export.ml *)

ocaml/idl/datamodel.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7867,6 +7867,9 @@ let http_actions = [
78677867
("get_services_xenops", (Get, Constants.xenops_uri, false, [], _R_VM_POWER_ADMIN, []));
78687868
("post_services_xenops", (Post, Constants.xenops_uri, false, [], _R_VM_POWER_ADMIN, []));
78697869
("put_services_xenops", (Put, Constants.xenops_uri, false, [], _R_VM_POWER_ADMIN, []));
7870+
("get_services_sm", (Get, Constants.sm_uri, false, [], _R_VM_POWER_ADMIN, []));
7871+
("post_services_sm", (Post, Constants.sm_uri, false, [], _R_VM_POWER_ADMIN, []));
7872+
("put_services_sm", (Put, Constants.sm_uri, false, [], _R_VM_POWER_ADMIN, []));
78707873
("put_import", (Put, Constants.import_uri, true,
78717874
[Bool_query_arg "restore"; Bool_query_arg "force"; String_query_arg "sr_id"], _R_VM_ADMIN, []));
78727875
("put_import_metadata", (Put, Constants.import_metadata_uri, true,

ocaml/xapi/xapi.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ let common_http_handlers = [
627627
("get_services_xenops", (Http_svr.FdIO Xapi_services.get_handler));
628628
("put_services_xenops", (Http_svr.FdIO Xapi_services.get_handler));
629629
("post_services_xenops", (Http_svr.FdIO Xapi_services.get_handler));
630+
("get_services_sm", (Http_svr.FdIO Xapi_services.get_handler));
631+
("put_services_sm", (Http_svr.FdIO Xapi_services.get_handler));
632+
("post_services_sm", (Http_svr.FdIO Xapi_services.get_handler));
630633
("get_services", (Http_svr.FdIO Xapi_services.get_handler));
631634
("post_services", (Http_svr.FdIO Xapi_services.post_handler));
632635
("put_services", (Http_svr.FdIO Xapi_services.put_handler));

0 commit comments

Comments
 (0)