From 9d7782692a3a85b17dec8d03f104fe8077f82811 Mon Sep 17 00:00:00 2001 From: Juliana Motira Date: Thu, 27 Aug 2015 08:41:54 -0300 Subject: [PATCH] Add reset bmc command Change-Id: I3d027303667ade4ad3790c5c614ea01f2ead6e39 --- pyghmi/ipmi/command.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 1fce03f3..de933e2d 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -267,6 +267,13 @@ class Command(object): else: return lastresponse + def reset_bmc(self): + """Do a cold reset in BMC + """ + response = self.raw_command(netfn=6, command=2) + if 'error' in response: + raise exc.IpmiException(response['error']) + def set_bootdev(self, bootdev, persist=False,