Skip to content

Commit 4bc00d1

Browse files
committed
aadd Admin reboot and restart endpoints to node client
1 parent 030081c commit 4bc00d1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

client/node.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,20 @@ func (n *NodeClient) NetworkListInterfaces(ctx context.Context) (result map[stri
259259
return
260260
}
261261

262+
// AdminRebootNode return all physical devices on a node
263+
func (n *NodeClient) AdminRebootNode(ctx context.Context) error {
264+
const cmd = "zos.admin.reboot"
265+
266+
return n.bus.Call(ctx, n.nodeTwin, cmd, nil, nil)
267+
}
268+
269+
// AdminRestartService return all physical devices on a node
270+
func (n *NodeClient) AdminRestartService(ctx context.Context, service string) error {
271+
const cmd = "zos.admin.restart"
272+
273+
return n.bus.Call(ctx, n.nodeTwin, cmd, service, nil)
274+
}
275+
262276
// NetworkListAllInterfaces return all physical devices on a node
263277
func (n *NodeClient) NetworkListAllInterfaces(ctx context.Context) (result map[string]Interface, err error) {
264278
const cmd = "zos.network.admin.interfaces"

0 commit comments

Comments
 (0)