X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fironic-virtmedia-driver.git;a=blobdiff_plain;f=src%2Fironic_virtmedia_driver%2Fvendors%2Fampere%2Ffalcon.py;fp=src%2Fironic_virtmedia_driver%2Fvendors%2Fampere%2Ffalcon.py;h=6842262bc84bc54a25180d477344d67aaed5e1da;hp=9f05326e4dbfcea520999168a95f4c7e710e75ae;hb=f0dbbaff90b48a1248f8df07828e87e2233e8d5b;hpb=ec0a80d466350d8270441deed766a72ca582f05e diff --git a/src/ironic_virtmedia_driver/vendors/ampere/falcon.py b/src/ironic_virtmedia_driver/vendors/ampere/falcon.py index 9f05326..6842262 100644 --- a/src/ironic_virtmedia_driver/vendors/ampere/falcon.py +++ b/src/ironic_virtmedia_driver/vendors/ampere/falcon.py @@ -40,7 +40,7 @@ RAW_RESTART_VMEDIA = '0x32 0xcb 0x0a 0x01' # Remote Image Service commands RAW_RESTART_RIS_CD = '0x32 0x9f 0x01 0x0b 0x01' -RAW_SET_RIS_NFS = '0x32 0x9f 0x01 0x05 0x00 0x6e 0x66 0x73' +RAW_SET_RIS_NFS = '0x32 0x9f 0x01 0x05 0x00 0x6e 0x66 0x73 0x00 0x00 0x00' RAW_SET_RIS_NFS_IP = '0x32 0x9f 0x01 0x02 0x00 %s' RAW_SET_RIS_NFS_PATH = '0x32 0x9f 0x01 0x01 0x01 %s' RAW_SET_RIS_PROGRESS = '0x32 0x9f 0x01 0x01 0x00 %s' @@ -51,7 +51,6 @@ RAW_GET_MOUNTED_IMG_COUNT = '0x32 0xd8 0x00 0x01' RAW_SET_IMG_NAME = '0x32 0xd7 0x01 0x01 0x01 0x01 %s' RAW_STOP_REDIRECT = '0x32 0xd7 0x01 0x01 0x01 0x00 %s' - class FALCON(OpenBMCIronicVirtMediaHW): def __init__(self, log): super(FALCON, self).__init__(log) @@ -200,7 +199,7 @@ class FALCON(OpenBMCIronicVirtMediaHW): def _set_nfs_server_ip(self, driver_info, task): try: - cmd = RAW_SET_RIS_NFS_IP % (self.hex_convert(driver_info['provisioning_server'])) + cmd = RAW_SET_RIS_NFS_IP % (self.hex_convert(driver_info['provisioning_server'], True, 63)) self.log.debug('Virtual media server "%s"' % driver_info['provisioning_server']) ipmitool.send_raw(task, cmd) except Exception as err: @@ -231,7 +230,7 @@ class FALCON(OpenBMCIronicVirtMediaHW): ipmitool.send_raw(task, cmd) time.sleep(2) - cmd = RAW_SET_RIS_NFS_PATH % (self.hex_convert(self.remote_share)) + cmd = RAW_SET_RIS_NFS_PATH % (self.hex_convert(self.remote_share, True, 64)) ipmitool.send_raw(task, cmd) time.sleep(2) @@ -306,7 +305,7 @@ class FALCON(OpenBMCIronicVirtMediaHW): def _set_image_name(self, image_filename, task): try: - cmd = RAW_SET_IMG_NAME % (self.hex_convert(image_filename)) + cmd = RAW_SET_IMG_NAME % (self.hex_convert(image_filename, True, 64)) self.log.debug('Setting virtual media image: %s' % image_filename) ipmitool.send_raw(task, cmd) except Exception as err: