]
~doc:"This call tests if a location is valid"
~allowed_roles:_R_POOL_OP
+ ~result:(String, "An XMLRPC result")
()
(** A pool class *)
~params:[Ref _vmpp, "vmpp", "The protection policy to execute";]
~doc:"This call executes the protection policy immediately"
~allowed_roles:_R_POOL_OP
+ ~result:(String, "An XMLRPC result")
()
let vmpp_archive_now = call ~flags:[`Session]
~name:"archive_now"
~params:[Ref _vm, "snapshot", "The snapshot to archive";]
~doc:"This call archives the snapshot provided as a parameter"
~allowed_roles:_R_VM_POWER_ADMIN
+ ~result:(String, "An XMLRPC result")
()
let vmpp_backup_type = Enum ("vmpp_backup_type",
[
Rbac_audit.append_line ~raw:true "%s" line;
()
-let test_archive_target ~__context ~self ~config = ()
+let test_archive_target ~__context ~self ~config =
+ Xapi_plugins.call_plugin
+ (Context.get_session_id __context)
+ Xapi_vmpp.vmpr_plugin
+ "test_archive_target"
+ config
+
+
val set_vswitch_controller : __context:Context.t -> address:string -> unit
val audit_log_append : __context:Context.t -> line:string -> unit
-val test_archive_target : __context:Context.t -> self:API.ref_pool -> config:API.string_to_string_map -> unit
+val test_archive_target : __context:Context.t -> self:API.ref_pool -> config:API.string_to_string_map -> string
module D = Debug.Debugger(struct let name="xapi" end)
open D
+let vmpr_plugin = "vmpr"
+
(*
val protect_now : __context:Context.t -> self:ref_VMPP -> unit
val archive_now : __context:Context.t -> self:ref_VM -> unit
let destroy ~__context ~self =
Db.VMPP.destroy ~__context ~self
-let protect_now ~__context ~vmpp = ()
-let archive_now ~__context ~snapshot = ()
+let protect_now ~__context ~vmpp =
+ let vmpp_uuid = Db.VMPP.get_uuid ~__context ~self:vmpp in
+ let args = [ "vmpp_uuid", vmpp_uuid ] in
+ Xapi_plugins.call_plugin
+ (Context.get_session_id __context)
+ vmpr_plugin
+ "protect_now"
+ args
+
+let archive_now ~__context ~snapshot = ""
+(*
+ let archive_target_config
+ Xapi_plugins.call_plugin
+ (Context.get_session_id __context)
+ vmpr_plugin
+ "mount_archive_target"
+ args
+
+ Xapi_plugins.call_plugin
+ (Context.get_session_id __context)
+ vmpr_plugin
+ "unmount_archive_target"
+ args
+*)
let set_is_backup_running ~__context ~self ~value =
Db.VMPP.set_is_backup_running ~__context ~self ~value