From 76da40a820c16d551624511a49dea3353216604a Mon Sep 17 00:00:00 2001 From: "Srivatsa S. Bhat" Date: Tue, 29 Nov 2011 15:15:14 +0800 Subject: [PATCH] Add the remote protocol implementation for virNodeSuspendForDuration Implement the remote protocol for virNodeSuspendForDuration() API. --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 10 +++++++++- src/remote_protocol-structs | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index cc8f580111..ac3e7a54a4 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -4618,6 +4618,7 @@ static virDriver remote_driver = { .domainBlockPull = remoteDomainBlockPull, /* 0.9.4 */ .setKeepAlive = remoteSetKeepAlive, /* 0.9.8 */ .isAlive = remoteIsAlive, /* 0.9.8 */ + .nodeSuspendForDuration = remoteNodeSuspendForDuration, /* 0.9.8 */ }; static virNetworkDriver network_driver = { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 5ea11140cd..7d4adfc1d2 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -2269,6 +2269,13 @@ struct remote_domain_open_graphics_args { unsigned int flags; }; +struct remote_node_suspend_for_duration_args { + unsigned int target; + unsigned hyper duration; + unsigned int flags; +}; + + /*----- Protocol. -----*/ /* Define the program number, protocol version and procedure numbers here. */ @@ -2564,7 +2571,8 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246, /* autogen autogen priority:high */ REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */ REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE = 248, /* skipgen skipgen */ - REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249 /* skipgen skipgen */ + REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249, /* skipgen skipgen */ + REMOTE_PROC_NODE_SUSPEND_FOR_DURATION = 250 /* autogen autogen */ /* * Notice how the entries are grouped in sets of 10 ? diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index b460b773a0..9cbe0f6977 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -1757,6 +1757,11 @@ struct remote_domain_open_graphics_args { u_int idx; u_int flags; }; +struct remote_node_suspend_for_duration_args { + u_int target; + uint64_t duration; + u_int flags; +}; enum remote_procedure { REMOTE_PROC_OPEN = 1, REMOTE_PROC_CLOSE = 2, @@ -2007,4 +2012,5 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE = 248, REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249, + REMOTE_PROC_NODE_SUSPEND_FOR_DURATION = 250, }; -- GitLab