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:
@@ -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()
|
||||
|
@@ -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()
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user