+def PowercycleNode(opts, args):
+ """Remove a node from the cluster.
+
+ @param opts: the command line options selected by the user
+ @type args: list
+ @param args: should contain only one element, the name of
+ the node to be removed
+ @rtype: int
+ @return: the desired exit code
+
+ """
+ node = args[0]
+ if (not opts.confirm and
+ not AskUser("Are you sure you want to hard powercycle node %s?" % node)):
+ return 2
+
+ op = opcodes.OpPowercycleNode(node_name=node, force=opts.force)
+ result = SubmitOpCode(op)
+ ToStderr(result)
+ return 0
+
+