2
0
mirror of https://opendev.org/x/pyghmi synced 2025-07-24 13:11:11 +00:00

Implement detach media

Allow detaching remote media, the converse of the attach_media call

Change-Id: I45c71e02bb817b5c26b4de87b52de90c273ce526
This commit is contained in:
Jarrod Johnson
2016-03-25 13:45:13 -04:00
parent 15ddafb8fb
commit 3d2da22dd2
3 changed files with 13 additions and 0 deletions

View File

@@ -1726,3 +1726,7 @@ class Command(object):
"""
self.oem_init()
self._oem.attach_remote_media(url, username, password)
def detach_remote_media(self):
self.oem_init()
self._oem.detach_remote_media()

View File

@@ -224,5 +224,8 @@ class OEMHandler(object):
"""
return
def detach_remote_media(self):
raise exc.UnsupportedFunctionality()
def attach_remote_media(self, imagename, username, password):
raise exc.UnsupportedFunctionality()

View File

@@ -676,3 +676,9 @@ class OEMHandler(generic.OEMHandler):
imagename, domain, path, host)
else:
raise
def detach_remote_media(self):
if self.has_megarac:
self.ipmicmd.xraw_command(
netfn=0x32, command=0x9f, data=(8, 10, 0, 0))
self.ipmicmd.xraw_command(netfn=0x32, command=0x9f, data=(8, 11))