[BFN] Regenerated pltfm_mgr_rpc.py to the latest version (#10180) (#10208)

Signed-off-by: Taras Keryk <tarasx.keryk@intel.com>

Why I did it
The previous implementaion of API for platform component didn't have the new thrift files
How I did it
Add the new thrift-generated: pltfm_mgr_rpc.py, ttypes.py
How to verify it
Run manually 'fwutil show status' or run unit tests
    Previous command output had no information about components

    New command output
            Chassis                   Module    Component    Version    Description
            ------------------------  --------  -----------  ---------  -------------
            Chassis1                  N/A       BIOS         1.2.3     Chassis BIOS
                                                BMC          5.1       Chassis BMC
This commit is contained in:
Taras Keryk 2022-03-11 11:31:27 +02:00 committed by GitHub
parent 9cdf81230b
commit 759172dc8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,7 +304,7 @@ class Iface(object):
""" """
pass pass
def pltfm_mgr_chss_mgmt_bmc_get(self): def pltfm_mgr_chss_mgmt_bmc_ver_get(self):
pass pass
@ -1543,18 +1543,18 @@ class Client(Iface):
raise result.ouch raise result.ouch
raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_sensor_info_get failed: unknown result") raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_sensor_info_get failed: unknown result")
def pltfm_mgr_chss_mgmt_bmc_get(self): def pltfm_mgr_chss_mgmt_bmc_ver_get(self):
self.send_pltfm_mgr_chss_mgmt_bmc_get() self.send_pltfm_mgr_chss_mgmt_bmc_ver_get()
return self.recv_pltfm_mgr_chss_mgmt_bmc_get() return self.recv_pltfm_mgr_chss_mgmt_bmc_ver_get()
def send_pltfm_mgr_chss_mgmt_bmc_get(self): def send_pltfm_mgr_chss_mgmt_bmc_ver_get(self):
self._oprot.writeMessageBegin('pltfm_mgr_chss_mgmt_bmc_get', TMessageType.CALL, self._seqid) self._oprot.writeMessageBegin('pltfm_mgr_chss_mgmt_bmc_ver_get', TMessageType.CALL, self._seqid)
args = pltfm_mgr_chss_mgmt_bmc_get_args() args = pltfm_mgr_chss_mgmt_bmc_ver_get_args()
args.write(self._oprot) args.write(self._oprot)
self._oprot.writeMessageEnd() self._oprot.writeMessageEnd()
self._oprot.trans.flush() self._oprot.trans.flush()
def recv_pltfm_mgr_chss_mgmt_bmc_get(self): def recv_pltfm_mgr_chss_mgmt_bmc_ver_get(self):
iprot = self._iprot iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin() (fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION: if mtype == TMessageType.EXCEPTION:
@ -1562,14 +1562,14 @@ class Client(Iface):
x.read(iprot) x.read(iprot)
iprot.readMessageEnd() iprot.readMessageEnd()
raise x raise x
result = pltfm_mgr_chss_mgmt_bmc_get_result() result = pltfm_mgr_chss_mgmt_bmc_ver_get_result()
result.read(iprot) result.read(iprot)
iprot.readMessageEnd() iprot.readMessageEnd()
if result.success is not None: if result.success is not None:
return result.success return result.success
if result.ouch is not None: if result.ouch is not None:
raise result.ouch raise result.ouch
raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_chss_mgmt_bmc_get failed: unknown result") raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_chss_mgmt_bmc_ver_get failed: unknown result")
class Processor(Iface, TProcessor): class Processor(Iface, TProcessor):
@ -1612,7 +1612,7 @@ class Processor(Iface, TProcessor):
self._processMap["pltfm_mgr_qsfp_pwr_override_set"] = Processor.process_pltfm_mgr_qsfp_pwr_override_set self._processMap["pltfm_mgr_qsfp_pwr_override_set"] = Processor.process_pltfm_mgr_qsfp_pwr_override_set
self._processMap["pltfm_mgr_qsfp_lpmode_set"] = Processor.process_pltfm_mgr_qsfp_lpmode_set self._processMap["pltfm_mgr_qsfp_lpmode_set"] = Processor.process_pltfm_mgr_qsfp_lpmode_set
self._processMap["pltfm_mgr_sensor_info_get"] = Processor.process_pltfm_mgr_sensor_info_get self._processMap["pltfm_mgr_sensor_info_get"] = Processor.process_pltfm_mgr_sensor_info_get
self._processMap["pltfm_mgr_chss_mgmt_bmc_get"] = Processor.process_pltfm_mgr_chss_mgmt_bmc_get self._processMap["pltfm_mgr_chss_mgmt_bmc_ver_get"] = Processor.process_pltfm_mgr_chss_mgmt_bmc_ver_get
self._on_message_begin = None self._on_message_begin = None
def on_message_begin(self, func): def on_message_begin(self, func):
@ -2568,13 +2568,13 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd() oprot.writeMessageEnd()
oprot.trans.flush() oprot.trans.flush()
def process_pltfm_mgr_chss_mgmt_bmc_get(self, seqid, iprot, oprot): def process_pltfm_mgr_chss_mgmt_bmc_ver_get(self, seqid, iprot, oprot):
args = pltfm_mgr_chss_mgmt_bmc_get_args() args = pltfm_mgr_chss_mgmt_bmc_ver_get_args()
args.read(iprot) args.read(iprot)
iprot.readMessageEnd() iprot.readMessageEnd()
result = pltfm_mgr_chss_mgmt_bmc_get_result() result = pltfm_mgr_chss_mgmt_bmc_ver_get_result()
try: try:
result.success = self._handler.pltfm_mgr_chss_mgmt_bmc_get() result.success = self._handler.pltfm_mgr_chss_mgmt_bmc_ver_get()
msg_type = TMessageType.REPLY msg_type = TMessageType.REPLY
except TTransport.TTransportException: except TTransport.TTransportException:
raise raise
@ -2589,7 +2589,7 @@ class Processor(Iface, TProcessor):
logging.exception('Unexpected exception in handler') logging.exception('Unexpected exception in handler')
msg_type = TMessageType.EXCEPTION msg_type = TMessageType.EXCEPTION
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("pltfm_mgr_chss_mgmt_bmc_get", msg_type, seqid) oprot.writeMessageBegin("pltfm_mgr_chss_mgmt_bmc_ver_get", msg_type, seqid)
result.write(oprot) result.write(oprot)
oprot.writeMessageEnd() oprot.writeMessageEnd()
oprot.trans.flush() oprot.trans.flush()
@ -7613,7 +7613,7 @@ pltfm_mgr_sensor_info_get_result.thrift_spec = (
) )
class pltfm_mgr_chss_mgmt_bmc_get_args(object): class pltfm_mgr_chss_mgmt_bmc_ver_get_args(object):
def read(self, iprot): def read(self, iprot):
@ -7634,7 +7634,7 @@ class pltfm_mgr_chss_mgmt_bmc_get_args(object):
if oprot._fast_encode is not None and self.thrift_spec is not None: if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return return
oprot.writeStructBegin('pltfm_mgr_chss_mgmt_bmc_get_args') oprot.writeStructBegin('pltfm_mgr_chss_mgmt_bmc_ver_get_args')
oprot.writeFieldStop() oprot.writeFieldStop()
oprot.writeStructEnd() oprot.writeStructEnd()
@ -7651,12 +7651,12 @@ class pltfm_mgr_chss_mgmt_bmc_get_args(object):
def __ne__(self, other): def __ne__(self, other):
return not (self == other) return not (self == other)
all_structs.append(pltfm_mgr_chss_mgmt_bmc_get_args) all_structs.append(pltfm_mgr_chss_mgmt_bmc_ver_get_args)
pltfm_mgr_chss_mgmt_bmc_get_args.thrift_spec = ( pltfm_mgr_chss_mgmt_bmc_ver_get_args.thrift_spec = (
) )
class pltfm_mgr_chss_mgmt_bmc_get_result(object): class pltfm_mgr_chss_mgmt_bmc_ver_get_result(object):
""" """
Attributes: Attributes:
- success - success
@ -7697,7 +7697,7 @@ class pltfm_mgr_chss_mgmt_bmc_get_result(object):
if oprot._fast_encode is not None and self.thrift_spec is not None: if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return return
oprot.writeStructBegin('pltfm_mgr_chss_mgmt_bmc_get_result') oprot.writeStructBegin('pltfm_mgr_chss_mgmt_bmc_ver_get_result')
if self.success is not None: if self.success is not None:
oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
@ -7722,8 +7722,8 @@ class pltfm_mgr_chss_mgmt_bmc_get_result(object):
def __ne__(self, other): def __ne__(self, other):
return not (self == other) return not (self == other)
all_structs.append(pltfm_mgr_chss_mgmt_bmc_get_result) all_structs.append(pltfm_mgr_chss_mgmt_bmc_ver_get_result)
pltfm_mgr_chss_mgmt_bmc_get_result.thrift_spec = ( pltfm_mgr_chss_mgmt_bmc_ver_get_result.thrift_spec = (
(0, TType.STRING, 'success', 'UTF8', None, ), # 0 (0, TType.STRING, 'success', 'UTF8', None, ), # 0
(1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1
) )