diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json b/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json new file mode 100644 index 000000000000..044d5a2c025b --- /dev/null +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json @@ -0,0 +1,640 @@ +{ + "chassis": { + "name": "Newport", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + }, + { + "name": "counter-rotating-fan-6" + } + ], + "fan_drawers": [ + { + "name": "fantray-1", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + }, + { + "name": "counter-rotating-fan-6" + } + ] + } + ], + "psus": [ + { + "name": "psu-1" + }, + { + "name": "psu-2" + } + ], + "thermals": [ + { + "name": "com_e_driver-i2c-4-33:cpu-temp" + }, + { + "name": "com_e_driver-i2c-4-33:memory-temp" + }, + { + "name": "tmp75-i2c-3-48:chip-temp" + }, + { + "name": "tmp75-i2c-3-49:exhaust2-temp" + }, + { + "name": "tmp75-i2c-3-4a:exhaust-temp" + }, + { + "name": "tmp75-i2c-3-4b:intake-temp" + }, + { + "name": "tmp75-i2c-3-4c:tofino-temp" + }, + { + "name": "tmp75-i2c-3-4d:intake2-temp" + }, + { + "name": "coretemp-isa-0000:package-id-0" + }, + { + "name": "coretemp-isa-0000:core-0" + }, + { + "name": "coretemp-isa-0000:core-1" + }, + { + "name": "coretemp-isa-0000:core-2" + }, + { + "name": "coretemp-isa-0000:core-3" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp1" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp2" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp1" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp2" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp3" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp1" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp2" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp3" + }, + { + "name": "tmp75-i2c-3-48:chip-temp" + }, + { + "name": "tmp75-i2c-3-49:exhaust2-temp" + }, + { + "name": "tmp75-i2c-3-4a:exhaust-temp" + }, + { + "name": "tmp75-i2c-3-4b:intake-temp" + }, + { + "name": "tmp75-i2c-3-4c:tofino-temp" + }, + { + "name": "tmp75-i2c-3-4d:intake2-temp" + }, + { + "name": "coretemp-isa-0000:package-id-0" + }, + { + "name": "coretemp-isa-0000:core-0" + }, + { + "name": "coretemp-isa-0000:core-1" + }, + { + "name": "coretemp-isa-0000:core-2" + }, + { + "name": "coretemp-isa-0000:core-3" + } + ], + "sfps": [ + { + "name": "sfp1" + }, + { + "name": "sfp2" + }, + { + "name": "sfp3" + }, + { + "name": "sfp4" + }, + { + "name": "sfp5" + }, + { + "name": "sfp6" + }, + { + "name": "sfp7" + }, + { + "name": "sfp8" + }, + { + "name": "sfp9" + }, + { + "name": "sfp10" + }, + { + "name": "sfp11" + }, + { + "name": "sfp12" + }, + { + "name": "sfp13" + }, + { + "name": "sfp14" + }, + { + "name": "sfp15" + }, + { + "name": "sfp16" + }, + { + "name": "sfp17" + }, + { + "name": "sfp18" + }, + { + "name": "sfp19" + }, + { + "name": "sfp20" + }, + { + "name": "sfp21" + }, + { + "name": "sfp22" + }, + { + "name": "sfp23" + }, + { + "name": "sfp24" + }, + { + "name": "sfp25" + }, + { + "name": "sfp26" + }, + { + "name": "sfp27" + }, + { + "name": "sfp28" + }, + { + "name": "sfp29" + }, + { + "name": "sfp30" + }, + { + "name": "sfp31" + }, + { + "name": "sfp32" + } + ] + }, + "interfaces": { + "Ethernet0": { + "index": "1,1,1,1,1,1,1,1", + "lanes": "0,1,2,3,4,5,6,7", + "breakout_modes": { + "1x400G[200G]": ["Ethernet0"], + "2x200G[100G,40G]": ["Ethernet0", "Ethernet4"], + "4x100G[50G]": ["Ethernet0", "Ethernet2", "Ethernet4", "Ethernet6"], + "8x50G[25G,10G]": ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3", "Ethernet4", "Ethernet5", "Ethernet6", "Ethernet7"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet0", "Ethernet4", "Ethernet5", "Ethernet6", "Ethernet7"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3", "Ethernet4"] + } + }, + "Ethernet8": { + "index": "2,2,2,2,2,2,2,2", + "lanes": "8,9,10,11,12,13,14,15", + "breakout_modes": { + "1x400G[200G]": ["Ethernet8"], + "2x200G[100G,40G]": ["Ethernet8", "Ethernet12"], + "4x100G[50G]": ["Ethernet8", "Ethernet10", "Ethernet12", "Ethernet14"], + "8x50G[25G,10G]": ["Ethernet8", "Ethernet9", "Ethernet10", "Ethernet11", "Ethernet12", "Ethernet13", "Ethernet14", "Ethernet15"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet8", "Ethernet12", "Ethernet13", "Ethernet14", "Ethernet15"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet8", "Ethernet9", "Ethernet10", "Ethernet11", "Ethernet12"] + } + }, + "Ethernet16": { + "index": "3,3,3,3,3,3,3,3", + "lanes": "16,17,18,19,20,21,22,23", + "breakout_modes": { + "1x400G[200G]": ["Ethernet16"], + "2x200G[100G,40G]": ["Ethernet16", "Ethernet20"], + "4x100G[50G]": ["Ethernet16", "Ethernet18", "Ethernet20", "Ethernet22"], + "8x50G[25G,10G]": ["Ethernet16", "Ethernet17", "Ethernet18", "Ethernet19", "Ethernet20", "Ethernet21", "Ethernet22", "Ethernet23"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet16", "Ethernet20", "Ethernet21", "Ethernet22", "Ethernet23"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet16", "Ethernet17", "Ethernet18", "Ethernet19", "Ethernet20"] + } + }, + "Ethernet24": { + "index": "4,4,4,4,4,4,4,4", + "lanes": "24,25,26,27,28,29,30,31", + "breakout_modes": { + "1x400G[200G]": ["Ethernet24"], + "2x200G[100G,40G]": ["Ethernet24", "Ethernet28"], + "4x100G[50G]": ["Ethernet24", "Ethernet26", "Ethernet28", "Ethernet30"], + "8x50G[25G,10G]": ["Ethernet24", "Ethernet25", "Ethernet26", "Ethernet27", "Ethernet28", "Ethernet29", "Ethernet30", "Ethernet31"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet24", "Ethernet28", "Ethernet29", "Ethernet30", "Ethernet31"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet24", "Ethernet25", "Ethernet26", "Ethernet27", "Ethernet28"] + } + }, + "Ethernet32": { + "index": "5,5,5,5,5,5,5,5", + "lanes": "32,33,34,35,36,37,38,39", + "breakout_modes": { + "1x400G[200G]": ["Ethernet32"], + "2x200G[100G,40G]": ["Ethernet32", "Ethernet36"], + "4x100G[50G]": ["Ethernet32", "Ethernet34", "Ethernet36", "Ethernet38"], + "8x50G[25G,10G]": ["Ethernet32", "Ethernet33", "Ethernet34", "Ethernet35", "Ethernet36", "Ethernet37", "Ethernet38", "Ethernet39"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet32", "Ethernet36", "Ethernet37", "Ethernet38", "Ethernet39"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet32", "Ethernet33", "Ethernet34", "Ethernet35", "Ethernet36"] + } + }, + "Ethernet40": { + "index": "6,6,6,6,6,6,6,6", + "lanes": "40,41,42,43,44,45,46,47", + "breakout_modes": { + "1x400G[200G]": ["Ethernet40"], + "2x200G[100G,40G]": ["Ethernet40", "Ethernet44"], + "4x100G[50G]": ["Ethernet40", "Ethernet42", "Ethernet44", "Ethernet46"], + "8x50G[25G,10G]": ["Ethernet40", "Ethernet41", "Ethernet42", "Ethernet43", "Ethernet44", "Ethernet45", "Ethernet46", "Ethernet47"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet40", "Ethernet44", "Ethernet45", "Ethernet46", "Ethernet47"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet40", "Ethernet41", "Ethernet42", "Ethernet43", "Ethernet44"] + } + }, + "Ethernet48": { + "index": "7,7,7,7,7,7,7,7", + "lanes": "48,49,50,51,52,53,54,55", + "breakout_modes": { + "1x400G[200G]": ["Ethernet48"], + "2x200G[100G,40G]": ["Ethernet48", "Ethernet52"], + "4x100G[50G]": ["Ethernet48", "Ethernet50", "Ethernet52", "Ethernet54"], + "8x50G[25G,10G]": ["Ethernet48", "Ethernet49", "Ethernet50", "Ethernet51", "Ethernet52", "Ethernet53", "Ethernet54", "Ethernet55"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet48", "Ethernet52", "Ethernet53", "Ethernet54", "Ethernet55"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet48", "Ethernet49", "Ethernet50", "Ethernet51", "Ethernet52"] + } + }, + "Ethernet56": { + "index": "8,8,8,8,8,8,8,8", + "lanes": "56,57,58,59,60,61,62,63", + "breakout_modes": { + "1x400G[200G]": ["Ethernet56"], + "2x200G[100G,40G]": ["Ethernet56", "Ethernet60"], + "4x100G[50G]": ["Ethernet56", "Ethernet58", "Ethernet60", "Ethernet62"], + "8x50G[25G,10G]": ["Ethernet56", "Ethernet57", "Ethernet58", "Ethernet59", "Ethernet60", "Ethernet61", "Ethernet62", "Ethernet63"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet56", "Ethernet60", "Ethernet61", "Ethernet62", "Ethernet63"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet56", "Ethernet57", "Ethernet58", "Ethernet59", "Ethernet60"] + } + }, + "Ethernet64": { + "index": "9,9,9,9,9,9,9,9", + "lanes": "64,65,66,67,68,69,70,71", + "breakout_modes": { + "1x400G[200G]": ["Ethernet64"], + "2x200G[100G,40G]": ["Ethernet64", "Ethernet68"], + "4x100G[50G]": ["Ethernet64", "Ethernet66", "Ethernet68", "Ethernet70"], + "8x50G[25G,10G]": ["Ethernet64", "Ethernet65", "Ethernet66", "Ethernet67", "Ethernet68", "Ethernet69", "Ethernet70", "Ethernet71"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet64", "Ethernet68", "Ethernet69", "Ethernet70", "Ethernet71"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet64", "Ethernet65", "Ethernet66", "Ethernet67", "Ethernet68"] + } + }, + "Ethernet72": { + "index": "10,10,10,10,10,10,10,10", + "lanes": "72,73,74,75,76,77,78,79", + "breakout_modes": { + "1x400G[200G]": ["Ethernet72"], + "2x200G[100G,40G]": ["Ethernet72", "Ethernet76"], + "4x100G[50G]": ["Ethernet72", "Ethernet74", "Ethernet76", "Ethernet78"], + "8x50G[25G,10G]": ["Ethernet72", "Ethernet73", "Ethernet74", "Ethernet75", "Ethernet76", "Ethernet77", "Ethernet78", "Ethernet79"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet72", "Ethernet76", "Ethernet77", "Ethernet78", "Ethernet79"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet72", "Ethernet73", "Ethernet74", "Ethernet75", "Ethernet76"] + } + }, + "Ethernet80": { + "index": "11,11,11,11,11,11,11,11", + "lanes": "80,81,82,83,84,85,86,87", + "breakout_modes": { + "1x400G[200G]": ["Ethernet80"], + "2x200G[100G,40G]": ["Ethernet80", "Ethernet84"], + "4x100G[50G]": ["Ethernet80", "Ethernet82", "Ethernet84", "Ethernet86"], + "8x50G[25G,10G]": ["Ethernet80", "Ethernet81", "Ethernet82", "Ethernet83", "Ethernet84", "Ethernet85", "Ethernet86", "Ethernet87"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet80", "Ethernet84", "Ethernet85", "Ethernet86", "Ethernet87"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet80", "Ethernet81", "Ethernet82", "Ethernet83", "Ethernet84"] + } + }, + "Ethernet88": { + "index": "12,12,12,12,12,12,12,12", + "lanes": "88,89,90,91,92,93,94,95", + "breakout_modes": { + "1x400G[200G]": ["Ethernet88"], + "2x200G[100G,40G]": ["Ethernet88", "Ethernet92"], + "4x100G[50G]": ["Ethernet88", "Ethernet90", "Ethernet92", "Ethernet94"], + "8x50G[25G,10G]": ["Ethernet88", "Ethernet89", "Ethernet90", "Ethernet91", "Ethernet92", "Ethernet93", "Ethernet94", "Ethernet95"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet88", "Ethernet92", "Ethernet93", "Ethernet94", "Ethernet95"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet88", "Ethernet89", "Ethernet90", "Ethernet91", "Ethernet92"] + } + }, + "Ethernet96": { + "index": "13,13,13,13,13,13,13,13", + "lanes": "96,97,98,99,100,101,102,103", + "breakout_modes": { + "1x400G[200G]": ["Ethernet96"], + "2x200G[100G,40G]": ["Ethernet96", "Ethernet100"], + "4x100G[50G]": ["Ethernet96", "Ethernet98", "Ethernet100", "Ethernet102"], + "8x50G[25G,10G]": ["Ethernet96", "Ethernet97", "Ethernet98", "Ethernet99", "Ethernet100", "Ethernet101", "Ethernet102", "Ethernet103"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet96", "Ethernet100", "Ethernet101", "Ethernet102", "Ethernet103"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet96", "Ethernet97", "Ethernet98", "Ethernet99", "Ethernet100"] + } + }, + "Ethernet104": { + "index": "14,14,14,14,14,14,14,14", + "lanes": "104,105,106,107,108,109,110,111", + "breakout_modes": { + "1x400G[200G]": ["Ethernet104"], + "2x200G[100G,40G]": ["Ethernet104", "Ethernet108"], + "4x100G[50G]": ["Ethernet104", "Ethernet106", "Ethernet108", "Ethernet110"], + "8x50G[25G,10G]": ["Ethernet104", "Ethernet105", "Ethernet106", "Ethernet107", "Ethernet108", "Ethernet109", "Ethernet110", "Ethernet111"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet104", "Ethernet108", "Ethernet109", "Ethernet110", "Ethernet111"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet104", "Ethernet105", "Ethernet106", "Ethernet107", "Ethernet108"] + } + }, + "Ethernet112": { + "index": "15,15,15,15,15,15,15,15", + "lanes": "112,113,114,115,116,117,118,119", + "breakout_modes": { + "1x400G[200G]": ["Ethernet112"], + "2x200G[100G,40G]": ["Ethernet112", "Ethernet116"], + "4x100G[50G]": ["Ethernet112", "Ethernet114", "Ethernet116", "Ethernet118"], + "8x50G[25G,10G]": ["Ethernet112", "Ethernet113", "Ethernet114", "Ethernet115", "Ethernet116", "Ethernet117", "Ethernet118", "Ethernet119"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet112", "Ethernet116", "Ethernet117", "Ethernet118", "Ethernet119"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet112", "Ethernet113", "Ethernet114", "Ethernet115", "Ethernet116"] + } + }, + "Ethernet120": { + "index": "16,16,16,16,16,16,16,16", + "lanes": "120,121,122,123,124,125,126,127", + "breakout_modes": { + "1x400G[200G]": ["Ethernet120"], + "2x200G[100G,40G]": ["Ethernet120", "Ethernet124"], + "4x100G[50G]": ["Ethernet120", "Ethernet122", "Ethernet124", "Ethernet126"], + "8x50G[25G,10G]": ["Ethernet120", "Ethernet121", "Ethernet122", "Ethernet123", "Ethernet124", "Ethernet125", "Ethernet126", "Ethernet127"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet120", "Ethernet124", "Ethernet125", "Ethernet126", "Ethernet127"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet120", "Ethernet121", "Ethernet122", "Ethernet123", "Ethernet124"] + } + }, + "Ethernet128": { + "index": "17,17,17,17,17,17,17,17", + "lanes": "128,129,130,131,132,133,134,135", + "breakout_modes": { + "1x400G[200G]": ["Ethernet128"], + "2x200G[100G,40G]": ["Ethernet128", "Ethernet132"], + "4x100G[50G]": ["Ethernet128", "Ethernet130", "Ethernet132", "Ethernet134"], + "8x50G[25G,10G]": ["Ethernet128", "Ethernet129", "Ethernet130", "Ethernet131", "Ethernet132", "Ethernet133", "Ethernet134", "Ethernet135"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet128", "Ethernet132", "Ethernet133", "Ethernet134", "Ethernet135"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet128", "Ethernet129", "Ethernet130", "Ethernet131", "Ethernet132"] + } + }, + "Ethernet136": { + "index": "18,18,18,18,18,18,18,18", + "lanes": "136,137,138,139,140,141,142,143", + "breakout_modes": { + "1x400G[200G]": ["Ethernet136"], + "2x200G[100G,40G]": ["Ethernet136", "Ethernet140"], + "4x100G[50G]": ["Ethernet136", "Ethernet138", "Ethernet140", "Ethernet142"], + "8x50G[25G,10G]": ["Ethernet136", "Ethernet137", "Ethernet138", "Ethernet139", "Ethernet140", "Ethernet141", "Ethernet142", "Ethernet143"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet136", "Ethernet140", "Ethernet141", "Ethernet142", "Ethernet143"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet136", "Ethernet137", "Ethernet138", "Ethernet139", "Ethernet140"] + } + }, + "Ethernet144": { + "index": "19,19,19,19,19,19,19,19", + "lanes": "144,145,146,147,148,149,150,151", + "breakout_modes": { + "1x400G[200G]": ["Ethernet144"], + "2x200G[100G,40G]": ["Ethernet144", "Ethernet148"], + "4x100G[50G]": ["Ethernet144", "Ethernet146", "Ethernet148", "Ethernet150"], + "8x50G[25G,10G]": ["Ethernet144", "Ethernet145", "Ethernet146", "Ethernet147", "Ethernet148", "Ethernet149", "Ethernet150", "Ethernet151"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet144", "Ethernet148", "Ethernet149", "Ethernet150", "Ethernet151"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet144", "Ethernet145", "Ethernet146", "Ethernet147", "Ethernet148"] + } + }, + "Ethernet152": { + "index": "20,20,20,20,20,20,20,20", + "lanes": "152,153,154,155,156,157,158,159", + "breakout_modes": { + "1x400G[200G]": ["Ethernet152"], + "2x200G[100G,40G]": ["Ethernet152", "Ethernet156"], + "4x100G[50G]": ["Ethernet152", "Ethernet154", "Ethernet156", "Ethernet158"], + "8x50G[25G,10G]": ["Ethernet152", "Ethernet153", "Ethernet154", "Ethernet155", "Ethernet156", "Ethernet157", "Ethernet158", "Ethernet159"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet152", "Ethernet156", "Ethernet157", "Ethernet158", "Ethernet159"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet152", "Ethernet153", "Ethernet154", "Ethernet155", "Ethernet156"] + } + }, + "Ethernet160": { + "index": "21,21,21,21,21,21,21,21", + "lanes": "160,161,162,163,164,165,166,167", + "breakout_modes": { + "1x400G[200G]": ["Ethernet160"], + "2x200G[100G,40G]": ["Ethernet160", "Ethernet164"], + "4x100G[50G]": ["Ethernet160", "Ethernet162", "Ethernet164", "Ethernet166"], + "8x50G[25G,10G]": ["Ethernet160", "Ethernet161", "Ethernet162", "Ethernet163", "Ethernet164", "Ethernet165", "Ethernet166", "Ethernet167"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet160", "Ethernet164", "Ethernet165", "Ethernet166", "Ethernet167"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet160", "Ethernet161", "Ethernet162", "Ethernet163", "Ethernet164"] + } + }, + "Ethernet168": { + "index": "22,22,22,22,22,22,22,22", + "lanes": "168,169,170,171,172,173,174,175", + "breakout_modes": { + "1x400G[200G]": ["Ethernet168"], + "2x200G[100G,40G]": ["Ethernet168", "Ethernet172"], + "4x100G[50G]": ["Ethernet168", "Ethernet170", "Ethernet172", "Ethernet174"], + "8x50G[25G,10G]": ["Ethernet168", "Ethernet169", "Ethernet170", "Ethernet171", "Ethernet172", "Ethernet173", "Ethernet174", "Ethernet175"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet168", "Ethernet172", "Ethernet173", "Ethernet174", "Ethernet175"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet168", "Ethernet169", "Ethernet170", "Ethernet171", "Ethernet172"] + } + }, + "Ethernet176": { + "index": "23,23,23,23,23,23,23,23", + "lanes": "176,177,178,179,180,181,182,183", + "breakout_modes": { + "1x400G[200G]": ["Ethernet176"], + "2x200G[100G,40G]": ["Ethernet176", "Ethernet180"], + "4x100G[50G]": ["Ethernet176", "Ethernet178", "Ethernet180", "Ethernet182"], + "8x50G[25G,10G]": ["Ethernet176", "Ethernet177", "Ethernet178", "Ethernet179", "Ethernet180", "Ethernet181", "Ethernet182", "Ethernet183"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet176", "Ethernet180", "Ethernet181", "Ethernet182", "Ethernet183"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet176", "Ethernet177", "Ethernet178", "Ethernet179", "Ethernet180"] + } + }, + "Ethernet184": { + "index": "24,24,24,24,24,24,24,24", + "lanes": "184,185,186,187,188,189,190,191", + "breakout_modes": { + "1x400G[200G]": ["Ethernet184"], + "2x200G[100G,40G]": ["Ethernet184", "Ethernet188"], + "4x100G[50G]": ["Ethernet184", "Ethernet186", "Ethernet188", "Ethernet190"], + "8x50G[25G,10G]": ["Ethernet184", "Ethernet185", "Ethernet186", "Ethernet187", "Ethernet188", "Ethernet189", "Ethernet190", "Ethernet191"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet184", "Ethernet188", "Ethernet189", "Ethernet190", "Ethernet191"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet184", "Ethernet185", "Ethernet186", "Ethernet187", "Ethernet188"] + } + }, + "Ethernet192": { + "index": "25,25,25,25,25,25,25,25", + "lanes": "192,193,194,195,196,197,198,199", + "breakout_modes": { + "1x400G[200G]": ["Ethernet192"], + "2x200G[100G,40G]": ["Ethernet192", "Ethernet196"], + "4x100G[50G]": ["Ethernet192", "Ethernet194", "Ethernet196", "Ethernet198"], + "8x50G[25G,10G]": ["Ethernet192", "Ethernet193", "Ethernet194", "Ethernet195", "Ethernet196", "Ethernet197", "Ethernet198", "Ethernet199"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet192", "Ethernet196", "Ethernet197", "Ethernet198", "Ethernet199"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet192", "Ethernet193", "Ethernet194", "Ethernet195", "Ethernet196"] + } + }, + "Ethernet200": { + "index": "26,26,26,26,26,26,26,26", + "lanes": "200,201,202,203,204,205,206,207", + "breakout_modes": { + "1x400G[200G]": ["Ethernet200"], + "2x200G[100G,40G]": ["Ethernet200", "Ethernet204"], + "4x100G[50G]": ["Ethernet200", "Ethernet202", "Ethernet204", "Ethernet206"], + "8x50G[25G,10G]": ["Ethernet200", "Ethernet201", "Ethernet202", "Ethernet203", "Ethernet204", "Ethernet205", "Ethernet206", "Ethernet207"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet200", "Ethernet204", "Ethernet205", "Ethernet206", "Ethernet207"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet200", "Ethernet201", "Ethernet202", "Ethernet203", "Ethernet204"] + } + }, + "Ethernet208": { + "index": "27,27,27,27,27,27,27,27", + "lanes": "208,209,210,211,212,213,214,215", + "breakout_modes": { + "1x400G[200G]": ["Ethernet208"], + "2x200G[100G,40G]": ["Ethernet208", "Ethernet212"], + "4x100G[50G]": ["Ethernet208", "Ethernet210", "Ethernet212", "Ethernet214"], + "8x50G[25G,10G]": ["Ethernet208", "Ethernet209", "Ethernet210", "Ethernet211", "Ethernet212", "Ethernet213", "Ethernet214", "Ethernet215"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet208", "Ethernet212", "Ethernet213", "Ethernet214", "Ethernet215"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet208", "Ethernet209", "Ethernet210", "Ethernet211", "Ethernet212"] + } + }, + "Ethernet216": { + "index": "28,28,28,28,28,28,28,28", + "lanes": "216,217,218,219,220,221,222,223", + "breakout_modes": { + "1x400G[200G]": ["Ethernet216"], + "2x200G[100G,40G]": ["Ethernet216", "Ethernet220"], + "4x100G[50G]": ["Ethernet216", "Ethernet218", "Ethernet220", "Ethernet222"], + "8x50G[25G,10G]": ["Ethernet216", "Ethernet217", "Ethernet218", "Ethernet219", "Ethernet220", "Ethernet221", "Ethernet222", "Ethernet223"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet216", "Ethernet220", "Ethernet221", "Ethernet222", "Ethernet223"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet216", "Ethernet217", "Ethernet218", "Ethernet219", "Ethernet220"] + } + }, + "Ethernet224": { + "index": "29,29,29,29,29,29,29,29", + "lanes": "224,225,226,227,228,229,230,231", + "breakout_modes": { + "1x400G[200G]": ["Ethernet224"], + "2x200G[100G,40G]": ["Ethernet224", "Ethernet228"], + "4x100G[50G]": ["Ethernet224", "Ethernet226", "Ethernet228", "Ethernet230"], + "8x50G[25G,10G]": ["Ethernet224", "Ethernet225", "Ethernet226", "Ethernet227", "Ethernet228", "Ethernet229", "Ethernet230", "Ethernet231"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet224", "Ethernet228", "Ethernet229", "Ethernet230", "Ethernet231"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet224", "Ethernet225", "Ethernet226", "Ethernet227", "Ethernet228"] + } + }, + "Ethernet232": { + "index": "30,30,30,30,30,30,30,30", + "lanes": "232,233,234,235,236,237,238,239", + "breakout_modes": { + "1x400G[200G]": ["Ethernet232"], + "2x200G[100G,40G]": ["Ethernet232", "Ethernet236"], + "4x100G[50G]": ["Ethernet232", "Ethernet234", "Ethernet236", "Ethernet238"], + "8x50G[25G,10G]": ["Ethernet232", "Ethernet233", "Ethernet234", "Ethernet235", "Ethernet236", "Ethernet237", "Ethernet238", "Ethernet239"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet232", "Ethernet236", "Ethernet237", "Ethernet238", "Ethernet239"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet232", "Ethernet233", "Ethernet234", "Ethernet235", "Ethernet236"] + } + }, + "Ethernet240": { + "index": "31,31,31,31,31,31,31,31", + "lanes": "240,241,242,243,244,245,246,247", + "breakout_modes": { + "1x400G[200G]": ["Ethernet240"], + "2x200G[100G,40G]": ["Ethernet240", "Ethernet244"], + "4x100G[50G]": ["Ethernet240", "Ethernet242", "Ethernet244", "Ethernet246"], + "8x50G[25G,10G]": ["Ethernet240", "Ethernet241", "Ethernet242", "Ethernet243", "Ethernet244", "Ethernet245", "Ethernet246", "Ethernet247"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet240", "Ethernet244", "Ethernet245", "Ethernet246", "Ethernet247"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet240", "Ethernet241", "Ethernet242", "Ethernet243", "Ethernet244"] + } + }, + "Ethernet248": { + "index": "32,32,32,32,32,32,32,32", + "lanes": "248,249,250,251,252,253,254,255", + "breakout_modes": { + "1x400G[200G]": ["Ethernet248"], + "2x200G[100G,40G]": ["Ethernet248", "Ethernet252"], + "4x100G[50G]": ["Ethernet248", "Ethernet250", "Ethernet252", "Ethernet254"], + "8x50G[25G,10G]": ["Ethernet248", "Ethernet249", "Ethernet250", "Ethernet251", "Ethernet252", "Ethernet253", "Ethernet254", "Ethernet255"], + "1x200G[100G,40G](4)+4x50G[25G,10G](4)": ["Ethernet248", "Ethernet252", "Ethernet253", "Ethernet254", "Ethernet255"], + "4x50G[25G,10G](4)+1x200G[100G,40G](4)": ["Ethernet248", "Ethernet249", "Ethernet250", "Ethernet251", "Ethernet252"] + } + } + } +} diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/pmon_daemon_control.json b/device/barefoot/x86_64-accton_as9516_32d-r0/pmon_daemon_control.json index 1059cddb4fa2..a0431d47812a 100644 --- a/device/barefoot/x86_64-accton_as9516_32d-r0/pmon_daemon_control.json +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/pmon_daemon_control.json @@ -4,6 +4,6 @@ "skip_thermalctld": false, "skip_ledd": true, "skip_xcvrd": false, - "skip_psud": true, + "skip_psud": false, "skip_syseepromd": false } diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/system_health_monitoring_config.json b/device/barefoot/x86_64-accton_as9516_32d-r0/system_health_monitoring_config.json new file mode 100644 index 000000000000..654d43d81096 --- /dev/null +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "orange_blink" + } +} diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/thermal_thresholds.json b/device/barefoot/x86_64-accton_as9516_32d-r0/thermal_thresholds.json new file mode 100644 index 000000000000..fce7b337ea2f --- /dev/null +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/thermal_thresholds.json @@ -0,0 +1,52 @@ +{ + "thermals": [ + { + "com_e_driver-i2c-4-33:cpu-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "com_e_driver-i2c-4-33:memory-temp" : [85.0, 75.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-48:chip-temp" : [90.0, 80.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-49:exhaust2-temp" : [80.0, 70.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4a:exhaust-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4b:intake-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4c:tofino-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4d:intake2-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp2" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp3" : [60.0, 50.0, 11.0, 1.0] + } + ] +} \ No newline at end of file diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json index 6a9779b120ed..35df81b398d0 100644 --- a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json @@ -1,401 +1,529 @@ -{ - "chassis": { - "name": "Wedge100BF-32X-O-AC-F-BF", - "fans": [ - { - "name": "counter-rotating-fan-1" - }, - { - "name": "counter-rotating-fan-2" - }, - { - "name": "counter-rotating-fan-3" - }, - { - "name": "counter-rotating-fan-4" - }, - { - "name": "counter-rotating-fan-5" - } - ], - "fan_drawers":[ - { - "name": "fantray", - "num_fans" : 5, - "fans": [ - { - "name": "counter-rotating-fan-1" - }, - { - "name": "counter-rotating-fan-2" - }, - { - "name": "counter-rotating-fan-3" - }, - { - "name": "counter-rotating-fan-4" - }, - { - "name": "counter-rotating-fan-5" - } - ] - } - ], - "psus": [ - { - "name": "PSU 1" - }, - { - "name": "PSU 2" - } - ], - "thermals": [ - { - "name": "com_e_driver-i2c-4-33:memory-temp" - }, - { - "name": "com_e_driver-i2c-4-33:cpu-temp" - }, - { - "name": "pfe1100-i2c-7-59:temp1" - }, - { - "name": "pfe1100-i2c-7-59:temp2" - }, - { - "name": "pfe1100-i2c-7-5a:temp1" - }, - { - "name": "pfe1100-i2c-7-5a:temp2" - }, - { - "name": "tmp75-i2c-3-48:outlet-middle-temp" - }, - { - "name": "tmp75-i2c-3-49:inlet-middle-temp" - }, - { - "name": "tmp75-i2c-3-4a:inlet-left-temp" - }, - { - "name": "tmp75-i2c-3-4b:switch-temp" - }, - { - "name": "tmp75-i2c-3-4c:inlet-right-temp" - }, - { - "name": "tmp75-i2c-8-48:outlet-right-temp" - }, - { - "name": "tmp75-i2c-8-49:outlet-left-temp" - }, - { - "name": "coretemp-isa-0000:package-id-0" - }, - { - "name": "coretemp-isa-0000:core-0" - }, - { - "name": "coretemp-isa-0000:core-1" - }, - { - "name": "coretemp-isa-0000:core-2" - }, - { - "name": "coretemp-isa-0000:core-3" - } - ], - "sfps": [ - { - "name": "Ethernet0" - }, - { - "name": "Ethernet4" - }, - { - "name": "Ethernet8" - }, - { - "name": "Ethernet12" - }, - { - "name": "Ethernet16" - }, - { - "name": "Ethernet20" - }, - { - "name": "Ethernet24" - }, - { - "name": "Ethernet28" - }, - { - "name": "Ethernet32" - }, - { - "name": "Ethernet36" - }, - { - "name": "Ethernet40" - }, - { - "name": "Ethernet44" - }, - { - "name": "Ethernet48" - }, - { - "name": "Ethernet52" - }, - { - "name": "Ethernet56" - }, - { - "name": "Ethernet60" - }, - { - "name": "Ethernet64" - }, - { - "name": "Ethernet68" - }, - { - "name": "Ethernet72" - }, - { - "name": "Ethernet76" - }, - { - "name": "Ethernet80" - }, - { - "name": "Ethernet84" - }, - { - "name": "Ethernet88" - }, - { - "name": "Ethernet92" - }, - { - "name": "Ethernet96" - }, - { - "name": "Ethernet100" - }, - { - "name": "Ethernet104" - }, - { - "name": "Ethernet108" - }, - { - "name": "Ethernet112" - }, - { - "name": "Ethernet116" - }, - { - "name": "Ethernet120" - }, - { - "name": "Ethernet124" - } - ] - }, - "interfaces": { - "Ethernet0": { - "index": "1,1,1,1", - "lanes": "0,1,2,3", - "alias_at_lanes": "Ethernet0,Ethernet1,Ethernet2,Ethernet3", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet4": { - "index": "2,2,2,2", - "lanes": "4,5,6,7", - "alias_at_lanes": "Ethernet4,Ethernet5,Ethernet6,Ethernet7", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet8": { - "index": "3,3,3,3", - "lanes": "8,9,10,11", - "alias_at_lanes": "Ethernet8,Ethernet9,Ethernet10,Ethernet11", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet12": { - "index": "4,4,4,4", - "lanes": "12,13,14,15", - "alias_at_lanes": "Ethernet12,Ethernet13,Ethernet14,Ethernet15", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet16": { - "index": "5,5,5,5", - "lanes": "16,17,18,19", - "alias_at_lanes": "Ethernet16,Ethernet17,Ethernet18,Ethernet19", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet20": { - "index": "6,6,6,6", - "lanes": "20,21,22,23", - "alias_at_lanes": "Ethernet20,Ethernet21,Ethernet22,Ethernet23", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet24": { - "index": "7,7,7,7", - "lanes": "24,25,26,27", - "alias_at_lanes": "Ethernet24,Ethernet25,Ethernet26,Ethernet27", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet28": { - "index": "8,8,8,8", - "lanes": "28,29,30,31", - "alias_at_lanes": "Ethernet28,Ethernet29,Ethernet30,Ethernet31", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet32": { - "index": "9,9,9,9", - "lanes": "32,33,34,35", - "alias_at_lanes": "Ethernet32,Ethernet33,Ethernet34,Ethernet35", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet36": { - "index": "10,10,10,10", - "lanes": "36,37,38,39", - "alias_at_lanes": "Ethernet36,Ethernet37,Ethernet38,Ethernet39", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet40": { - "index": "11,11,11,11", - "lanes": "40,41,42,43", - "alias_at_lanes": "Ethernet40,Ethernet41,Ethernet42,Ethernet43", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet44": { - "index": "12,12,12,12", - "lanes": "44,45,46,47", - "alias_at_lanes": "Ethernet44,Ethernet45,Ethernet46,Ethernet47", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet48": { - "index": "13,13,13,13", - "lanes": "48,49,50,51", - "alias_at_lanes": "Ethernet48,Ethernet49,Ethernet50,Ethernet51", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet52": { - "index": "14,14,14,14", - "lanes": "52,53,54,55", - "alias_at_lanes": "Ethernet52,Ethernet53,Ethernet54,Ethernet55", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet56": { - "index": "15,15,15,15", - "lanes": "56,57,58,59", - "alias_at_lanes": "Ethernet56,Ethernet57,Ethernet58,Ethernet59", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet60": { - "index": "16,16,16,16", - "lanes": "60,61,62,63", - "alias_at_lanes": "Ethernet60,Ethernet61,Ethernet62,Ethernet63", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet64": { - "index": "17,17,17,17", - "lanes": "64,65,66,67", - "alias_at_lanes": "Ethernet64,Ethernet65,Ethernet66,Ethernet67", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet68": { - "index": "18,18,18,18", - "lanes": "68,69,70,71", - "alias_at_lanes": "Ethernet68,Ethernet69,Ethernet70,Ethernet71", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet72": { - "index": "19,19,19,19", - "lanes": "72,73,74,75", - "alias_at_lanes": "Ethernet72,Ethernet73,Ethernet74,Ethernet75", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet76": { - "index": "20,20,20,20", - "lanes": "76,77,78,79", - "alias_at_lanes": "Ethernet76,Ethernet77,Ethernet78,Ethernet79", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet80": { - "index": "21,21,21,21", - "lanes": "80,81,82,83", - "alias_at_lanes": "Ethernet80,Ethernet81,Ethernet82,Ethernet83", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet84": { - "index": "22,22,22,22", - "lanes": "84,85,86,87", - "alias_at_lanes": "Ethernet84,Ethernet85,Ethernet86,Ethernet87", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet88": { - "index": "23,23,23,23", - "lanes": "88,89,90,91", - "alias_at_lanes": "Ethernet88,Ethernet89,Ethernet90,Ethernet91", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet92": { - "index": "24,24,24,24", - "lanes": "92,93,94,95", - "alias_at_lanes": "Ethernet92,Ethernet93,Ethernet94,Ethernet95", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet96": { - "index": "25,25,25,25", - "lanes": "96,97,98,99", - "alias_at_lanes": "Ethernet96,Ethernet97,Ethernet98,Ethernet99", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet100": { - "index": "26,26,26,26", - "lanes": "100,101,102,103", - "alias_at_lanes": "Ethernet100,Ethernet101,Ethernet102,Ethernet103", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet104": { - "index": "27,27,27,27", - "lanes": "104,105,106,107", - "alias_at_lanes": "Ethernet104,Ethernet105,Ethernet106,Ethernet107", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet108": { - "index": "28,28,28,28", - "lanes": "108,109,110,111", - "alias_at_lanes": "Ethernet108,Ethernet109,Ethernet110,Ethernet111", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet112": { - "index": "29,29,29,29", - "lanes": "112,113,114,115", - "alias_at_lanes": "Ethernet112,Ethernet113,Ethernet114,Ethernet115", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet116": { - "index": "30,30,30,30", - "lanes": "116,117,118,119", - "alias_at_lanes": "Ethernet116,Ethernet117,Ethernet118,Ethernet119", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet120": { - "index": "31,31,31,31", - "lanes": "120,121,122,123", - "alias_at_lanes": "Ethernet120,Ethernet121,Ethernet122,Ethernet123", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - }, - "Ethernet124": { - "index": "32,32,32,32", - "lanes": "124,125,126,127", - "alias_at_lanes": "Ethernet124,Ethernet125,Ethernet126,Ethernet127", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" - } - } -} +{ + "chassis": { + "name": "Wedge100BF-32X-O-AC-F-BF", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + } + ], + "fan_drawers": [ + { + "name": "fantray-1", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + } + ] + } + ], + "psus": [ + { + "name": "psu-1" + }, + { + "name": "psu-2" + } + ], + "thermals": [ + { + "name": "com_e_driver-i2c-4-33:cpu-temp" + }, + { + "name": "com_e_driver-i2c-4-33:memory-temp" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp1" + }, + { + "name": "psu_driver-i2c-7-59:psu2-temp2" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp1" + }, + { + "name": "psu_driver-i2c-7-5a:psu1-temp2" + }, + { + "name": "tmp75-i2c-3-48:chip-temp" + }, + { + "name": "tmp75-i2c-3-49:exhaust2-temp" + }, + { + "name": "tmp75-i2c-3-4a:exhaust-temp" + }, + { + "name": "tmp75-i2c-3-4b:intake-temp" + }, + { + "name": "tmp75-i2c-3-4c:tofino-temp" + }, + { + "name": "tmp75-i2c-3-4d:intake2-temp" + }, + { + "name": "tmp75-i2c-8-48:outlet-right-temp" + }, + { + "name": "tmp75-i2c-8-49:outlet-left-temp" + }, + { + "name": "pch_haswell-virtual-0:temp1" + }, + { + "name": "coretemp-isa-0000:package-id-0" + }, + { + "name": "coretemp-isa-0000:core-0" + }, + { + "name": "coretemp-isa-0000:core-1" + }, + { + "name": "coretemp-isa-0000:core-2" + }, + { + "name": "coretemp-isa-0000:core-3" + }, + { + "name": "pfe1100-i2c-7-59:temp1" + }, + { + "name": "pfe1100-i2c-7-59:temp2" + }, + { + "name": "pfe1100-i2c-7-5a:temp1" + }, + { + "name": "pfe1100-i2c-7-5a:temp2" + }, + { + "name": "tmp75-i2c-3-48:outlet-middle-temp" + }, + { + "name": "tmp75-i2c-3-49:inlet-middle-temp" + }, + { + "name": "tmp75-i2c-3-4a:inlet-left-temp" + }, + { + "name": "tmp75-i2c-3-4b:switch-temp" + }, + { + "name": "tmp75-i2c-3-4c:inlet-right-temp" + } + ], + "sfps": [ + { + "name": "sfp1" + }, + { + "name": "sfp2" + }, + { + "name": "sfp3" + }, + { + "name": "sfp4" + }, + { + "name": "sfp5" + }, + { + "name": "sfp6" + }, + { + "name": "sfp7" + }, + { + "name": "sfp8" + }, + { + "name": "sfp9" + }, + { + "name": "sfp10" + }, + { + "name": "sfp11" + }, + { + "name": "sfp12" + }, + { + "name": "sfp13" + }, + { + "name": "sfp14" + }, + { + "name": "sfp15" + }, + { + "name": "sfp16" + }, + { + "name": "sfp17" + }, + { + "name": "sfp18" + }, + { + "name": "sfp19" + }, + { + "name": "sfp20" + }, + { + "name": "sfp21" + }, + { + "name": "sfp22" + }, + { + "name": "sfp23" + }, + { + "name": "sfp24" + }, + { + "name": "sfp25" + }, + { + "name": "sfp26" + }, + { + "name": "sfp27" + }, + { + "name": "sfp28" + }, + { + "name": "sfp29" + }, + { + "name": "sfp30" + }, + { + "name": "sfp31" + }, + { + "name": "sfp32" + } + ] + }, + "interfaces": { + "Ethernet0": { + "index": "1,1,1,1", + "lanes": "0,1,2,3", + "breakout_modes": { + "1x100G[40G]": ["Ethernet0"], + "2x50G": ["Ethernet0", "Ethernet2"], + "4x25G[10G]": ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3"] + } + }, + "Ethernet4": { + "index": "2,2,2,2", + "lanes": "4,5,6,7", + "breakout_modes": { + "1x100G[40G]": ["Ethernet4"], + "2x50G": ["Ethernet4", "Ethernet6"], + "4x25G[10G]": ["Ethernet4", "Ethernet5", "Ethernet6", "Ethernet7"] + } + }, + "Ethernet8": { + "index": "3,3,3,3", + "lanes": "8,9,10,11", + "breakout_modes": { + "1x100G[40G]": ["Ethernet8"], + "2x50G": ["Ethernet8", "Ethernet10"], + "4x25G[10G]": ["Ethernet8", "Ethernet9", "Ethernet10", "Ethernet11"] + } + }, + "Ethernet12": { + "index": "4,4,4,4", + "lanes": "12,13,14,15", + "breakout_modes": { + "1x100G[40G]": ["Ethernet12"], + "2x50G": ["Ethernet12", "Ethernet14"], + "4x25G[10G]": ["Ethernet12", "Ethernet13", "Ethernet14", "Ethernet15"] + } + }, + "Ethernet16": { + "index": "5,5,5,5", + "lanes": "16,17,18,19", + "breakout_modes": { + "1x100G[40G]": ["Ethernet16"], + "2x50G": ["Ethernet16", "Ethernet18"], + "4x25G[10G]": ["Ethernet16", "Ethernet17", "Ethernet18", "Ethernet19"] + } + }, + "Ethernet20": { + "index": "6,6,6,6", + "lanes": "20,21,22,23", + "breakout_modes": { + "1x100G[40G]": ["Ethernet20"], + "2x50G": ["Ethernet20", "Ethernet22"], + "4x25G[10G]": ["Ethernet20", "Ethernet21", "Ethernet22", "Ethernet23"] + } + }, + "Ethernet24": { + "index": "7,7,7,7", + "lanes": "24,25,26,27", + "breakout_modes": { + "1x100G[40G]": ["Ethernet24"], + "2x50G": ["Ethernet24", "Ethernet26"], + "4x25G[10G]": ["Ethernet24", "Ethernet25", "Ethernet26", "Ethernet27"] + } + }, + "Ethernet28": { + "index": "8,8,8,8", + "lanes": "28,29,30,31", + "breakout_modes": { + "1x100G[40G]": ["Ethernet28"], + "2x50G": ["Ethernet28", "Ethernet30"], + "4x25G[10G]": ["Ethernet28", "Ethernet29", "Ethernet30", "Ethernet31"] + } + }, + "Ethernet32": { + "index": "9,9,9,9", + "lanes": "32,33,34,35", + "breakout_modes": { + "1x100G[40G]": ["Ethernet32"], + "2x50G": ["Ethernet32", "Ethernet34"], + "4x25G[10G]": ["Ethernet32", "Ethernet33", "Ethernet34", "Ethernet35"] + } + }, + "Ethernet36": { + "index": "10,10,10,10", + "lanes": "36,37,38,39", + "breakout_modes": { + "1x100G[40G]": ["Ethernet36"], + "2x50G": ["Ethernet36", "Ethernet38"], + "4x25G[10G]": ["Ethernet36", "Ethernet37", "Ethernet38", "Ethernet39"] + } + }, + "Ethernet40": { + "index": "11,11,11,11", + "lanes": "40,41,42,43", + "breakout_modes": { + "1x100G[40G]": ["Ethernet40"], + "2x50G": ["Ethernet40", "Ethernet42"], + "4x25G[10G]": ["Ethernet40", "Ethernet41", "Ethernet42", "Ethernet43"] + } + }, + "Ethernet44": { + "index": "12,12,12,12", + "lanes": "44,45,46,47", + "breakout_modes": { + "1x100G[40G]": ["Ethernet44"], + "2x50G": ["Ethernet44", "Ethernet46"], + "4x25G[10G]": ["Ethernet44", "Ethernet45", "Ethernet46", "Ethernet47"] + } + }, + "Ethernet48": { + "index": "13,13,13,13", + "lanes": "48,49,50,51", + "breakout_modes": { + "1x100G[40G]": ["Ethernet48"], + "2x50G": ["Ethernet48", "Ethernet50"], + "4x25G[10G]": ["Ethernet48", "Ethernet49", "Ethernet50", "Ethernet51"] + } + }, + "Ethernet52": { + "index": "14,14,14,14", + "lanes": "52,53,54,55", + "breakout_modes": { + "1x100G[40G]": ["Ethernet52"], + "2x50G": ["Ethernet52", "Ethernet54"], + "4x25G[10G]": ["Ethernet52", "Ethernet53", "Ethernet54", "Ethernet55"] + } + }, + "Ethernet56": { + "index": "15,15,15,15", + "lanes": "56,57,58,59", + "breakout_modes": { + "1x100G[40G]": ["Ethernet56"], + "2x50G": ["Ethernet56", "Ethernet58"], + "4x25G[10G]": ["Ethernet56", "Ethernet57", "Ethernet58", "Ethernet59"] + } + }, + "Ethernet60": { + "index": "16,16,16,16", + "lanes": "60,61,62,63", + "breakout_modes": { + "1x100G[40G]": ["Ethernet60"], + "2x50G": ["Ethernet60", "Ethernet62"], + "4x25G[10G]": ["Ethernet60", "Ethernet61", "Ethernet62", "Ethernet63"] + } + }, + "Ethernet64": { + "index": "17,17,17,17", + "lanes": "64,65,66,67", + "breakout_modes": { + "1x100G[40G]": ["Ethernet64"], + "2x50G": ["Ethernet64", "Ethernet66"], + "4x25G[10G]": ["Ethernet64", "Ethernet65", "Ethernet66", "Ethernet67"] + } + }, + "Ethernet68": { + "index": "18,18,18,18", + "lanes": "68,69,70,71", + "breakout_modes": { + "1x100G[40G]": ["Ethernet68"], + "2x50G": ["Ethernet68", "Ethernet70"], + "4x25G[10G]": ["Ethernet68", "Ethernet69", "Ethernet70", "Ethernet71"] + } + }, + "Ethernet72": { + "index": "19,19,19,19", + "lanes": "72,73,74,75", + "breakout_modes": { + "1x100G[40G]": ["Ethernet72"], + "2x50G": ["Ethernet72", "Ethernet74"], + "4x25G[10G]": ["Ethernet72", "Ethernet73", "Ethernet74", "Ethernet75"] + } + }, + "Ethernet76": { + "index": "20,20,20,20", + "lanes": "76,77,78,79", + "breakout_modes": { + "1x100G[40G]": ["Ethernet76"], + "2x50G": ["Ethernet76", "Ethernet78"], + "4x25G[10G]": ["Ethernet76", "Ethernet77", "Ethernet78", "Ethernet79"] + } + }, + "Ethernet80": { + "index": "21,21,21,21", + "lanes": "80,81,82,83", + "breakout_modes": { + "1x100G[40G]": ["Ethernet80"], + "2x50G": ["Ethernet80", "Ethernet82"], + "4x25G[10G]": ["Ethernet80", "Ethernet81", "Ethernet82", "Ethernet83"] + } + }, + "Ethernet84": { + "index": "22,22,22,22", + "lanes": "84,85,86,87", + "breakout_modes": { + "1x100G[40G]": ["Ethernet84"], + "2x50G": ["Ethernet84", "Ethernet86"], + "4x25G[10G]": ["Ethernet84", "Ethernet85", "Ethernet86", "Ethernet87"] + } + }, + "Ethernet88": { + "index": "23,23,23,23", + "lanes": "88,89,90,91", + "breakout_modes": { + "1x100G[40G]": ["Ethernet88"], + "2x50G": ["Ethernet88", "Ethernet90"], + "4x25G[10G]": ["Ethernet88", "Ethernet89", "Ethernet90", "Ethernet91"] + } + }, + "Ethernet92": { + "index": "24,24,24,24", + "lanes": "92,93,94,95", + "breakout_modes": { + "1x100G[40G]": ["Ethernet92"], + "2x50G": ["Ethernet92", "Ethernet94"], + "4x25G[10G]": ["Ethernet92", "Ethernet93", "Ethernet94", "Ethernet95"] + } + }, + "Ethernet96": { + "index": "25,25,25,25", + "lanes": "96,97,98,99", + "breakout_modes": { + "1x100G[40G]": ["Ethernet96"], + "2x50G": ["Ethernet96", "Ethernet98"], + "4x25G[10G]": ["Ethernet96", "Ethernet97", "Ethernet98", "Ethernet99"] + } + }, + "Ethernet100": { + "index": "26,26,26,26", + "lanes": "100,101,102,103", + "breakout_modes": { + "1x100G[40G]": ["Ethernet100"], + "2x50G": ["Ethernet100", "Ethernet102"], + "4x25G[10G]": ["Ethernet100", "Ethernet101", "Ethernet102", "Ethernet103"] + } + }, + "Ethernet104": { + "index": "27,27,27,27", + "lanes": "104,105,106,107", + "breakout_modes": { + "1x100G[40G]": ["Ethernet104"], + "2x50G": ["Ethernet104", "Ethernet106"], + "4x25G[10G]": ["Ethernet104", "Ethernet105", "Ethernet106", "Ethernet107"] + } + }, + "Ethernet108": { + "index": "28,28,28,28", + "lanes": "108,109,110,111", + "breakout_modes": { + "1x100G[40G]": ["Ethernet108"], + "2x50G": ["Ethernet108", "Ethernet110"], + "4x25G[10G]": ["Ethernet108", "Ethernet109", "Ethernet110", "Ethernet111"] + } + }, + "Ethernet112": { + "index": "29,29,29,29", + "lanes": "112,113,114,115", + "breakout_modes": { + "1x100G[40G]": ["Ethernet112"], + "2x50G": ["Ethernet112", "Ethernet114"], + "4x25G[10G]": ["Ethernet112", "Ethernet113", "Ethernet112", "Ethernet113"] + } + }, + "Ethernet116": { + "index": "30,30,30,30", + "lanes": "116,117,118,119", + "breakout_modes": { + "1x100G[40G]": ["Ethernet116"], + "2x50G": ["Ethernet116", "Ethernet118"], + "4x25G[10G]": ["Ethernet116", "Ethernet117", "Ethernet118", "Ethernet119"] + } + }, + "Ethernet120": { + "index": "31,31,31,31", + "lanes": "120,121,122,123", + "breakout_modes": { + "1x100G[40G]": ["Ethernet120"], + "2x50G": ["Ethernet120", "Ethernet122"], + "4x25G[10G]": ["Ethernet120", "Ethernet121", "Ethernet122", "Ethernet123"] + } + }, + "Ethernet124": { + "index": "32,32,32,32", + "lanes": "124,125,126,127", + "breakout_modes": { + "1x100G[40G]": ["Ethernet124"], + "2x50G": ["Ethernet124", "Ethernet126"], + "4x25G[10G]": ["Ethernet124", "Ethernet125", "Ethernet126", "Ethernet127"] + } + } + } +} diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/system_health_monitoring_config.json b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/system_health_monitoring_config.json new file mode 100644 index 000000000000..654d43d81096 --- /dev/null +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "orange_blink" + } +} diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/thermal_thresholds.json b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/thermal_thresholds.json new file mode 100644 index 000000000000..03451574d508 --- /dev/null +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/thermal_thresholds.json @@ -0,0 +1,91 @@ +{ + "thermals": [ + { + "com_e_driver-i2c-4-33:cpu-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "com_e_driver-i2c-4-33:memory-temp" : [85.0, 75.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp1" : [50.0, 40.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp2" : [90.0, 80.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp1" : [50.0, 40.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp2" : [90.0, 80.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-48:chip-temp" : [90.0, 80.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-49:exhaust2-temp" : [80.0, 70.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4a:exhaust-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4b:intake-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4c:tofino-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4d:intake2-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-8-48:outlet-right-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-8-49:outlet-left-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "pch_haswell-virtual-0:temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0] + }, + { + "pfe1100-i2c-7-59:temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "pfe1100-i2c-7-59:temp2" : [60.0, 50.0, 11.0, 1.0] + }, + { + "pfe1100-i2c-7-5a:temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "pfe1100-i2c-7-5a:temp2" : [60.0, 50.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0] + } + ] +} \ No newline at end of file diff --git a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform.json b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform.json index 866706a28357..73bb6008dbba 100644 --- a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform.json +++ b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/platform.json @@ -1,394 +1,674 @@ { + "chassis": { + "name": "Mavericks", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + }, + { + "name": "counter-rotating-fan-6" + }, + { + "name": "counter-rotating-fan-7" + }, + { + "name": "counter-rotating-fan-8" + }, + { + "name": "counter-rotating-fan-9" + }, + { + "name": "counter-rotating-fan-10" + } + ], + "fan_drawers": [ + { + "name": "fantray-1", + "fans": [ + { + "name": "counter-rotating-fan-1" + }, + { + "name": "counter-rotating-fan-2" + }, + { + "name": "counter-rotating-fan-3" + }, + { + "name": "counter-rotating-fan-4" + }, + { + "name": "counter-rotating-fan-5" + } + ] + }, + { + "name": "fantray-2", + "fans": [ + { + "name": "counter-rotating-fan-6" + }, + { + "name": "counter-rotating-fan-7" + }, + { + "name": "counter-rotating-fan-8" + }, + { + "name": "counter-rotating-fan-9" + }, + { + "name": "counter-rotating-fan-10" + } + ] + } + ] + }, + "psus": [ + { + "name": "psu-1" + }, + { + "name": "psu-2" + } + ], "interfaces": { "Ethernet0": { "index": "1,1,1,1", "lanes": "0,1,2,3", - "alias_at_lanes": "Ethernet0,Ethernet1,Ethernet2,Ethernet3", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet0"], + "2x50G": ["Ethernet0", "Ethernet2"], + "4x25G[10G]": ["Ethernet0", "Ethernet1", "Ethernet2", "Ethernet3"] + } }, "Ethernet4": { "index": "2,2,2,2", "lanes": "4,5,6,7", - "alias_at_lanes": "Ethernet4,Ethernet5,Ethernet6,Ethernet7", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet4"], + "2x50G": ["Ethernet4", "Ethernet6"], + "4x25G[10G]": ["Ethernet4", "Ethernet5", "Ethernet6", "Ethernet7"] + } }, "Ethernet8": { "index": "3,3,3,3", "lanes": "8,9,10,11", - "alias_at_lanes": "Ethernet8,Ethernet9,Ethernet10,Ethernet11", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet8"], + "2x50G": ["Ethernet8", "Ethernet10"], + "4x25G[10G]": ["Ethernet8", "Ethernet9", "Ethernet10", "Ethernet11"] + } }, "Ethernet12": { "index": "4,4,4,4", "lanes": "12,13,14,15", - "alias_at_lanes": "Ethernet12,Ethernet13,Ethernet14,Ethernet15", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet12"], + "2x50G": ["Ethernet12", "Ethernet14"], + "4x25G[10G]": ["Ethernet12", "Ethernet13", "Ethernet14", "Ethernet15"] + } }, "Ethernet16": { "index": "5,5,5,5", "lanes": "16,17,18,19", - "alias_at_lanes": "Ethernet16,Ethernet17,Ethernet18,Ethernet19", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet16"], + "2x50G": ["Ethernet16", "Ethernet18"], + "4x25G[10G]": ["Ethernet16", "Ethernet17", "Ethernet18", "Ethernet19"] + } }, "Ethernet20": { "index": "6,6,6,6", "lanes": "20,21,22,23", - "alias_at_lanes": "Ethernet20,Ethernet21,Ethernet22,Ethernet23", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet20"], + "2x50G": ["Ethernet20", "Ethernet22"], + "4x25G[10G]": ["Ethernet20", "Ethernet21", "Ethernet22", "Ethernet23"] + } }, "Ethernet24": { "index": "7,7,7,7", "lanes": "24,25,26,27", - "alias_at_lanes": "Ethernet24,Ethernet25,Ethernet26,Ethernet27", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet24"], + "2x50G": ["Ethernet24", "Ethernet26"], + "4x25G[10G]": ["Ethernet24", "Ethernet25", "Ethernet26", "Ethernet27"] + } }, "Ethernet28": { "index": "8,8,8,8", "lanes": "28,29,30,31", - "alias_at_lanes": "Ethernet28,Ethernet29,Ethernet30,Ethernet31", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet28"], + "2x50G": ["Ethernet28", "Ethernet30"], + "4x25G[10G]": ["Ethernet28", "Ethernet29", "Ethernet30", "Ethernet31"] + } }, "Ethernet32": { "index": "9,9,9,9", "lanes": "32,33,34,35", - "alias_at_lanes": "Ethernet32,Ethernet33,Ethernet34,Ethernet35", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet32"], + "2x50G": ["Ethernet32", "Ethernet34"], + "4x25G[10G]": ["Ethernet32", "Ethernet33", "Ethernet34", "Ethernet35"] + } }, "Ethernet36": { "index": "10,10,10,10", "lanes": "36,37,38,39", - "alias_at_lanes": "Ethernet36,Ethernet37,Ethernet38,Ethernet39", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet36"], + "2x50G": ["Ethernet36", "Ethernet38"], + "4x25G[10G]": ["Ethernet36", "Ethernet37", "Ethernet38", "Ethernet39"] + } }, "Ethernet40": { "index": "11,11,11,11", "lanes": "40,41,42,43", - "alias_at_lanes": "Ethernet40,Ethernet41,Ethernet42,Ethernet43", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet40"], + "2x50G": ["Ethernet40", "Ethernet42"], + "4x25G[10G]": ["Ethernet40", "Ethernet41", "Ethernet42", "Ethernet43"] + } }, "Ethernet44": { "index": "12,12,12,12", "lanes": "44,45,46,47", - "alias_at_lanes": "Ethernet44,Ethernet45,Ethernet46,Ethernet47", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet44"], + "2x50G": ["Ethernet44", "Ethernet46"], + "4x25G[10G]": ["Ethernet44", "Ethernet45", "Ethernet46", "Ethernet47"] + } }, "Ethernet48": { "index": "13,13,13,13", "lanes": "48,49,50,51", - "alias_at_lanes": "Ethernet48,Ethernet49,Ethernet50,Ethernet51", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet48"], + "2x50G": ["Ethernet48", "Ethernet50"], + "4x25G[10G]": ["Ethernet48", "Ethernet49", "Ethernet50", "Ethernet51"] + } }, "Ethernet52": { "index": "14,14,14,14", "lanes": "52,53,54,55", - "alias_at_lanes": "Ethernet52,Ethernet53,Ethernet54,Ethernet55", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet52"], + "2x50G": ["Ethernet52", "Ethernet54"], + "4x25G[10G]": ["Ethernet52", "Ethernet53", "Ethernet54", "Ethernet55"] + } }, "Ethernet56": { "index": "15,15,15,15", "lanes": "56,57,58,59", - "alias_at_lanes": "Ethernet56,Ethernet57,Ethernet58,Ethernet59", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet56"], + "2x50G": ["Ethernet56", "Ethernet58"], + "4x25G[10G]": ["Ethernet56", "Ethernet57", "Ethernet58", "Ethernet59"] + } }, "Ethernet60": { "index": "16,16,16,16", "lanes": "60,61,62,63", - "alias_at_lanes": "Ethernet60,Ethernet61,Ethernet62,Ethernet63", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet60"], + "2x50G": ["Ethernet60", "Ethernet62"], + "4x25G[10G]": ["Ethernet60", "Ethernet61", "Ethernet62", "Ethernet63"] + } }, "Ethernet64": { "index": "17,17,17,17", "lanes": "64,65,66,67", - "alias_at_lanes": "Ethernet64,Ethernet65,Ethernet66,Ethernet67", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet64"], + "2x50G": ["Ethernet64", "Ethernet66"], + "4x25G[10G]": ["Ethernet64", "Ethernet65", "Ethernet66", "Ethernet67"] + } }, "Ethernet68": { "index": "18,18,18,18", "lanes": "68,69,70,71", - "alias_at_lanes": "Ethernet68,Ethernet69,Ethernet70,Ethernet71", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet68"], + "2x50G": ["Ethernet68", "Ethernet70"], + "4x25G[10G]": ["Ethernet68", "Ethernet69", "Ethernet70", "Ethernet71"] + } }, "Ethernet72": { "index": "19,19,19,19", "lanes": "72,73,74,75", - "alias_at_lanes": "Ethernet72,Ethernet73,Ethernet74,Ethernet75", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet72"], + "2x50G": ["Ethernet72", "Ethernet74"], + "4x25G[10G]": ["Ethernet72", "Ethernet73", "Ethernet74", "Ethernet75"] + } }, "Ethernet76": { "index": "20,20,20,20", "lanes": "76,77,78,79", - "alias_at_lanes": "Ethernet76,Ethernet77,Ethernet78,Ethernet79", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet76"], + "2x50G": ["Ethernet76", "Ethernet78"], + "4x25G[10G]": ["Ethernet76", "Ethernet77", "Ethernet78", "Ethernet79"] + } }, "Ethernet80": { "index": "21,21,21,21", "lanes": "80,81,82,83", - "alias_at_lanes": "Ethernet80,Ethernet81,Ethernet82,Ethernet83", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet80"], + "2x50G": ["Ethernet80", "Ethernet82"], + "4x25G[10G]": ["Ethernet80", "Ethernet81", "Ethernet82", "Ethernet83"] + } }, "Ethernet84": { "index": "22,22,22,22", "lanes": "84,85,86,87", - "alias_at_lanes": "Ethernet84,Ethernet85,Ethernet86,Ethernet87", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet84"], + "2x50G": ["Ethernet84", "Ethernet86"], + "4x25G[10G]": ["Ethernet84", "Ethernet85", "Ethernet86", "Ethernet87"] + } }, "Ethernet88": { "index": "23,23,23,23", "lanes": "88,89,90,91", - "alias_at_lanes": "Ethernet88,Ethernet89,Ethernet90,Ethernet91", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet88"], + "2x50G": ["Ethernet88", "Ethernet90"], + "4x25G[10G]": ["Ethernet88", "Ethernet89", "Ethernet90", "Ethernet91"] + } }, "Ethernet92": { "index": "24,24,24,24", "lanes": "92,93,94,95", - "alias_at_lanes": "Ethernet92,Ethernet93,Ethernet94,Ethernet95", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet92"], + "2x50G": ["Ethernet92", "Ethernet94"], + "4x25G[10G]": ["Ethernet92", "Ethernet93", "Ethernet94", "Ethernet95"] + } }, "Ethernet96": { "index": "25,25,25,25", "lanes": "96,97,98,99", - "alias_at_lanes": "Ethernet96,Ethernet97,Ethernet98,Ethernet99", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet96"], + "2x50G": ["Ethernet96", "Ethernet98"], + "4x25G[10G]": ["Ethernet96", "Ethernet97", "Ethernet98", "Ethernet99"] + } }, "Ethernet100": { "index": "26,26,26,26", "lanes": "100,101,102,103", - "alias_at_lanes": "Ethernet100,Ethernet101,Ethernet102,Ethernet103", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet100"], + "2x50G": ["Ethernet100", "Ethernet102"], + "4x25G[10G]": ["Ethernet100", "Ethernet101", "Ethernet102", "Ethernet103"] + } }, "Ethernet104": { "index": "27,27,27,27", "lanes": "104,105,106,107", - "alias_at_lanes": "Ethernet104,Ethernet105,Ethernet106,Ethernet107", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet104"], + "2x50G": ["Ethernet104", "Ethernet106"], + "4x25G[10G]": ["Ethernet104", "Ethernet105", "Ethernet106", "Ethernet107"] + } }, "Ethernet108": { "index": "28,28,28,28", "lanes": "108,109,110,111", - "alias_at_lanes": "Ethernet108,Ethernet109,Ethernet110,Ethernet111", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet108"], + "2x50G": ["Ethernet108", "Ethernet110"], + "4x25G[10G]": ["Ethernet108", "Ethernet109", "Ethernet110", "Ethernet111"] + } }, "Ethernet112": { "index": "29,29,29,29", "lanes": "112,113,114,115", - "alias_at_lanes": "Ethernet112,Ethernet113,Ethernet114,Ethernet115", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet112"], + "2x50G": ["Ethernet112", "Ethernet114"], + "4x25G[10G]": ["Ethernet112", "Ethernet113", "Ethernet114", "Ethernet115"] + } }, "Ethernet116": { "index": "30,30,30,30", "lanes": "116,117,118,119", - "alias_at_lanes": "Ethernet116,Ethernet117,Ethernet118,Ethernet119", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet116"], + "2x50G": ["Ethernet116", "Ethernet118"], + "4x25G[10G]": ["Ethernet116", "Ethernet117", "Ethernet118", "Ethernet119"] + } }, "Ethernet120": { "index": "31,31,31,31", "lanes": "120,121,122,123", - "alias_at_lanes": "Ethernet120,Ethernet121,Ethernet122,Ethernet123", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet120"], + "2x50G": ["Ethernet120", "Ethernet122"], + "4x25G[10G]": ["Ethernet120", "Ethernet121", "Ethernet122", "Ethernet123"] + } }, "Ethernet124": { "index": "32,32,32,32", "lanes": "124,125,126,127", - "alias_at_lanes": "Ethernet124,Ethernet125,Ethernet126,Ethernet127", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet124"], + "2x50G": ["Ethernet124", "Ethernet126"], + "4x25G[10G]": ["Ethernet124", "Ethernet125", "Ethernet126", "Ethernet127"] + } }, "Ethernet128": { "index": "33,33,33,33", "lanes": "128,129,130,131", - "alias_at_lanes": "Ethernet128,Ethernet129,Ethernet130,Ethernet131", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet128"], + "2x50G": ["Ethernet128", "Ethernet130"], + "4x25G[10G]": ["Ethernet128", "Ethernet129", "Ethernet130", "Ethernet131"] + } }, "Ethernet132": { "index": "34,34,34,34", "lanes": "132,133,134,135", - "alias_at_lanes": "Ethernet132,Ethernet133,Ethernet134,Ethernet135", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet132"], + "2x50G": ["Ethernet132", "Ethernet134"], + "4x25G[10G]": ["Ethernet132", "Ethernet133", "Ethernet134", "Ethernet135"] + } }, "Ethernet136": { "index": "35,35,35,35", "lanes": "136,137,138,139", - "alias_at_lanes": "Ethernet136,Ethernet137,Ethernet138,Ethernet139", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet136"], + "2x50G": ["Ethernet136", "Ethernet138"], + "4x25G[10G]": ["Ethernet136", "Ethernet137", "Ethernet138", "Ethernet139"] + } }, "Ethernet140": { "index": "36,36,36,36", "lanes": "140,141,142,143", - "alias_at_lanes": "Ethernet140,Ethernet141,Ethernet142,Ethernet143", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet140"], + "2x50G": ["Ethernet140", "Ethernet142"], + "4x25G[10G]": ["Ethernet140", "Ethernet141", "Ethernet142", "Ethernet143"] + } }, "Ethernet144": { "index": "37,37,37,37", "lanes": "144,145,146,147", - "alias_at_lanes": "Ethernet144,Ethernet145,Ethernet146,Ethernet147", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet144"], + "2x50G": ["Ethernet144", "Ethernet146"], + "4x25G[10G]": ["Ethernet144", "Ethernet145", "Ethernet146", "Ethernet147"] + } }, "Ethernet148": { "index": "38,38,38,38", "lanes": "148,149,150,151", - "alias_at_lanes": "Ethernet148,Ethernet149,Ethernet150,Ethernet151", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet148"], + "2x50G": ["Ethernet148", "Ethernet150"], + "4x25G[10G]": ["Ethernet148", "Ethernet149", "Ethernet150", "Ethernet151"] + } }, "Ethernet152": { "index": "39,39,39,39", "lanes": "152,153,154,155", - "alias_at_lanes": "Ethernet152,Ethernet153,Ethernet154,Ethernet155", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet152"], + "2x50G": ["Ethernet152", "Ethernet154"], + "4x25G[10G]": ["Ethernet152", "Ethernet153", "Ethernet154", "Ethernet155"] + } }, "Ethernet156": { "index": "40,40,40,40", "lanes": "156,157,158,159", - "alias_at_lanes": "Ethernet156,Ethernet157,Ethernet158,Ethernet159", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet156"], + "2x50G": ["Ethernet156", "Ethernet158"], + "4x25G[10G]": ["Ethernet156", "Ethernet157", "Ethernet158", "Ethernet159"] + } }, "Ethernet160": { "index": "41,41,41,41", "lanes": "160,161,162,163", - "alias_at_lanes": "Ethernet160,Ethernet161,Ethernet162,Ethernet163", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet160"], + "2x50G": ["Ethernet160", "Ethernet162"], + "4x25G[10G]": ["Ethernet160", "Ethernet161", "Ethernet162", "Ethernet163"] + } }, "Ethernet164": { "index": "42,42,42,42", "lanes": "164,165,166,167", - "alias_at_lanes": "Ethernet164,Ethernet165,Ethernet166,Ethernet167", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet164"], + "2x50G": ["Ethernet164", "Ethernet166"], + "4x25G[10G]": ["Ethernet164", "Ethernet165", "Ethernet166", "Ethernet167"] + } }, "Ethernet168": { "index": "43,43,43,43", "lanes": "168,169,170,171", - "alias_at_lanes": "Ethernet168,Ethernet169,Ethernet170,Ethernet171", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet168"], + "2x50G": ["Ethernet168", "Ethernet170"], + "4x25G[10G]": ["Ethernet168", "Ethernet169", "Ethernet170", "Ethernet171"] + } }, "Ethernet172": { "index": "44,44,44,44", "lanes": "172,173,174,175", - "alias_at_lanes": "Ethernet172,Ethernet173,Ethernet174,Ethernet175", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet172"], + "2x50G": ["Ethernet172", "Ethernet174"], + "4x25G[10G]": ["Ethernet172", "Ethernet173", "Ethernet174", "Ethernet175"] + } }, "Ethernet176": { "index": "45,45,45,45", "lanes": "176,177,178,179", - "alias_at_lanes": "Ethernet176,Ethernet177,Ethernet178,Ethernet179", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet176"], + "2x50G": ["Ethernet176", "Ethernet178"], + "4x25G[10G]": ["Ethernet176", "Ethernet177", "Ethernet178", "Ethernet179"] + } }, "Ethernet180": { "index": "46,46,46,46", "lanes": "180,181,182,183", - "alias_at_lanes": "Ethernet180,Ethernet181,Ethernet182,Ethernet183", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet180"], + "2x50G": ["Ethernet180", "Ethernet182"], + "4x25G[10G]": ["Ethernet180", "Ethernet181", "Ethernet182", "Ethernet183"] + } }, "Ethernet184": { "index": "47,47,47,47", "lanes": "184,185,186,187", - "alias_at_lanes": "Ethernet184,Ethernet185,Ethernet186,Ethernet187", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet184"], + "2x50G": ["Ethernet184", "Ethernet186"], + "4x25G[10G]": ["Ethernet184", "Ethernet185", "Ethernet186", "Ethernet187"] + } }, "Ethernet188": { "index": "48,48,48,48", "lanes": "188,189,190,191", - "alias_at_lanes": "Ethernet188,Ethernet189,Ethernet190,Ethernet191", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet188"], + "2x50G": ["Ethernet188", "Ethernet190"], + "4x25G[10G]": ["Ethernet188", "Ethernet189", "Ethernet190", "Ethernet191"] + } }, "Ethernet192": { "index": "49,49,49,49", "lanes": "192,193,194,195", - "alias_at_lanes": "Ethernet192,Ethernet193,Ethernet194,Ethernet195", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet192"], + "2x50G": ["Ethernet192", "Ethernet194"], + "4x25G[10G]": ["Ethernet192", "Ethernet193", "Ethernet194", "Ethernet195"] + } }, "Ethernet196": { "index": "50,50,50,50", "lanes": "196,197,198,199", - "alias_at_lanes": "Ethernet196,Ethernet197,Ethernet198,Ethernet199", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet196"], + "2x50G": ["Ethernet196", "Ethernet198"], + "4x25G[10G]": ["Ethernet196", "Ethernet197", "Ethernet198", "Ethernet199"] + } }, "Ethernet200": { "index": "51,51,51,51", "lanes": "200,201,202,203", - "alias_at_lanes": "Ethernet200,Ethernet201,Ethernet202,Ethernet203", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet200"], + "2x50G": ["Ethernet200", "Ethernet202"], + "4x25G[10G]": ["Ethernet200", "Ethernet201", "Ethernet202", "Ethernet203"] + } }, "Ethernet204": { "index": "52,52,52,52", "lanes": "204,205,206,207", - "alias_at_lanes": "Ethernet204,Ethernet205,Ethernet206,Ethernet207", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet204"], + "2x50G": ["Ethernet204", "Ethernet206"], + "4x25G[10G]": ["Ethernet204", "Ethernet205", "Ethernet206", "Ethernet207"] + } }, "Ethernet208": { "index": "53,53,53,53", "lanes": "208,209,210,211", - "alias_at_lanes": "Ethernet208,Ethernet209,Ethernet210,Ethernet211", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet208"], + "2x50G": ["Ethernet208", "Ethernet210"], + "4x25G[10G]": ["Ethernet208", "Ethernet209", "Ethernet210", "Ethernet211"] + } }, "Ethernet212": { "index": "54,54,54,54", "lanes": "212,213,214,215", - "alias_at_lanes": "Ethernet212,Ethernet213,Ethernet214,Ethernet215", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet212"], + "2x50G": ["Ethernet212", "Ethernet214"], + "4x25G[10G]": ["Ethernet212", "Ethernet213", "Ethernet214", "Ethernet215"] + } }, "Ethernet216": { "index": "55,55,55,55", "lanes": "216,217,218,219", - "alias_at_lanes": "Ethernet216,Ethernet217,Ethernet218,Ethernet219", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet216"], + "2x50G": ["Ethernet216", "Ethernet218"], + "4x25G[10G]": ["Ethernet216", "Ethernet217", "Ethernet218", "Ethernet219"] + } }, "Ethernet220": { "index": "56,56,56,56", "lanes": "220,221,222,223", - "alias_at_lanes": "Ethernet220,Ethernet221,Ethernet222,Ethernet223", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet220"], + "2x50G": ["Ethernet220", "Ethernet222"], + "4x25G[10G]": ["Ethernet220", "Ethernet221", "Ethernet222", "Ethernet223"] + } }, "Ethernet224": { "index": "57,57,57,57", "lanes": "224,225,226,227", - "alias_at_lanes": "Ethernet224,Ethernet225,Ethernet226,Ethernet227", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet224"], + "2x50G": ["Ethernet224", "Ethernet226"], + "4x25G[10G]": ["Ethernet224", "Ethernet225", "Ethernet226", "Ethernet227"] + } }, "Ethernet228": { "index": "58,58,58,58", "lanes": "228,229,230,231", - "alias_at_lanes": "Ethernet228,Ethernet229,Ethernet230,Ethernet231", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet228"], + "2x50G": ["Ethernet228", "Ethernet230"], + "4x25G[10G]": ["Ethernet228", "Ethernet229", "Ethernet230", "Ethernet231"] + } }, "Ethernet232": { "index": "59,59,59,59", "lanes": "232,233,234,235", - "alias_at_lanes": "Ethernet232,Ethernet233,Ethernet234,Ethernet235", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet232"], + "2x50G": ["Ethernet232", "Ethernet234"], + "4x25G[10G]": ["Ethernet232", "Ethernet233", "Ethernet234", "Ethernet235"] + } }, "Ethernet236": { "index": "60,60,60,60", "lanes": "236,237,238,239", - "alias_at_lanes": "Ethernet236,Ethernet237,Ethernet238,Ethernet239", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet236"], + "2x50G": ["Ethernet236", "Ethernet238"], + "4x25G[10G]": ["Ethernet236", "Ethernet237", "Ethernet238", "Ethernet239"] + } }, "Ethernet240": { "index": "61,61,61,61", "lanes": "240,241,242,243", - "alias_at_lanes": "Ethernet240,Ethernet241,Ethernet242,Ethernet243", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet240"], + "2x50G": ["Ethernet240", "Ethernet242"], + "4x25G[10G]": ["Ethernet240", "Ethernet241", "Ethernet242", "Ethernet243"] + } }, "Ethernet244": { "index": "62,62,62,62", "lanes": "244,245,246,247", - "alias_at_lanes": "Ethernet244,Ethernet245,Ethernet246,Ethernet247", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet244"], + "2x50G": ["Ethernet244", "Ethernet246"], + "4x25G[10G]": ["Ethernet244", "Ethernet245", "Ethernet246", "Ethernet247"] + } }, "Ethernet248": { "index": "63,63,63,63", "lanes": "248,249,250,251", - "alias_at_lanes": "Ethernet248,Ethernet249,Ethernet250,Ethernet251", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet248"], + "2x50G": ["Ethernet248", "Ethernet250"], + "4x25G[10G]": ["Ethernet248", "Ethernet249", "Ethernet250", "Ethernet251"] + } }, "Ethernet252": { "index": "64,64,64,64", "lanes": "252,253,254,255", - "alias_at_lanes": "Ethernet252,Ethernet253,Ethernet254,Ethernet255", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet252"], + "2x50G": ["Ethernet252", "Ethernet254"], + "4x25G[10G]": ["Ethernet252", "Ethernet253", "Ethernet254", "Ethernet255"] + } }, "Ethernet256": { "index": "65,65,65,65", "lanes": "256,257,258,259", - "alias_at_lanes": "Ethernet256,Ethernet257,Ethernet258,Ethernet259", - "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]" + "breakout_modes": { + "1x100G[40G]": ["Ethernet256"], + "2x50G": ["Ethernet256", "Ethernet258"], + "4x25G[10G]": ["Ethernet256", "Ethernet257", "Ethernet258", "Ethernet259"] + } } } } diff --git a/device/barefoot/x86_64-accton_wedge100bf_65x-r0/system_health_monitoring_config.json b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/system_health_monitoring_config.json new file mode 100644 index 000000000000..654d43d81096 --- /dev/null +++ b/device/barefoot/x86_64-accton_wedge100bf_65x-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": [], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault": "amber", + "normal": "green", + "booting": "orange_blink" + } +} diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py index 319d29ef1727..388b072b80f5 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py @@ -1,13 +1,21 @@ #!/usr/bin/env python try: - import sys + import time + import syslog + from sonic_platform_base.chassis_base import ChassisBase - from sonic_platform.sfp import Sfp, sfp_list_get + from sonic_platform.sfp import Sfp from sonic_platform.psu import psu_list_get from sonic_platform.fan_drawer import fan_drawer_list_get from sonic_platform.thermal import thermal_list_get from eeprom import Eeprom + + from sonic_platform.platform_thrift_client import pltfm_mgr_ready + from sonic_platform.platform_thrift_client import thrift_try + + from sonic_py_common import device_info + except ImportError as e: raise ImportError(str(e) + "- required module not found") @@ -15,15 +23,32 @@ class Chassis(ChassisBase): """ Platform-specific Chassis class """ + + PORT_START = 1 + PORT_END = 0 + PORTS_IN_BLOCK = 0 + QSFP_PORT_START = 1 + QSFP_PORT_END = 0 + QSFP_CHECK_INTERVAL = 4 + def __init__(self): ChassisBase.__init__(self) self.__eeprom = None self.__fan_drawers = None + self.__fan_list = None self.__thermals = None self.__psu_list = None self.__sfp_list = None + self.ready = False + self.phy_port_cur_state = {} + self.qsfp_interval = self.QSFP_CHECK_INTERVAL + + self.ready = False + self.phy_port_cur_state = {} + self.qsfp_interval = self.QSFP_CHECK_INTERVAL + @property def _eeprom(self): if self.__eeprom is None: @@ -44,6 +69,18 @@ def _fan_drawer_list(self): def _fan_drawer_list(self, value): pass + @property + def _fan_list(self): + if self.__fan_list is None: + self.__fan_list = [] + for fan_drawer in self._fan_drawer_list: + self.__fan_list.extend(fan_drawer._fan_list) + return self.__fan_list + + @_fan_list.setter + def _fan_list(self, value): + pass + @property def _thermal_list(self): if self.__thermals is None: @@ -67,13 +104,34 @@ def _psu_list(self, value): @property def _sfp_list(self): if self.__sfp_list is None: - self.__sfp_list = sfp_list_get() + self.__update_port_info() + self.__sfp_list = [] + for index in range(self.PORT_START, self.PORT_END + 1): + sfp_node = Sfp(index) + self.__sfp_list.append(sfp_node) return self.__sfp_list @_sfp_list.setter def _sfp_list(self, value): pass + def __update_port_info(self): + def qsfp_max_port_get(client): + return client.pltfm_mgr.pltfm_mgr_qsfp_get_max_port() + + if self.QSFP_PORT_END == 0: + platform = device_info.get_platform() + self.QSFP_PORT_END = thrift_try(qsfp_max_port_get) + exclude_cpu_port = [ + "x86_64-accton_as9516_32d-r0", + "x86_64-accton_as9516bf_32d-r0", + "x86_64-accton_wedge100bf_32x-r0" + ] + if platform in exclude_cpu_port: + self.QSFP_PORT_END -= 1 + self.PORT_END = self.QSFP_PORT_END + self.PORTS_IN_BLOCK = self.QSFP_PORT_END + def get_name(self): """ Retrieves the name of the chassis @@ -106,6 +164,14 @@ def get_serial(self): """ return self._eeprom.serial_number_str() + def get_revision(self): + """ + Retrieves the revision number of the chassis (Service tag) + Returns: + string: Revision number of chassis + """ + return self._eeprom.revision_str() + def get_sfp(self, index): """ Retrieves sfp represented by (1-based) index @@ -124,7 +190,7 @@ def get_sfp(self, index): try: sfp = self._sfp_list[index-1] except IndexError: - sys.stderr.write("SFP index {} out of range (1-{})\n".format( + syslog.syslog(syslog.LOG_ERR, "SFP index {} out of range (1-{})\n".format( index, len(self._sfp_list)-1)) return sfp @@ -158,8 +224,60 @@ def get_system_eeprom_info(self): """ return self._eeprom.system_eeprom_info() + def __get_transceiver_change_event(self, timeout=0): + forever = False + if timeout == 0: + forever = True + elif timeout > 0: + timeout = timeout / float(1000) # Convert to secs + else: + syslog.syslog(syslog.LOG_ERR, "Invalid timeout value {}".format(timeout)) + return False, {} + + phy_port_dict = {} if self.ready else {'-1': 'system_not_ready'} + + while forever or timeout > 0: + if not self.ready: + if pltfm_mgr_ready(): + self.ready = True + phy_port_dict = {} + + if self.ready and self.qsfp_interval == 0: + self.qsfp_interval = self.QSFP_CHECK_INTERVAL + + # Get presence of each SFP + for port in range(self.PORT_START, self.PORT_END + 1): + try: + sfp_resent = self.get_sfp(port).get_presence() + except Exception: + sfp_resent = False + sfp_state = '1' if sfp_resent else '0' + + if port in self.phy_port_cur_state: + if self.phy_port_cur_state[port] != sfp_state: + phy_port_dict[port] = sfp_state + else: + phy_port_dict[port] = sfp_state + + # Update port current state + self.phy_port_cur_state[port] = sfp_state + + # Break if tranceiver state has changed + if phy_port_dict: + break + + if timeout: + timeout -= 1 + + if self.qsfp_interval: + self.qsfp_interval -= 1 + + time.sleep(1) + + return self.ready, phy_port_dict + def get_change_event(self, timeout=0): - ready, event_sfp = Sfp.get_transceiver_change_event(timeout) + ready, event_sfp = self.__get_transceiver_change_event(timeout) return ready, { 'sfp': event_sfp } if ready else {} def get_reboot_cause(self): @@ -174,3 +292,48 @@ def get_reboot_cause(self): to pass a description of the reboot cause. """ return self.REBOOT_CAUSE_NON_HARDWARE, '' + + def get_position_in_parent(self): + """ + Retrieves 1-based relative physical position in parent device. If the agent cannot determine the parent-relative position + for some reason, or if the associated value of entPhysicalContainedIn is '0', then the value '-1' is returned + Returns: + integer: The 1-based relative physical position in parent device or -1 if cannot determine the position + """ + return -1 + + def is_replaceable(self): + """ + Indicate whether this device is replaceable. + Returns: + bool: True if it is replaceable. + """ + return False + + def initizalize_system_led(self): + self.system_led = "" + return True + + def set_status_led(self, color): + """ + Sets the state of the system LED + + Args: + color: A string representing the color with which to set the + system LED + + Returns: + bool: True if system LED state is set successfully, False if not + """ + self.system_led = color + return True + + def get_status_led(self): + """ + Gets the state of the system LED + + Returns: + A string, one of the valid LED color strings which could be vendor + specified. + """ + return self.system_led diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py index 587f57826fb5..ec7112b3c093 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py @@ -24,29 +24,25 @@ _platform_eeprom_map = { - "prod_name" : ("Product Name", "0x21", 12), - "odm_pcba_part_num" : ("Part Number", "0x22", 13), - "prod_ser_num" : ("Serial Number", "0x23", 12), - "ext_mac_addr" : ("Extended MAC Address Base", "0x24", 12), - "sys_mfg_date" : ("System Manufacturing Date", "0x25", 4), - "prod_ver" : ("Product Version", "0x26", 1), - "ext_mac_addr_size" : ("Extende MAC Address Size", "0x2A", 2), - "sys_mfger" : ("Manufacturer", "0x2B", 8) + "prod_name" : ("Product Name", "0x21", 12), + "odm_pcba_part_num" : ("Part Number", "0x22", 13), + "prod_ser_num" : ("Serial Number", "0x23", 12), + "ext_mac_addr" : ("Extended MAC Address Base", "0x24", 12), + "sys_mfg_date" : ("System Manufacturing Date", "0x25", 4), + "prod_ver" : ("Product Version", "0x26", 1), + "ext_mac_addr_size" : ("Extende MAC Address Size", "0x2A", 2), + "sys_mfger" : ("Manufacturer", "0x2B", 8) } -_product_dict = { "Montara" : "Wedge100BF-32X-O-AC-F-BF", - "Lower MAV" : "Wedge100BF-65X-O-AC-F-BF", - "Upper MAV" : "Wedge100BF-65X-O-AC-F-BF" - } +_product_dict = { + "Montara" : "Wedge100BF-32X-O-AC-F-BF", + "Lower MAV" : "Wedge100BF-65X-O-AC-F-BF", + "Upper MAV" : "Wedge100BF-65X-O-AC-F-BF" +} _EEPROM_SYMLINK = "/var/run/platform/eeprom/syseeprom" _EEPROM_STATUS = "/var/run/platform/eeprom/status" -try: - _str_type = basestring -except NameError: - _str_type = str - class Eeprom(eeprom_tlvinfo.TlvInfoDecoder): def __init__(self): with open(os.path.dirname(__file__) + "/logging.conf", 'r') as f: @@ -89,7 +85,7 @@ def __eeprom_init(self, platform_eeprom): if elem is None: continue - if isinstance(val, _str_type): + if isinstance(val, str): value = val.replace('\0', '') else: value = str(val) @@ -153,3 +149,6 @@ def part_number_str(self): def modelstr(self): return self.__tlv_get(self._TLV_CODE_PRODUCT_NAME) + + def revision_str(self): + return self.__tlv_get(self._TLV_CODE_LABEL_REVISION) diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan.py new file mode 100644 index 000000000000..c13382fddb55 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan.py @@ -0,0 +1,105 @@ +try: + from sonic_platform.platform_thrift_client import thrift_try + from sonic_platform_base.fan_base import FanBase + from sonic_py_common import device_info +except ImportError as e: + raise ImportError (str(e) + "- required module not found") + +def _fan_info_get(fan_num, cb, default=None): + def get_data(client): + return client.pltfm_mgr.pltfm_mgr_fan_info_get(fan_num) + fan_info = thrift_try(get_data) + if fan_num == fan_info.fan_num: + return cb(fan_info) + if default is None: + raise LookupError + return default + +# Fan -> FanBase -> DeviceBase +class Fan(FanBase): + def __init__(self, index, fantrayindex): + self.__index = index + self.__fantrayindex = fantrayindex + + # FanBase interface methods: + # returns speed in percents + def get_speed(self): + def cb(info): return info.percent + return _fan_info_get(self.__index, cb, 0) + + def set_speed(self, percent): + # Fan tray speed controlled by BMC + return False + + # DeviceBase interface methods: + def get_name(self): + return "counter-rotating-fan-{}".format((self.__fantrayindex - 1) * self.__index + self.__index) + + def get_presence(self): + return _fan_info_get(self.__index, lambda _: True, False) + + def get_position_in_parent(self): + return self.__index + + def is_replaceable(self): + return False + + def get_status(self): + return (self.get_presence() and self.get_presence() > 0) + + def get_model(self): + """ + Retrieves the part number of the fan drawer + Returns: + string: Part number of fan drawer + """ + return 'N/A' + + def get_direction(self): + """ + Retrieves the direction of fan + Returns: + A string, either FAN_DIRECTION_INTAKE or FAN_DIRECTION_EXHAUST + depending on fan direction + """ + return 'N/A' + + def get_target_speed(self): + """ + Retrieves the target (expected) speed of the fan + Returns: + An integer, the percentage of full fan speed, in the range 0 (off) + to 100 (full speed) + """ + return self.get_speed() + + def get_speed_tolerance(self): + """ + Retrieves the speed tolerance of the fan + Returns: + An integer, the percentage of variance from target speed which is + considered tolerable + """ + if device_info.get_platform() in ["x86_64-accton_as9516_32d-r0", "x86_64-accton_as9516bf_32d-r0"]: + return 6 + return 3 + + def get_serial(self): + """ + Retrieves the serial number of the device + Returns: + string: Serial number of device + """ + return 'N/A' + + def set_status_led(self, color): + """ + Sets the state of the fan module status LED + Args: + color: A string representing the color with which to set the + fan module status LED + Returns: + bool: True if status LED state is set successfully, False if not + """ + # Fan tray status LED controlled by BMC + return False diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan_drawer.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan_drawer.py index b30ea24e0e41..269d3d43b0bf 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan_drawer.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/fan_drawer.py @@ -1,71 +1,20 @@ try: - from sonic_platform.platform_thrift_client import thrift_try from sonic_platform_base.fan_drawer_base import FanDrawerBase - from sonic_platform_base.fan_base import FanBase + from sonic_py_common import device_info + from sonic_platform.fan import Fan except ImportError as e: raise ImportError (str(e) + "- required module not found") -_MAX_FAN = 10 - -def _fan_info_get(fan_num, cb, default=None): - def get_data(client): - return client.pltfm_mgr.pltfm_mgr_fan_info_get(fan_num) - fan_info = thrift_try(get_data) - if fan_num == fan_info.fan_num: - return cb(fan_info) - if default is None: - raise LookupError - return default - -def _fan_info_get_all(): - for fan_num in range(1, _MAX_FAN + 1): - def get_data(client, fan_num=fan_num): - return client.pltfm_mgr.pltfm_mgr_fan_info_get(fan_num) - fan_info = thrift_try(get_data) - if fan_info.fan_num == fan_num: - yield fan_info - -# Fan -> FanBase -> DeviceBase -class Fan(FanBase): - def __init__(self, num): - self.__num = num - - # FanBase interface methods: - # returns speed in percents - def get_speed(self): - def cb(info): return info.percent - return _fan_info_get(self.__num, cb, 0) - - def set_speed(self, percent): - def set_fan_speed(client): - return client.pltfm_mgr.pltfm_mgr_fan_speed_set(self.__num, percent) - return thrift_try(set_fan_speed) - - # DeviceBase interface methods: - def get_name(self): - return f"counter-rotating-fan-{self.__num}" - - def get_presence(self): - return _fan_info_get(self.__num, lambda _: True, False) - - def get_position_in_parent(self): - return self.__num - - def is_replaceable(self): - return True - - def get_status(self): - return True - # FanDrawer -> FanDrawerBase -> DeviceBase class FanDrawer(FanDrawerBase): - def __init__(self): + def __init__(self, fantray_index, max_fan): # For now we return only present fans - self._fan_list = [Fan(i.fan_num) for i in _fan_info_get_all()] + self.fantrayindex = fantray_index + self._fan_list = [Fan(i, self.fantrayindex) for i in range(1, max_fan + 1)] # DeviceBase interface methods: def get_name(self): - return 'fantray' + return f"fantray-{self.fantrayindex}" def get_presence(self): return True @@ -73,5 +22,78 @@ def get_presence(self): def get_status(self): return True + def get_position_in_parent(self): + """ + Retrieves 1-based relative physical position in parent device. + Returns: + integer: The 1-based relative physical position in parent + device or -1 if cannot determine the position + """ + return self.fantrayindex + + def is_replaceable(self): + """ + Indicate whether this fan drawer is replaceable. + Returns: + bool: True if it is replaceable, False if not + """ + return False + + def get_model(self): + """ + Retrieves the part number of the fan drawer + Returns: + string: Part number of fan drawer + """ + return 'N/A' + + def get_serial(self): + """ + Retrieves the serial number of the fan drawer + Returns: + string: Serial number of the fan drawer + """ + return 'N/A' + + def set_status_led(self, color): + """ + Set led to expected color + Args: + color: A string representing the color with which to set the + fan module status LED + Returns: + bool: True if set success, False if fail. + """ + # Fan tray status LED controlled by BMC + return False + + def get_status_led(self): + """ + Gets the state of the fan drawer LED + Returns: + A string, one of the predefined STATUS_LED_COLOR_* strings above + """ + return "N/A" + + def get_maximum_consumed_power(self): + """ + Retrives the maximum power drawn by Fan Drawer + Returns: + A float, with value of the maximum consumable power of the + component. + """ + return 36.0 + def fan_drawer_list_get(): - return [FanDrawer()] + platform = device_info.get_platform() + if platform in ["x86_64-accton_as9516_32d-r0", "x86_64-accton_as9516bf_32d-r0"]: + max_fantray = 1 + max_fan = 6 + elif platform == "x86_64-accton_wedge100bf_65x-r0": + max_fantray = 2 + max_fan = 5 + else: + max_fantray = 1 + max_fan = 5 + + return [FanDrawer(i, max_fan) for i in range(1, max_fantray + 1)] diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_thrift_client.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_thrift_client.py index 96c0e09ba1c0..dff16577de74 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_thrift_client.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_thrift_client.py @@ -25,9 +25,9 @@ def open(self): self.transport = TTransport.TBufferedTransport(self.transport) bprotocol = TBinaryProtocol.TBinaryProtocol(self.transport) - pltfm_mgr_client_module = importlib.import_module(".".join(["pltfm_mgr_rpc", "pltfm_mgr_rpc"])) + self.pltfm_mgr_module = importlib.import_module(".".join(["pltfm_mgr_rpc", "pltfm_mgr_rpc"])) pltfm_mgr_protocol = TMultiplexedProtocol.TMultiplexedProtocol(bprotocol, "pltfm_mgr_rpc") - self.pltfm_mgr = pltfm_mgr_client_module.Client(pltfm_mgr_protocol) + self.pltfm_mgr = self.pltfm_mgr_module.Client(pltfm_mgr_protocol) self.transport.open() return self @@ -38,6 +38,13 @@ def __enter__(self): def __exit__(self, exc_type, exc_value, tb): self.close() +def pltfm_mgr_ready(): + try: + with ThriftClient(): + return True + except Exception: + return False + def thrift_try(func, attempts=35): for attempt in range(attempts): try: @@ -47,3 +54,12 @@ def thrift_try(func, attempts=35): if attempt + 1 == attempts: raise e time.sleep(1) + +def pltfm_mgr_try(func, default=None, thrift_attempts=35): + def pm_cb_run(client): + try: + return (None, func(client.pltfm_mgr)) + except client.pltfm_mgr_module.InvalidPltfmMgrOperation as ouch: + return (ouch.code, default) + + return thrift_try(pm_cb_run) diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/pltfm_mgr_rpc.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/pltfm_mgr_rpc.py index b256b6285fc3..419ac57ebb22 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/pltfm_mgr_rpc.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/pltfm_mgr_rpc.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.10.0) +# Autogenerated by Thrift Compiler (0.13.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -8,11 +8,14 @@ from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + import sys import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport +all_structs = [] class Iface(object): @@ -20,6 +23,7 @@ def pltfm_mgr_dummy(self, device): """ Parameters: - device + """ pass @@ -33,6 +37,7 @@ def pltfm_mgr_pwr_supply_present_get(self, ps_num): """ Parameters: - ps_num + """ pass @@ -40,6 +45,7 @@ def pltfm_mgr_pwr_supply_info_get(self, ps_num): """ Parameters: - ps_num + """ pass @@ -47,6 +53,7 @@ def pltfm_mgr_pwr_rail_info_get(self, ps_num): """ Parameters: - ps_num + """ pass @@ -55,6 +62,7 @@ def pltfm_mgr_fan_speed_set(self, fan_num, percent): Parameters: - fan_num - percent + """ pass @@ -62,6 +70,7 @@ def pltfm_mgr_fan_info_get(self, fan_num): """ Parameters: - fan_num + """ pass @@ -69,6 +78,15 @@ def pltfm_mgr_qsfp_presence_get(self, port_num): """ Parameters: - port_num + + """ + pass + + def pltfm_mgr_qsfp_detect_transceiver(self, port_num): + """ + Parameters: + - port_num + """ pass @@ -76,6 +94,7 @@ def pltfm_mgr_qsfp_info_get(self, port_num): """ Parameters: - port_num + """ pass @@ -87,6 +106,138 @@ def pltfm_mgr_qsfp_reset(self, port_num, reset): Parameters: - port_num - reset + + """ + pass + + def pltfm_mgr_qsfp_reset_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_tx_disable(self, port_num, channel_mask, disable): + """ + Parameters: + - port_num + - channel_mask + - disable + + """ + pass + + def pltfm_mgr_qsfp_chan_count_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_rx_pwr_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_tx_bias_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_tx_pwr_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_rx_los_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_tx_los_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_chan_tx_fault_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_temperature_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_voltage_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_thresholds_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_tx_is_disabled(self, port_num, channel): + """ + Parameters: + - port_num + - channel + """ pass @@ -94,6 +245,25 @@ def pltfm_mgr_qsfp_lpmode_get(self, port_num): """ Parameters: - port_num + + """ + pass + + def pltfm_mgr_qsfp_pwr_override_get(self, port_num): + """ + Parameters: + - port_num + + """ + pass + + def pltfm_mgr_qsfp_pwr_override_set(self, port_num, power_override, power_set): + """ + Parameters: + - port_num + - power_override + - power_set + """ pass @@ -102,6 +272,7 @@ def pltfm_mgr_qsfp_lpmode_set(self, port_num, lpmode): Parameters: - port_num - lpmode + """ pass @@ -109,6 +280,7 @@ def pltfm_mgr_sensor_info_get(self, options): """ Parameters: - options + """ pass @@ -124,6 +296,7 @@ def pltfm_mgr_dummy(self, device): """ Parameters: - device + """ self.send_pltfm_mgr_dummy(device) return self.recv_pltfm_mgr_dummy() @@ -211,6 +384,7 @@ def pltfm_mgr_pwr_supply_present_get(self, ps_num): """ Parameters: - ps_num + """ self.send_pltfm_mgr_pwr_supply_present_get(ps_num) return self.recv_pltfm_mgr_pwr_supply_present_get() @@ -244,6 +418,7 @@ def pltfm_mgr_pwr_supply_info_get(self, ps_num): """ Parameters: - ps_num + """ self.send_pltfm_mgr_pwr_supply_info_get(ps_num) return self.recv_pltfm_mgr_pwr_supply_info_get() @@ -277,6 +452,7 @@ def pltfm_mgr_pwr_rail_info_get(self, ps_num): """ Parameters: - ps_num + """ self.send_pltfm_mgr_pwr_rail_info_get(ps_num) return self.recv_pltfm_mgr_pwr_rail_info_get() @@ -311,6 +487,7 @@ def pltfm_mgr_fan_speed_set(self, fan_num, percent): Parameters: - fan_num - percent + """ self.send_pltfm_mgr_fan_speed_set(fan_num, percent) return self.recv_pltfm_mgr_fan_speed_set() @@ -345,6 +522,7 @@ def pltfm_mgr_fan_info_get(self, fan_num): """ Parameters: - fan_num + """ self.send_pltfm_mgr_fan_info_get(fan_num) return self.recv_pltfm_mgr_fan_info_get() @@ -378,6 +556,7 @@ def pltfm_mgr_qsfp_presence_get(self, port_num): """ Parameters: - port_num + """ self.send_pltfm_mgr_qsfp_presence_get(port_num) return self.recv_pltfm_mgr_qsfp_presence_get() @@ -407,10 +586,45 @@ def recv_pltfm_mgr_qsfp_presence_get(self): raise result.ouch raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_presence_get failed: unknown result") + def pltfm_mgr_qsfp_detect_transceiver(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_detect_transceiver(port_num) + return self.recv_pltfm_mgr_qsfp_detect_transceiver() + + def send_pltfm_mgr_qsfp_detect_transceiver(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_detect_transceiver', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_detect_transceiver_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_detect_transceiver(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_detect_transceiver_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_detect_transceiver failed: unknown result") + def pltfm_mgr_qsfp_info_get(self, port_num): """ Parameters: - port_num + """ self.send_pltfm_mgr_qsfp_info_get(port_num) return self.recv_pltfm_mgr_qsfp_info_get() @@ -473,6 +687,7 @@ def pltfm_mgr_qsfp_reset(self, port_num, reset): Parameters: - port_num - reset + """ self.send_pltfm_mgr_qsfp_reset(port_num, reset) return self.recv_pltfm_mgr_qsfp_reset() @@ -503,23 +718,24 @@ def recv_pltfm_mgr_qsfp_reset(self): raise result.ouch raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_reset failed: unknown result") - def pltfm_mgr_qsfp_lpmode_get(self, port_num): + def pltfm_mgr_qsfp_reset_get(self, port_num): """ Parameters: - port_num + """ - self.send_pltfm_mgr_qsfp_lpmode_get(port_num) - return self.recv_pltfm_mgr_qsfp_lpmode_get() + self.send_pltfm_mgr_qsfp_reset_get(port_num) + return self.recv_pltfm_mgr_qsfp_reset_get() - def send_pltfm_mgr_qsfp_lpmode_get(self, port_num): - self._oprot.writeMessageBegin('pltfm_mgr_qsfp_lpmode_get', TMessageType.CALL, self._seqid) - args = pltfm_mgr_qsfp_lpmode_get_args() + def send_pltfm_mgr_qsfp_reset_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_reset_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_reset_get_args() args.port_num = port_num args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_pltfm_mgr_qsfp_lpmode_get(self): + def recv_pltfm_mgr_qsfp_reset_get(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: @@ -527,34 +743,37 @@ def recv_pltfm_mgr_qsfp_lpmode_get(self): x.read(iprot) iprot.readMessageEnd() raise x - result = pltfm_mgr_qsfp_lpmode_get_result() + result = pltfm_mgr_qsfp_reset_get_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.ouch is not None: raise result.ouch - raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_lpmode_get failed: unknown result") + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_reset_get failed: unknown result") - def pltfm_mgr_qsfp_lpmode_set(self, port_num, lpmode): + def pltfm_mgr_qsfp_tx_disable(self, port_num, channel_mask, disable): """ Parameters: - port_num - - lpmode + - channel_mask + - disable + """ - self.send_pltfm_mgr_qsfp_lpmode_set(port_num, lpmode) - return self.recv_pltfm_mgr_qsfp_lpmode_set() + self.send_pltfm_mgr_qsfp_tx_disable(port_num, channel_mask, disable) + return self.recv_pltfm_mgr_qsfp_tx_disable() - def send_pltfm_mgr_qsfp_lpmode_set(self, port_num, lpmode): - self._oprot.writeMessageBegin('pltfm_mgr_qsfp_lpmode_set', TMessageType.CALL, self._seqid) - args = pltfm_mgr_qsfp_lpmode_set_args() + def send_pltfm_mgr_qsfp_tx_disable(self, port_num, channel_mask, disable): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_tx_disable', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_tx_disable_args() args.port_num = port_num - args.lpmode = lpmode + args.channel_mask = channel_mask + args.disable = disable args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_pltfm_mgr_qsfp_lpmode_set(self): + def recv_pltfm_mgr_qsfp_tx_disable(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: @@ -562,32 +781,33 @@ def recv_pltfm_mgr_qsfp_lpmode_set(self): x.read(iprot) iprot.readMessageEnd() raise x - result = pltfm_mgr_qsfp_lpmode_set_result() + result = pltfm_mgr_qsfp_tx_disable_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.ouch is not None: raise result.ouch - raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_lpmode_set failed: unknown result") + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_tx_disable failed: unknown result") - def pltfm_mgr_sensor_info_get(self, options): + def pltfm_mgr_qsfp_chan_count_get(self, port_num): """ Parameters: - - options + - port_num + """ - self.send_pltfm_mgr_sensor_info_get(options) - return self.recv_pltfm_mgr_sensor_info_get() + self.send_pltfm_mgr_qsfp_chan_count_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_count_get() - def send_pltfm_mgr_sensor_info_get(self, options): - self._oprot.writeMessageBegin('pltfm_mgr_sensor_info_get', TMessageType.CALL, self._seqid) - args = pltfm_mgr_sensor_info_get_args() - args.options = options + def send_pltfm_mgr_qsfp_chan_count_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_count_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_count_get_args() + args.port_num = port_num args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_pltfm_mgr_sensor_info_get(self): + def recv_pltfm_mgr_qsfp_chan_count_get(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: @@ -595,398 +815,4185 @@ def recv_pltfm_mgr_sensor_info_get(self): x.read(iprot) iprot.readMessageEnd() raise x - result = pltfm_mgr_sensor_info_get_result() + result = pltfm_mgr_qsfp_chan_count_get_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.ouch is not None: raise result.ouch - raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_sensor_info_get failed: unknown result") + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_count_get failed: unknown result") + def pltfm_mgr_qsfp_chan_rx_pwr_get(self, port_num): + """ + Parameters: + - port_num -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["pltfm_mgr_dummy"] = Processor.process_pltfm_mgr_dummy - self._processMap["pltfm_mgr_sys_tmp_get"] = Processor.process_pltfm_mgr_sys_tmp_get - self._processMap["pltfm_mgr_sys_eeprom_get"] = Processor.process_pltfm_mgr_sys_eeprom_get - self._processMap["pltfm_mgr_pwr_supply_present_get"] = Processor.process_pltfm_mgr_pwr_supply_present_get - self._processMap["pltfm_mgr_pwr_supply_info_get"] = Processor.process_pltfm_mgr_pwr_supply_info_get - self._processMap["pltfm_mgr_pwr_rail_info_get"] = Processor.process_pltfm_mgr_pwr_rail_info_get - self._processMap["pltfm_mgr_fan_speed_set"] = Processor.process_pltfm_mgr_fan_speed_set - self._processMap["pltfm_mgr_fan_info_get"] = Processor.process_pltfm_mgr_fan_info_get - self._processMap["pltfm_mgr_qsfp_presence_get"] = Processor.process_pltfm_mgr_qsfp_presence_get - self._processMap["pltfm_mgr_qsfp_info_get"] = Processor.process_pltfm_mgr_qsfp_info_get - self._processMap["pltfm_mgr_qsfp_get_max_port"] = Processor.process_pltfm_mgr_qsfp_get_max_port - self._processMap["pltfm_mgr_qsfp_reset"] = Processor.process_pltfm_mgr_qsfp_reset - self._processMap["pltfm_mgr_qsfp_lpmode_get"] = Processor.process_pltfm_mgr_qsfp_lpmode_get - 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.send_pltfm_mgr_qsfp_chan_rx_pwr_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_rx_pwr_get() - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) + def send_pltfm_mgr_qsfp_chan_rx_pwr_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_rx_pwr_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_rx_pwr_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_rx_pwr_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_pltfm_mgr_dummy(self, seqid, iprot, oprot): - args = pltfm_mgr_dummy_args() - args.read(iprot) + raise x + result = pltfm_mgr_qsfp_chan_rx_pwr_get_result() + result.read(iprot) iprot.readMessageEnd() - result = pltfm_mgr_dummy_result() - try: - result.success = self._handler.pltfm_mgr_dummy(args.device) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_dummy", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_rx_pwr_get failed: unknown result") - def process_pltfm_mgr_sys_tmp_get(self, seqid, iprot, oprot): - args = pltfm_mgr_sys_tmp_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_sys_tmp_get_result() - try: - result.success = self._handler.pltfm_mgr_sys_tmp_get() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_sys_tmp_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def pltfm_mgr_qsfp_chan_tx_bias_get(self, port_num): + """ + Parameters: + - port_num - def process_pltfm_mgr_sys_eeprom_get(self, seqid, iprot, oprot): - args = pltfm_mgr_sys_eeprom_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_sys_eeprom_get_result() - try: - result.success = self._handler.pltfm_mgr_sys_eeprom_get() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_sys_eeprom_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + """ + self.send_pltfm_mgr_qsfp_chan_tx_bias_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_tx_bias_get() - def process_pltfm_mgr_pwr_supply_present_get(self, seqid, iprot, oprot): - args = pltfm_mgr_pwr_supply_present_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_pwr_supply_present_get_result() - try: - result.success = self._handler.pltfm_mgr_pwr_supply_present_get(args.ps_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_pwr_supply_present_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_pltfm_mgr_qsfp_chan_tx_bias_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_tx_bias_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_tx_bias_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_pltfm_mgr_pwr_supply_info_get(self, seqid, iprot, oprot): - args = pltfm_mgr_pwr_supply_info_get_args() - args.read(iprot) + def recv_pltfm_mgr_qsfp_chan_tx_bias_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_tx_bias_get_result() + result.read(iprot) iprot.readMessageEnd() - result = pltfm_mgr_pwr_supply_info_get_result() - try: - result.success = self._handler.pltfm_mgr_pwr_supply_info_get(args.ps_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_pwr_supply_info_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_tx_bias_get failed: unknown result") - def process_pltfm_mgr_pwr_rail_info_get(self, seqid, iprot, oprot): - args = pltfm_mgr_pwr_rail_info_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_pwr_rail_info_get_result() - try: - result.success = self._handler.pltfm_mgr_pwr_rail_info_get(args.ps_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_pwr_rail_info_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def pltfm_mgr_qsfp_chan_tx_pwr_get(self, port_num): + """ + Parameters: + - port_num - def process_pltfm_mgr_fan_speed_set(self, seqid, iprot, oprot): - args = pltfm_mgr_fan_speed_set_args() - args.read(iprot) + """ + self.send_pltfm_mgr_qsfp_chan_tx_pwr_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_tx_pwr_get() + + def send_pltfm_mgr_qsfp_chan_tx_pwr_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_tx_pwr_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_tx_pwr_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_tx_pwr_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_tx_pwr_get_result() + result.read(iprot) iprot.readMessageEnd() - result = pltfm_mgr_fan_speed_set_result() - try: - result.success = self._handler.pltfm_mgr_fan_speed_set(args.fan_num, args.percent) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_fan_speed_set", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_tx_pwr_get failed: unknown result") - def process_pltfm_mgr_fan_info_get(self, seqid, iprot, oprot): - args = pltfm_mgr_fan_info_get_args() - args.read(iprot) + def pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get() + + def send_pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_result() + result.read(iprot) iprot.readMessageEnd() - result = pltfm_mgr_fan_info_get_result() - try: - result.success = self._handler.pltfm_mgr_fan_info_get(args.fan_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_fan_info_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get failed: unknown result") - def process_pltfm_mgr_qsfp_presence_get(self, seqid, iprot, oprot): - args = pltfm_mgr_qsfp_presence_get_args() - args.read(iprot) + def pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get() + + def send_pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_result() + result.read(iprot) iprot.readMessageEnd() - result = pltfm_mgr_qsfp_presence_get_result() - try: - result.success = self._handler.pltfm_mgr_qsfp_presence_get(args.port_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_qsfp_presence_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get failed: unknown result") + + def pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get() + + def send_pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get failed: unknown result") + + def pltfm_mgr_qsfp_chan_rx_los_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_chan_rx_los_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_rx_los_get() + + def send_pltfm_mgr_qsfp_chan_rx_los_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_rx_los_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_rx_los_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_rx_los_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_rx_los_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_rx_los_get failed: unknown result") + + def pltfm_mgr_qsfp_chan_tx_los_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_chan_tx_los_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_tx_los_get() + + def send_pltfm_mgr_qsfp_chan_tx_los_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_tx_los_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_tx_los_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_tx_los_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_tx_los_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_tx_los_get failed: unknown result") + + def pltfm_mgr_qsfp_chan_tx_fault_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_chan_tx_fault_get(port_num) + return self.recv_pltfm_mgr_qsfp_chan_tx_fault_get() + + def send_pltfm_mgr_qsfp_chan_tx_fault_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_chan_tx_fault_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_chan_tx_fault_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_chan_tx_fault_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_chan_tx_fault_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_chan_tx_fault_get failed: unknown result") + + def pltfm_mgr_qsfp_temperature_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_temperature_get(port_num) + return self.recv_pltfm_mgr_qsfp_temperature_get() + + def send_pltfm_mgr_qsfp_temperature_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_temperature_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_temperature_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_temperature_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_temperature_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_temperature_get failed: unknown result") + + def pltfm_mgr_qsfp_voltage_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_voltage_get(port_num) + return self.recv_pltfm_mgr_qsfp_voltage_get() + + def send_pltfm_mgr_qsfp_voltage_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_voltage_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_voltage_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_voltage_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_voltage_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_voltage_get failed: unknown result") + + def pltfm_mgr_qsfp_thresholds_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_thresholds_get(port_num) + return self.recv_pltfm_mgr_qsfp_thresholds_get() + + def send_pltfm_mgr_qsfp_thresholds_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_thresholds_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_thresholds_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_thresholds_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_thresholds_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_thresholds_get failed: unknown result") + + def pltfm_mgr_qsfp_tx_is_disabled(self, port_num, channel): + """ + Parameters: + - port_num + - channel + + """ + self.send_pltfm_mgr_qsfp_tx_is_disabled(port_num, channel) + return self.recv_pltfm_mgr_qsfp_tx_is_disabled() + + def send_pltfm_mgr_qsfp_tx_is_disabled(self, port_num, channel): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_tx_is_disabled', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_tx_is_disabled_args() + args.port_num = port_num + args.channel = channel + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_tx_is_disabled(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_tx_is_disabled_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_tx_is_disabled failed: unknown result") + + def pltfm_mgr_qsfp_lpmode_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_lpmode_get(port_num) + return self.recv_pltfm_mgr_qsfp_lpmode_get() + + def send_pltfm_mgr_qsfp_lpmode_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_lpmode_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_lpmode_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_lpmode_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_lpmode_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_lpmode_get failed: unknown result") + + def pltfm_mgr_qsfp_pwr_override_get(self, port_num): + """ + Parameters: + - port_num + + """ + self.send_pltfm_mgr_qsfp_pwr_override_get(port_num) + return self.recv_pltfm_mgr_qsfp_pwr_override_get() + + def send_pltfm_mgr_qsfp_pwr_override_get(self, port_num): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_pwr_override_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_pwr_override_get_args() + args.port_num = port_num + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_pwr_override_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_pwr_override_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_pwr_override_get failed: unknown result") + + def pltfm_mgr_qsfp_pwr_override_set(self, port_num, power_override, power_set): + """ + Parameters: + - port_num + - power_override + - power_set + + """ + self.send_pltfm_mgr_qsfp_pwr_override_set(port_num, power_override, power_set) + return self.recv_pltfm_mgr_qsfp_pwr_override_set() + + def send_pltfm_mgr_qsfp_pwr_override_set(self, port_num, power_override, power_set): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_pwr_override_set', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_pwr_override_set_args() + args.port_num = port_num + args.power_override = power_override + args.power_set = power_set + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_pwr_override_set(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_pwr_override_set_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_pwr_override_set failed: unknown result") + + def pltfm_mgr_qsfp_lpmode_set(self, port_num, lpmode): + """ + Parameters: + - port_num + - lpmode + + """ + self.send_pltfm_mgr_qsfp_lpmode_set(port_num, lpmode) + return self.recv_pltfm_mgr_qsfp_lpmode_set() + + def send_pltfm_mgr_qsfp_lpmode_set(self, port_num, lpmode): + self._oprot.writeMessageBegin('pltfm_mgr_qsfp_lpmode_set', TMessageType.CALL, self._seqid) + args = pltfm_mgr_qsfp_lpmode_set_args() + args.port_num = port_num + args.lpmode = lpmode + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_qsfp_lpmode_set(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_qsfp_lpmode_set_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_qsfp_lpmode_set failed: unknown result") + + def pltfm_mgr_sensor_info_get(self, options): + """ + Parameters: + - options + + """ + self.send_pltfm_mgr_sensor_info_get(options) + return self.recv_pltfm_mgr_sensor_info_get() + + def send_pltfm_mgr_sensor_info_get(self, options): + self._oprot.writeMessageBegin('pltfm_mgr_sensor_info_get', TMessageType.CALL, self._seqid) + args = pltfm_mgr_sensor_info_get_args() + args.options = options + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_pltfm_mgr_sensor_info_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = pltfm_mgr_sensor_info_get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ouch is not None: + raise result.ouch + raise TApplicationException(TApplicationException.MISSING_RESULT, "pltfm_mgr_sensor_info_get failed: unknown result") + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["pltfm_mgr_dummy"] = Processor.process_pltfm_mgr_dummy + self._processMap["pltfm_mgr_sys_tmp_get"] = Processor.process_pltfm_mgr_sys_tmp_get + self._processMap["pltfm_mgr_sys_eeprom_get"] = Processor.process_pltfm_mgr_sys_eeprom_get + self._processMap["pltfm_mgr_pwr_supply_present_get"] = Processor.process_pltfm_mgr_pwr_supply_present_get + self._processMap["pltfm_mgr_pwr_supply_info_get"] = Processor.process_pltfm_mgr_pwr_supply_info_get + self._processMap["pltfm_mgr_pwr_rail_info_get"] = Processor.process_pltfm_mgr_pwr_rail_info_get + self._processMap["pltfm_mgr_fan_speed_set"] = Processor.process_pltfm_mgr_fan_speed_set + self._processMap["pltfm_mgr_fan_info_get"] = Processor.process_pltfm_mgr_fan_info_get + self._processMap["pltfm_mgr_qsfp_presence_get"] = Processor.process_pltfm_mgr_qsfp_presence_get + self._processMap["pltfm_mgr_qsfp_detect_transceiver"] = Processor.process_pltfm_mgr_qsfp_detect_transceiver + self._processMap["pltfm_mgr_qsfp_info_get"] = Processor.process_pltfm_mgr_qsfp_info_get + self._processMap["pltfm_mgr_qsfp_get_max_port"] = Processor.process_pltfm_mgr_qsfp_get_max_port + self._processMap["pltfm_mgr_qsfp_reset"] = Processor.process_pltfm_mgr_qsfp_reset + self._processMap["pltfm_mgr_qsfp_reset_get"] = Processor.process_pltfm_mgr_qsfp_reset_get + self._processMap["pltfm_mgr_qsfp_tx_disable"] = Processor.process_pltfm_mgr_qsfp_tx_disable + self._processMap["pltfm_mgr_qsfp_chan_count_get"] = Processor.process_pltfm_mgr_qsfp_chan_count_get + self._processMap["pltfm_mgr_qsfp_chan_rx_pwr_get"] = Processor.process_pltfm_mgr_qsfp_chan_rx_pwr_get + self._processMap["pltfm_mgr_qsfp_chan_tx_bias_get"] = Processor.process_pltfm_mgr_qsfp_chan_tx_bias_get + self._processMap["pltfm_mgr_qsfp_chan_tx_pwr_get"] = Processor.process_pltfm_mgr_qsfp_chan_tx_pwr_get + self._processMap["pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get"] = Processor.process_pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get + self._processMap["pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get"] = Processor.process_pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get + self._processMap["pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get"] = Processor.process_pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get + self._processMap["pltfm_mgr_qsfp_chan_rx_los_get"] = Processor.process_pltfm_mgr_qsfp_chan_rx_los_get + self._processMap["pltfm_mgr_qsfp_chan_tx_los_get"] = Processor.process_pltfm_mgr_qsfp_chan_tx_los_get + self._processMap["pltfm_mgr_qsfp_chan_tx_fault_get"] = Processor.process_pltfm_mgr_qsfp_chan_tx_fault_get + self._processMap["pltfm_mgr_qsfp_temperature_get"] = Processor.process_pltfm_mgr_qsfp_temperature_get + self._processMap["pltfm_mgr_qsfp_voltage_get"] = Processor.process_pltfm_mgr_qsfp_voltage_get + self._processMap["pltfm_mgr_qsfp_thresholds_get"] = Processor.process_pltfm_mgr_qsfp_thresholds_get + self._processMap["pltfm_mgr_qsfp_tx_is_disabled"] = Processor.process_pltfm_mgr_qsfp_tx_is_disabled + self._processMap["pltfm_mgr_qsfp_lpmode_get"] = Processor.process_pltfm_mgr_qsfp_lpmode_get + self._processMap["pltfm_mgr_qsfp_pwr_override_get"] = Processor.process_pltfm_mgr_qsfp_pwr_override_get + 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_sensor_info_get"] = Processor.process_pltfm_mgr_sensor_info_get + self._on_message_begin = None + + def on_message_begin(self, func): + self._on_message_begin = func + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if self._on_message_begin: + self._on_message_begin(name, type, seqid) + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_pltfm_mgr_dummy(self, seqid, iprot, oprot): + args = pltfm_mgr_dummy_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_dummy_result() + try: + result.success = self._handler.pltfm_mgr_dummy(args.device) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_dummy", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_sys_tmp_get(self, seqid, iprot, oprot): + args = pltfm_mgr_sys_tmp_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_sys_tmp_get_result() + try: + result.success = self._handler.pltfm_mgr_sys_tmp_get() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_sys_tmp_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_sys_eeprom_get(self, seqid, iprot, oprot): + args = pltfm_mgr_sys_eeprom_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_sys_eeprom_get_result() + try: + result.success = self._handler.pltfm_mgr_sys_eeprom_get() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_sys_eeprom_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_pwr_supply_present_get(self, seqid, iprot, oprot): + args = pltfm_mgr_pwr_supply_present_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_pwr_supply_present_get_result() + try: + result.success = self._handler.pltfm_mgr_pwr_supply_present_get(args.ps_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_pwr_supply_present_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_pwr_supply_info_get(self, seqid, iprot, oprot): + args = pltfm_mgr_pwr_supply_info_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_pwr_supply_info_get_result() + try: + result.success = self._handler.pltfm_mgr_pwr_supply_info_get(args.ps_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_pwr_supply_info_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_pwr_rail_info_get(self, seqid, iprot, oprot): + args = pltfm_mgr_pwr_rail_info_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_pwr_rail_info_get_result() + try: + result.success = self._handler.pltfm_mgr_pwr_rail_info_get(args.ps_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_pwr_rail_info_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_fan_speed_set(self, seqid, iprot, oprot): + args = pltfm_mgr_fan_speed_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_fan_speed_set_result() + try: + result.success = self._handler.pltfm_mgr_fan_speed_set(args.fan_num, args.percent) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_fan_speed_set", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_fan_info_get(self, seqid, iprot, oprot): + args = pltfm_mgr_fan_info_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_fan_info_get_result() + try: + result.success = self._handler.pltfm_mgr_fan_info_get(args.fan_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_fan_info_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_presence_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_presence_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_presence_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_presence_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_presence_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_detect_transceiver(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_detect_transceiver_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_detect_transceiver_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_detect_transceiver(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_detect_transceiver", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_info_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_info_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_info_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_info_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_info_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_get_max_port(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_get_max_port_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_get_max_port_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_get_max_port() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_get_max_port", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_reset(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_reset_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_reset_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_reset(args.port_num, args.reset) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_reset", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_reset_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_reset_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_reset_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_reset_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_reset_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_tx_disable(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_tx_disable_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_tx_disable_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_tx_disable(args.port_num, args.channel_mask, args.disable) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_tx_disable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_count_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_count_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_count_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_count_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_count_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_rx_pwr_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_rx_pwr_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_rx_pwr_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_rx_pwr_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_rx_pwr_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_tx_bias_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_tx_bias_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_tx_bias_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_tx_bias_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_tx_bias_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_tx_pwr_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_tx_pwr_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_tx_pwr_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_tx_pwr_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_tx_pwr_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_rx_los_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_rx_los_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_rx_los_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_rx_los_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_rx_los_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_tx_los_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_tx_los_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_tx_los_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_tx_los_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_tx_los_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_chan_tx_fault_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_chan_tx_fault_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_chan_tx_fault_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_chan_tx_fault_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_chan_tx_fault_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_temperature_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_temperature_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_temperature_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_temperature_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_temperature_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_voltage_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_voltage_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_voltage_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_voltage_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_voltage_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_thresholds_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_thresholds_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_thresholds_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_thresholds_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_thresholds_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_tx_is_disabled(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_tx_is_disabled_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_tx_is_disabled_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_tx_is_disabled(args.port_num, args.channel) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_tx_is_disabled", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_lpmode_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_lpmode_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_lpmode_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_lpmode_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_lpmode_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_pwr_override_get(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_pwr_override_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_pwr_override_get_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_pwr_override_get(args.port_num) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_pwr_override_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_pwr_override_set(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_pwr_override_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_pwr_override_set_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_pwr_override_set(args.port_num, args.power_override, args.power_set) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_pwr_override_set", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_qsfp_lpmode_set(self, seqid, iprot, oprot): + args = pltfm_mgr_qsfp_lpmode_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_qsfp_lpmode_set_result() + try: + result.success = self._handler.pltfm_mgr_qsfp_lpmode_set(args.port_num, args.lpmode) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_qsfp_lpmode_set", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pltfm_mgr_sensor_info_get(self, seqid, iprot, oprot): + args = pltfm_mgr_sensor_info_get_args() + args.read(iprot) + iprot.readMessageEnd() + result = pltfm_mgr_sensor_info_get_result() + try: + result.success = self._handler.pltfm_mgr_sensor_info_get(args.options) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except InvalidPltfmMgrOperation as ouch: + msg_type = TMessageType.REPLY + result.ouch = ouch + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("pltfm_mgr_sensor_info_get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + +# HELPER FUNCTIONS AND STRUCTURES + + +class pltfm_mgr_dummy_args(object): + """ + Attributes: + - device + + """ + + + def __init__(self, device=None,): + self.device = device + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BYTE: + self.device = iprot.readByte() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_dummy_args') + if self.device is not None: + oprot.writeFieldBegin('device', TType.BYTE, 1) + oprot.writeByte(self.device) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_dummy_args) +pltfm_mgr_dummy_args.thrift_spec = ( + None, # 0 + (1, TType.BYTE, 'device', None, None, ), # 1 +) + + +class pltfm_mgr_dummy_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_dummy_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_dummy_result) +pltfm_mgr_dummy_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 +) + + +class pltfm_mgr_sys_tmp_get_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_sys_tmp_get_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_sys_tmp_get_args) +pltfm_mgr_sys_tmp_get_args.thrift_spec = ( +) + + +class pltfm_mgr_sys_tmp_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = pltfm_mgr_sys_tmp_t() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_sys_tmp_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_sys_tmp_get_result) +pltfm_mgr_sys_tmp_get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [pltfm_mgr_sys_tmp_t, None], None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_sys_eeprom_get_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_sys_eeprom_get_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_sys_eeprom_get_args) +pltfm_mgr_sys_eeprom_get_args.thrift_spec = ( +) + + +class pltfm_mgr_sys_eeprom_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = pltfm_mgr_eeprom_t() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_sys_eeprom_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_sys_eeprom_get_result) +pltfm_mgr_sys_eeprom_get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [pltfm_mgr_eeprom_t, None], None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_pwr_supply_present_get_args(object): + """ + Attributes: + - ps_num + + """ + + + def __init__(self, ps_num=None,): + self.ps_num = ps_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I16: + self.ps_num = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_pwr_supply_present_get_args') + if self.ps_num is not None: + oprot.writeFieldBegin('ps_num', TType.I16, 1) + oprot.writeI16(self.ps_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_pwr_supply_present_get_args) +pltfm_mgr_pwr_supply_present_get_args.thrift_spec = ( + None, # 0 + (1, TType.I16, 'ps_num', None, None, ), # 1 +) + + +class pltfm_mgr_pwr_supply_present_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_pwr_supply_present_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_pwr_supply_present_get_result) +pltfm_mgr_pwr_supply_present_get_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_pwr_supply_info_get_args(object): + """ + Attributes: + - ps_num + + """ + + + def __init__(self, ps_num=None,): + self.ps_num = ps_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I16: + self.ps_num = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_pwr_supply_info_get_args') + if self.ps_num is not None: + oprot.writeFieldBegin('ps_num', TType.I16, 1) + oprot.writeI16(self.ps_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_pwr_supply_info_get_args) +pltfm_mgr_pwr_supply_info_get_args.thrift_spec = ( + None, # 0 + (1, TType.I16, 'ps_num', None, None, ), # 1 +) + + +class pltfm_mgr_pwr_supply_info_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = pltfm_mgr_pwr_supply_info_t() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_pwr_supply_info_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_pwr_supply_info_get_result) +pltfm_mgr_pwr_supply_info_get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [pltfm_mgr_pwr_supply_info_t, None], None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_pwr_rail_info_get_args(object): + """ + Attributes: + - ps_num + + """ + + + def __init__(self, ps_num=None,): + self.ps_num = ps_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I16: + self.ps_num = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_pwr_rail_info_get_args') + if self.ps_num is not None: + oprot.writeFieldBegin('ps_num', TType.I16, 1) + oprot.writeI16(self.ps_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_pwr_rail_info_get_args) +pltfm_mgr_pwr_rail_info_get_args.thrift_spec = ( + None, # 0 + (1, TType.I16, 'ps_num', None, None, ), # 1 +) + + +class pltfm_mgr_pwr_rail_info_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = pltfm_mgr_pwr_rail_info_t() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_pwr_rail_info_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_pwr_rail_info_get_result) +pltfm_mgr_pwr_rail_info_get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [pltfm_mgr_pwr_rail_info_t, None], None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_fan_speed_set_args(object): + """ + Attributes: + - fan_num + - percent + + """ + + + def __init__(self, fan_num=None, percent=None,): + self.fan_num = fan_num + self.percent = percent + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.fan_num = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.percent = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_fan_speed_set_args') + if self.fan_num is not None: + oprot.writeFieldBegin('fan_num', TType.I32, 1) + oprot.writeI32(self.fan_num) + oprot.writeFieldEnd() + if self.percent is not None: + oprot.writeFieldBegin('percent', TType.I32, 2) + oprot.writeI32(self.percent) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_fan_speed_set_args) +pltfm_mgr_fan_speed_set_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'fan_num', None, None, ), # 1 + (2, TType.I32, 'percent', None, None, ), # 2 +) + + +class pltfm_mgr_fan_speed_set_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_fan_speed_set_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_fan_speed_set_result) +pltfm_mgr_fan_speed_set_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_fan_info_get_args(object): + """ + Attributes: + - fan_num + + """ + + + def __init__(self, fan_num=None,): + self.fan_num = fan_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.fan_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_fan_info_get_args') + if self.fan_num is not None: + oprot.writeFieldBegin('fan_num', TType.I32, 1) + oprot.writeI32(self.fan_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_fan_info_get_args) +pltfm_mgr_fan_info_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'fan_num', None, None, ), # 1 +) + + +class pltfm_mgr_fan_info_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = pltfm_mgr_fan_info_t() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_fan_info_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_fan_info_get_result) +pltfm_mgr_fan_info_get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [pltfm_mgr_fan_info_t, None], None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_presence_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_presence_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_presence_get_args) +pltfm_mgr_qsfp_presence_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_presence_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_presence_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_presence_get_result) +pltfm_mgr_qsfp_presence_get_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_detect_transceiver_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_detect_transceiver_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_detect_transceiver_args) +pltfm_mgr_qsfp_detect_transceiver_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_detect_transceiver_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_detect_transceiver_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_detect_transceiver_result) +pltfm_mgr_qsfp_detect_transceiver_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_info_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_info_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_info_get_args) +pltfm_mgr_qsfp_info_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_info_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_info_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_info_get_result) +pltfm_mgr_qsfp_info_get_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_get_max_port_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_get_max_port_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_get_max_port_args) +pltfm_mgr_qsfp_get_max_port_args.thrift_spec = ( +) + + +class pltfm_mgr_qsfp_get_max_port_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_get_max_port_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_get_max_port_result) +pltfm_mgr_qsfp_get_max_port_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_reset_args(object): + """ + Attributes: + - port_num + - reset + + """ + + + def __init__(self, port_num=None, reset=None,): + self.port_num = port_num + self.reset = reset + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.reset = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_reset_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + if self.reset is not None: + oprot.writeFieldBegin('reset', TType.BOOL, 2) + oprot.writeBool(self.reset) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_reset_args) +pltfm_mgr_qsfp_reset_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 + (2, TType.BOOL, 'reset', None, None, ), # 2 +) + + +class pltfm_mgr_qsfp_reset_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_reset_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_reset_result) +pltfm_mgr_qsfp_reset_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_reset_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_reset_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_reset_get_args) +pltfm_mgr_qsfp_reset_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_reset_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_reset_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_reset_get_result) +pltfm_mgr_qsfp_reset_get_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_tx_disable_args(object): + """ + Attributes: + - port_num + - channel_mask + - disable + + """ + + + def __init__(self, port_num=None, channel_mask=None, disable=None,): + self.port_num = port_num + self.channel_mask = channel_mask + self.disable = disable + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.channel_mask = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.disable = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_tx_disable_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + if self.channel_mask is not None: + oprot.writeFieldBegin('channel_mask', TType.I32, 2) + oprot.writeI32(self.channel_mask) + oprot.writeFieldEnd() + if self.disable is not None: + oprot.writeFieldBegin('disable', TType.BOOL, 3) + oprot.writeBool(self.disable) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_tx_disable_args) +pltfm_mgr_qsfp_tx_disable_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 + (2, TType.I32, 'channel_mask', None, None, ), # 2 + (3, TType.BOOL, 'disable', None, None, ), # 3 +) + + +class pltfm_mgr_qsfp_tx_disable_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_tx_disable_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_tx_disable_result) +pltfm_mgr_qsfp_tx_disable_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_count_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_count_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_count_get_args) +pltfm_mgr_qsfp_chan_count_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_count_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_count_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_count_get_result) +pltfm_mgr_qsfp_chan_count_get_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_rx_pwr_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_rx_pwr_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_rx_pwr_get_args) +pltfm_mgr_qsfp_chan_rx_pwr_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_rx_pwr_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in range(_size0): + _elem5 = iprot.readDouble() + self.success.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_rx_pwr_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.DOUBLE, len(self.success)) + for iter6 in self.success: + oprot.writeDouble(iter6) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_rx_pwr_get_result) +pltfm_mgr_qsfp_chan_rx_pwr_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_tx_bias_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_bias_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_bias_get_args) +pltfm_mgr_qsfp_chan_tx_bias_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_tx_bias_get_result(object): + """ + Attributes: + - success + - ouch + + """ + + + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype10, _size7) = iprot.readListBegin() + for _i11 in range(_size7): + _elem12 = iprot.readDouble() + self.success.append(_elem12) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_bias_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.DOUBLE, len(self.success)) + for iter13 in self.success: + oprot.writeDouble(iter13) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_bias_get_result) +pltfm_mgr_qsfp_chan_tx_bias_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_tx_pwr_get_args(object): + """ + Attributes: + - port_num + + """ + + + def __init__(self, port_num=None,): + self.port_num = port_num + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_pwr_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_pwr_get_args) +pltfm_mgr_qsfp_chan_tx_pwr_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) + - def process_pltfm_mgr_qsfp_info_get(self, seqid, iprot, oprot): - args = pltfm_mgr_qsfp_info_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_qsfp_info_get_result() - try: - result.success = self._handler.pltfm_mgr_qsfp_info_get(args.port_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_qsfp_info_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class pltfm_mgr_qsfp_chan_tx_pwr_get_result(object): + """ + Attributes: + - success + - ouch - def process_pltfm_mgr_qsfp_get_max_port(self, seqid, iprot, oprot): - args = pltfm_mgr_qsfp_get_max_port_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_qsfp_get_max_port_result() - try: - result.success = self._handler.pltfm_mgr_qsfp_get_max_port() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_qsfp_get_max_port", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + """ - def process_pltfm_mgr_qsfp_reset(self, seqid, iprot, oprot): - args = pltfm_mgr_qsfp_reset_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_qsfp_reset_result() - try: - result.success = self._handler.pltfm_mgr_qsfp_reset(args.port_num, args.reset) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_qsfp_reset", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_pltfm_mgr_qsfp_lpmode_get(self, seqid, iprot, oprot): - args = pltfm_mgr_qsfp_lpmode_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_qsfp_lpmode_get_result() - try: - result.success = self._handler.pltfm_mgr_qsfp_lpmode_get(args.port_num) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_qsfp_lpmode_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None, ouch=None,): + self.success = success + self.ouch = ouch - def process_pltfm_mgr_qsfp_lpmode_set(self, seqid, iprot, oprot): - args = pltfm_mgr_qsfp_lpmode_set_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_qsfp_lpmode_set_result() - try: - result.success = self._handler.pltfm_mgr_qsfp_lpmode_set(args.port_num, args.lpmode) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_qsfp_lpmode_set", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in range(_size14): + _elem19 = iprot.readDouble() + self.success.append(_elem19) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def process_pltfm_mgr_sensor_info_get(self, seqid, iprot, oprot): - args = pltfm_mgr_sensor_info_get_args() - args.read(iprot) - iprot.readMessageEnd() - result = pltfm_mgr_sensor_info_get_result() - try: - result.success = self._handler.pltfm_mgr_sensor_info_get(args.options) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except InvalidPltfmMgrOperation as ouch: - msg_type = TMessageType.REPLY - result.ouch = ouch - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("pltfm_mgr_sensor_info_get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_pwr_get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.DOUBLE, len(self.success)) + for iter20 in self.success: + oprot.writeDouble(iter20) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() -# HELPER FUNCTIONS AND STRUCTURES + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ -class pltfm_mgr_dummy_args(object): + def __ne__(self, other): + return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_pwr_get_result) +pltfm_mgr_qsfp_chan_tx_pwr_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.DOUBLE, None, False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) + + +class pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_args(object): """ Attributes: - - device + - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.BYTE, 'device', None, None, ), # 1 - ) - def __init__(self, device=None,): - self.device = device + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -994,8 +5001,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.BYTE: - self.device = iprot.readByte() + if ftype == TType.I32: + self.port_num = iprot.readI32() else: iprot.skip(ftype) else: @@ -1005,12 +5012,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_dummy_args') - if self.device is not None: - oprot.writeFieldBegin('device', TType.BYTE, 1) - oprot.writeByte(self.device) + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1028,24 +5035,29 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_args) +pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_dummy_result(object): +class pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_result(object): """ Attributes: - success + - ouch + """ - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - ) - def __init__(self, success=None,): + def __init__(self, success=None, ouch=None,): self.success = success + self.ouch = ouch def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1053,8 +5065,20 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() + if ftype == TType.LIST: + self.success = [] + (_etype24, _size21) = iprot.readListBegin() + for _i25 in range(_size21): + _elem26 = pltfm_mgr_qsfp_alarm_flags_t() + _elem26.read(iprot) + self.success.append(_elem26) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.ouch = InvalidPltfmMgrOperation() + self.ouch.read(iprot) else: iprot.skip(ftype) else: @@ -1064,12 +5088,19 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_dummy_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter27 in self.success: + iter27.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.ouch is not None: + oprot.writeFieldBegin('ouch', TType.STRUCT, 1) + self.ouch.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1087,22 +5118,38 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_result) +pltfm_mgr_qsfp_chan_rx_pwr_alarm_flags_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [pltfm_mgr_qsfp_alarm_flags_t, None], False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_sys_tmp_get_args(object): +class pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_args(object): + """ + Attributes: + - port_num + + """ - thrift_spec = ( - ) + + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -1110,9 +5157,13 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_sys_tmp_get_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1129,19 +5180,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_args) +pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_sys_tmp_get_result(object): +class pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRUCT, 'success', (pltfm_mgr_sys_tmp_t, pltfm_mgr_sys_tmp_t.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1149,7 +5202,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1157,9 +5210,14 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = pltfm_mgr_sys_tmp_t() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype31, _size28) = iprot.readListBegin() + for _i32 in range(_size28): + _elem33 = pltfm_mgr_qsfp_alarm_flags_t() + _elem33.read(iprot) + self.success.append(_elem33) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -1175,12 +5233,15 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_sys_tmp_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter34 in self.success: + iter34.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1202,22 +5263,38 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_result) +pltfm_mgr_qsfp_chan_tx_bias_alarm_flags_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [pltfm_mgr_qsfp_alarm_flags_t, None], False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_sys_eeprom_get_args(object): +class pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_args(object): + """ + Attributes: + - port_num + + """ + - thrift_spec = ( - ) + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -1225,9 +5302,13 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_sys_eeprom_get_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1244,19 +5325,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_args) +pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_sys_eeprom_get_result(object): +class pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRUCT, 'success', (pltfm_mgr_eeprom_t, pltfm_mgr_eeprom_t.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1264,7 +5347,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1272,9 +5355,14 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = pltfm_mgr_eeprom_t() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype38, _size35) = iprot.readListBegin() + for _i39 in range(_size35): + _elem40 = pltfm_mgr_qsfp_alarm_flags_t() + _elem40.read(iprot) + self.success.append(_elem40) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -1290,12 +5378,15 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_sys_eeprom_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter41 in self.success: + iter41.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1317,25 +5408,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_result) +pltfm_mgr_qsfp_chan_tx_pwr_alarm_flags_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [pltfm_mgr_qsfp_alarm_flags_t, None], False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_pwr_supply_present_get_args(object): +class pltfm_mgr_qsfp_chan_rx_los_get_args(object): """ Attributes: - - ps_num + - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.I16, 'ps_num', None, None, ), # 1 - ) - def __init__(self, ps_num=None,): - self.ps_num = ps_num + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1343,8 +5436,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.I16: - self.ps_num = iprot.readI16() + if ftype == TType.I32: + self.port_num = iprot.readI32() else: iprot.skip(ftype) else: @@ -1354,12 +5447,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_pwr_supply_present_get_args') - if self.ps_num is not None: - oprot.writeFieldBegin('ps_num', TType.I16, 1) - oprot.writeI16(self.ps_num) + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_rx_los_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1377,19 +5470,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_rx_los_get_args) +pltfm_mgr_qsfp_chan_rx_los_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_pwr_supply_present_get_result(object): +class pltfm_mgr_qsfp_chan_rx_los_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1397,7 +5492,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1405,8 +5500,13 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() + if ftype == TType.LIST: + self.success = [] + (_etype45, _size42) = iprot.readListBegin() + for _i46 in range(_size42): + _elem47 = iprot.readBool() + self.success.append(_elem47) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -1422,12 +5522,15 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_pwr_supply_present_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_rx_los_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.BOOL, len(self.success)) + for iter48 in self.success: + oprot.writeBool(iter48) + oprot.writeListEnd() oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1449,25 +5552,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_rx_los_get_result) +pltfm_mgr_qsfp_chan_rx_los_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.BOOL, None, False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_pwr_supply_info_get_args(object): +class pltfm_mgr_qsfp_chan_tx_los_get_args(object): """ Attributes: - - ps_num + - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.I16, 'ps_num', None, None, ), # 1 - ) - def __init__(self, ps_num=None,): - self.ps_num = ps_num + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1475,8 +5580,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.I16: - self.ps_num = iprot.readI16() + if ftype == TType.I32: + self.port_num = iprot.readI32() else: iprot.skip(ftype) else: @@ -1486,12 +5591,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_pwr_supply_info_get_args') - if self.ps_num is not None: - oprot.writeFieldBegin('ps_num', TType.I16, 1) - oprot.writeI16(self.ps_num) + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_los_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1509,19 +5614,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_los_get_args) +pltfm_mgr_qsfp_chan_tx_los_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_pwr_supply_info_get_result(object): +class pltfm_mgr_qsfp_chan_tx_los_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRUCT, 'success', (pltfm_mgr_pwr_supply_info_t, pltfm_mgr_pwr_supply_info_t.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1529,7 +5636,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1537,9 +5644,13 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = pltfm_mgr_pwr_supply_info_t() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype52, _size49) = iprot.readListBegin() + for _i53 in range(_size49): + _elem54 = iprot.readBool() + self.success.append(_elem54) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -1555,12 +5666,15 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_pwr_supply_info_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_los_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.BOOL, len(self.success)) + for iter55 in self.success: + oprot.writeBool(iter55) + oprot.writeListEnd() oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1582,25 +5696,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_los_get_result) +pltfm_mgr_qsfp_chan_tx_los_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.BOOL, None, False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_pwr_rail_info_get_args(object): +class pltfm_mgr_qsfp_chan_tx_fault_get_args(object): """ Attributes: - - ps_num + - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.I16, 'ps_num', None, None, ), # 1 - ) - def __init__(self, ps_num=None,): - self.ps_num = ps_num + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1608,8 +5724,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.I16: - self.ps_num = iprot.readI16() + if ftype == TType.I32: + self.port_num = iprot.readI32() else: iprot.skip(ftype) else: @@ -1619,12 +5735,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_pwr_rail_info_get_args') - if self.ps_num is not None: - oprot.writeFieldBegin('ps_num', TType.I16, 1) - oprot.writeI16(self.ps_num) + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_fault_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1642,19 +5758,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_fault_get_args) +pltfm_mgr_qsfp_chan_tx_fault_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_pwr_rail_info_get_result(object): +class pltfm_mgr_qsfp_chan_tx_fault_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRUCT, 'success', (pltfm_mgr_pwr_rail_info_t, pltfm_mgr_pwr_rail_info_t.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1662,7 +5780,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1670,9 +5788,13 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = pltfm_mgr_pwr_rail_info_t() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype59, _size56) = iprot.readListBegin() + for _i60 in range(_size56): + _elem61 = iprot.readBool() + self.success.append(_elem61) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -1688,12 +5810,15 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_pwr_rail_info_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_chan_tx_fault_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.BOOL, len(self.success)) + for iter62 in self.success: + oprot.writeBool(iter62) + oprot.writeListEnd() oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1715,28 +5840,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_chan_tx_fault_get_result) +pltfm_mgr_qsfp_chan_tx_fault_get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.BOOL, None, False), None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_fan_speed_set_args(object): +class pltfm_mgr_qsfp_temperature_get_args(object): """ Attributes: - - fan_num - - percent + - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'fan_num', None, None, ), # 1 - (2, TType.I32, 'percent', None, None, ), # 2 - ) - def __init__(self, fan_num=None, percent=None,): - self.fan_num = fan_num - self.percent = percent + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1745,12 +5869,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.I32: - self.fan_num = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.percent = iprot.readI32() + self.port_num = iprot.readI32() else: iprot.skip(ftype) else: @@ -1760,16 +5879,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_fan_speed_set_args') - if self.fan_num is not None: - oprot.writeFieldBegin('fan_num', TType.I32, 1) - oprot.writeI32(self.fan_num) - oprot.writeFieldEnd() - if self.percent is not None: - oprot.writeFieldBegin('percent', TType.I32, 2) - oprot.writeI32(self.percent) + oprot.writeStructBegin('pltfm_mgr_qsfp_temperature_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1787,19 +5902,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_temperature_get_args) +pltfm_mgr_qsfp_temperature_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_fan_speed_set_result(object): +class pltfm_mgr_qsfp_temperature_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1807,7 +5924,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1815,8 +5932,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() + if ftype == TType.DOUBLE: + self.success = iprot.readDouble() else: iprot.skip(ftype) elif fid == 1: @@ -1832,12 +5949,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_fan_speed_set_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_temperature_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) + oprot.writeFieldBegin('success', TType.DOUBLE, 0) + oprot.writeDouble(self.success) oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1859,25 +5976,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_temperature_get_result) +pltfm_mgr_qsfp_temperature_get_result.thrift_spec = ( + (0, TType.DOUBLE, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_fan_info_get_args(object): +class pltfm_mgr_qsfp_voltage_get_args(object): """ Attributes: - - fan_num + - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'fan_num', None, None, ), # 1 - ) - def __init__(self, fan_num=None,): - self.fan_num = fan_num + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1886,7 +6005,7 @@ def read(self, iprot): break if fid == 1: if ftype == TType.I32: - self.fan_num = iprot.readI32() + self.port_num = iprot.readI32() else: iprot.skip(ftype) else: @@ -1896,12 +6015,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_fan_info_get_args') - if self.fan_num is not None: - oprot.writeFieldBegin('fan_num', TType.I32, 1) - oprot.writeI32(self.fan_num) + oprot.writeStructBegin('pltfm_mgr_qsfp_voltage_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1919,19 +6038,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_voltage_get_args) +pltfm_mgr_qsfp_voltage_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_fan_info_get_result(object): +class pltfm_mgr_qsfp_voltage_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRUCT, 'success', (pltfm_mgr_fan_info_t, pltfm_mgr_fan_info_t.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -1939,7 +6060,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1947,9 +6068,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = pltfm_mgr_fan_info_t() - self.success.read(iprot) + if ftype == TType.DOUBLE: + self.success = iprot.readDouble() else: iprot.skip(ftype) elif fid == 1: @@ -1965,12 +6085,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_fan_info_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_voltage_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.DOUBLE, 0) + oprot.writeDouble(self.success) oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -1992,25 +6112,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_voltage_get_result) +pltfm_mgr_qsfp_voltage_get_result.thrift_spec = ( + (0, TType.DOUBLE, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_qsfp_presence_get_args(object): +class pltfm_mgr_qsfp_thresholds_get_args(object): """ Attributes: - port_num + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'port_num', None, None, ), # 1 - ) def __init__(self, port_num=None,): self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2029,9 +6151,9 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_presence_get_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_thresholds_get_args') if self.port_num is not None: oprot.writeFieldBegin('port_num', TType.I32, 1) oprot.writeI32(self.port_num) @@ -2052,19 +6174,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_thresholds_get_args) +pltfm_mgr_qsfp_thresholds_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_qsfp_presence_get_result(object): +class pltfm_mgr_qsfp_thresholds_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2072,7 +6196,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2080,8 +6204,9 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool() + if ftype == TType.STRUCT: + self.success = pltfm_mgr_qsfp_thresholds_t() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: @@ -2097,12 +6222,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_presence_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_thresholds_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -2124,25 +6249,29 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_thresholds_get_result) +pltfm_mgr_qsfp_thresholds_get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [pltfm_mgr_qsfp_thresholds_t, None], None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_qsfp_info_get_args(object): +class pltfm_mgr_qsfp_tx_is_disabled_args(object): """ Attributes: - port_num + - channel + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'port_num', None, None, ), # 1 - ) - def __init__(self, port_num=None,): + def __init__(self, port_num=None, channel=None,): self.port_num = port_num + self.channel = channel def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2154,6 +6283,11 @@ def read(self, iprot): self.port_num = iprot.readI32() else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.channel = iprot.readI32() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2161,13 +6295,17 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_info_get_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_tx_is_disabled_args') if self.port_num is not None: oprot.writeFieldBegin('port_num', TType.I32, 1) oprot.writeI32(self.port_num) oprot.writeFieldEnd() + if self.channel is not None: + oprot.writeFieldBegin('channel', TType.I32, 2) + oprot.writeI32(self.channel) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2184,19 +6322,22 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_tx_is_disabled_args) +pltfm_mgr_qsfp_tx_is_disabled_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 + (2, TType.I32, 'channel', None, None, ), # 2 +) -class pltfm_mgr_qsfp_info_get_result(object): +class pltfm_mgr_qsfp_tx_is_disabled_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2204,7 +6345,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2212,8 +6353,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + if ftype == TType.BOOL: + self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: @@ -2229,12 +6370,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_info_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_tx_is_disabled_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -2256,22 +6397,38 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_tx_is_disabled_result) +pltfm_mgr_qsfp_tx_is_disabled_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_qsfp_get_max_port_args(object): +class pltfm_mgr_qsfp_lpmode_get_args(object): + """ + Attributes: + - port_num + + """ + - thrift_spec = ( - ) + def __init__(self, port_num=None,): + self.port_num = port_num def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.I32: + self.port_num = iprot.readI32() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2279,9 +6436,13 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_get_max_port_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_lpmode_get_args') + if self.port_num is not None: + oprot.writeFieldBegin('port_num', TType.I32, 1) + oprot.writeI32(self.port_num) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2298,19 +6459,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_lpmode_get_args) +pltfm_mgr_qsfp_lpmode_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_qsfp_get_max_port_result(object): +class pltfm_mgr_qsfp_lpmode_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2318,7 +6481,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2326,8 +6489,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() + if ftype == TType.BOOL: + self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: @@ -2343,12 +6506,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_get_max_port_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_lpmode_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -2370,28 +6533,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_lpmode_get_result) +pltfm_mgr_qsfp_lpmode_get_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_qsfp_reset_args(object): +class pltfm_mgr_qsfp_pwr_override_get_args(object): """ Attributes: - port_num - - reset + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'port_num', None, None, ), # 1 - (2, TType.BOOL, 'reset', None, None, ), # 2 - ) - def __init__(self, port_num=None, reset=None,): + def __init__(self, port_num=None,): self.port_num = port_num - self.reset = reset def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2403,11 +6565,6 @@ def read(self, iprot): self.port_num = iprot.readI32() else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.reset = iprot.readBool() - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2415,17 +6572,13 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_reset_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_pwr_override_get_args') if self.port_num is not None: oprot.writeFieldBegin('port_num', TType.I32, 1) oprot.writeI32(self.port_num) oprot.writeFieldEnd() - if self.reset is not None: - oprot.writeFieldBegin('reset', TType.BOOL, 2) - oprot.writeBool(self.reset) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2442,19 +6595,21 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_pwr_override_get_args) +pltfm_mgr_qsfp_pwr_override_get_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 +) -class pltfm_mgr_qsfp_reset_result(object): +class pltfm_mgr_qsfp_pwr_override_get_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2462,7 +6617,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2470,8 +6625,8 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32() + if ftype == TType.BOOL: + self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: @@ -2487,12 +6642,12 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_reset_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_pwr_override_get_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.ouch is not None: oprot.writeFieldBegin('ouch', TType.STRUCT, 1) @@ -2514,25 +6669,31 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_pwr_override_get_result) +pltfm_mgr_qsfp_pwr_override_get_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) -class pltfm_mgr_qsfp_lpmode_get_args(object): +class pltfm_mgr_qsfp_pwr_override_set_args(object): """ Attributes: - port_num + - power_override + - power_set + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'port_num', None, None, ), # 1 - ) - def __init__(self, port_num=None,): + def __init__(self, port_num=None, power_override=None, power_set=None,): self.port_num = port_num + self.power_override = power_override + self.power_set = power_set def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2544,6 +6705,16 @@ def read(self, iprot): self.port_num = iprot.readI32() else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.power_override = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.power_set = iprot.readBool() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2551,13 +6722,21 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_lpmode_get_args') + oprot.writeStructBegin('pltfm_mgr_qsfp_pwr_override_set_args') if self.port_num is not None: oprot.writeFieldBegin('port_num', TType.I32, 1) oprot.writeI32(self.port_num) oprot.writeFieldEnd() + if self.power_override is not None: + oprot.writeFieldBegin('power_override', TType.BOOL, 2) + oprot.writeBool(self.power_override) + oprot.writeFieldEnd() + if self.power_set is not None: + oprot.writeFieldBegin('power_set', TType.BOOL, 3) + oprot.writeBool(self.power_set) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2574,19 +6753,23 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_pwr_override_set_args) +pltfm_mgr_qsfp_pwr_override_set_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 + (2, TType.BOOL, 'power_override', None, None, ), # 2 + (3, TType.BOOL, 'power_set', None, None, ), # 3 +) -class pltfm_mgr_qsfp_lpmode_get_result(object): +class pltfm_mgr_qsfp_pwr_override_set_result(object): """ Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2594,7 +6777,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2619,9 +6802,9 @@ def read(self, iprot): def write(self, oprot): 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 - oprot.writeStructBegin('pltfm_mgr_qsfp_lpmode_get_result') + oprot.writeStructBegin('pltfm_mgr_qsfp_pwr_override_set_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) @@ -2646,6 +6829,11 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_pwr_override_set_result) +pltfm_mgr_qsfp_pwr_override_set_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) class pltfm_mgr_qsfp_lpmode_set_args(object): @@ -2653,13 +6841,9 @@ class pltfm_mgr_qsfp_lpmode_set_args(object): Attributes: - port_num - lpmode + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'port_num', None, None, ), # 1 - (2, TType.BOOL, 'lpmode', None, None, ), # 2 - ) def __init__(self, port_num=None, lpmode=None,): self.port_num = port_num @@ -2667,7 +6851,7 @@ def __init__(self, port_num=None, lpmode=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2691,7 +6875,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_qsfp_lpmode_set_args') if self.port_num is not None: @@ -2718,6 +6902,12 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_lpmode_set_args) +pltfm_mgr_qsfp_lpmode_set_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'port_num', None, None, ), # 1 + (2, TType.BOOL, 'lpmode', None, None, ), # 2 +) class pltfm_mgr_qsfp_lpmode_set_result(object): @@ -2725,12 +6915,9 @@ class pltfm_mgr_qsfp_lpmode_set_result(object): Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2738,7 +6925,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2763,7 +6950,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_qsfp_lpmode_set_result') if self.success is not None: @@ -2790,25 +6977,27 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_qsfp_lpmode_set_result) +pltfm_mgr_qsfp_lpmode_set_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) class pltfm_mgr_sensor_info_get_args(object): """ Attributes: - options + """ - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'options', 'UTF8', None, ), # 1 - ) def __init__(self, options=None,): self.options = options def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2827,7 +7016,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_sensor_info_get_args') if self.options is not None: @@ -2850,6 +7039,11 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_sensor_info_get_args) +pltfm_mgr_sensor_info_get_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'options', 'UTF8', None, ), # 1 +) class pltfm_mgr_sensor_info_get_result(object): @@ -2857,12 +7051,9 @@ class pltfm_mgr_sensor_info_get_result(object): Attributes: - success - ouch + """ - thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'ouch', (InvalidPltfmMgrOperation, InvalidPltfmMgrOperation.thrift_spec), None, ), # 1 - ) def __init__(self, success=None, ouch=None,): self.success = success @@ -2870,7 +7061,7 @@ def __init__(self, success=None, ouch=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -2895,7 +7086,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_sensor_info_get_result') if self.success is not None: @@ -2922,3 +7113,11 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_sensor_info_get_result) +pltfm_mgr_sensor_info_get_result.thrift_spec = ( + (0, TType.STRING, 'success', 'UTF8', None, ), # 0 + (1, TType.STRUCT, 'ouch', [InvalidPltfmMgrOperation, None], None, ), # 1 +) +fix_spec(all_structs) +del all_structs + diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/ttypes.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/ttypes.py index ce03e14f8691..da4a62d4eeff 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/ttypes.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/pltfm_mgr_rpc/ttypes.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.10.0) +# Autogenerated by Thrift Compiler (0.13.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -8,9 +8,12 @@ from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + import sys from thrift.transport import TTransport +all_structs = [] class pltfm_mgr_sys_tmp_t(object): @@ -26,21 +29,9 @@ class pltfm_mgr_sys_tmp_t(object): - tmp8 - tmp9 - tmp10 + """ - thrift_spec = ( - None, # 0 - (1, TType.DOUBLE, 'tmp1', None, None, ), # 1 - (2, TType.DOUBLE, 'tmp2', None, None, ), # 2 - (3, TType.DOUBLE, 'tmp3', None, None, ), # 3 - (4, TType.DOUBLE, 'tmp4', None, None, ), # 4 - (5, TType.DOUBLE, 'tmp5', None, None, ), # 5 - (6, TType.DOUBLE, 'tmp6', None, None, ), # 6 - (7, TType.DOUBLE, 'tmp7', None, None, ), # 7 - (8, TType.DOUBLE, 'tmp8', None, None, ), # 8 - (9, TType.DOUBLE, 'tmp9', None, None, ), # 9 - (10, TType.DOUBLE, 'tmp10', None, None, ), # 10 - ) def __init__(self, tmp1=None, tmp2=None, tmp3=None, tmp4=None, tmp5=None, tmp6=None, tmp7=None, tmp8=None, tmp9=None, tmp10=None,): self.tmp1 = tmp1 @@ -56,7 +47,7 @@ def __init__(self, tmp1=None, tmp2=None, tmp3=None, tmp4=None, tmp5=None, tmp6=N def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -120,7 +111,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_sys_tmp_t') if self.tmp1 is not None: @@ -206,33 +197,9 @@ class pltfm_mgr_eeprom_t(object): - ext_mac_addr_size - location - crc8 + """ - thrift_spec = ( - None, # 0 - (1, TType.I16, 'version', None, None, ), # 1 - (2, TType.STRING, 'prod_name', 'UTF8', None, ), # 2 - (3, TType.STRING, 'prod_part_num', 'UTF8', None, ), # 3 - (4, TType.STRING, 'sys_asm_part_num', 'UTF8', None, ), # 4 - (5, TType.STRING, 'bfn_pcba_part_num', 'UTF8', None, ), # 5 - (6, TType.STRING, 'bfn_pcbb_part_num', 'UTF8', None, ), # 6 - (7, TType.STRING, 'odm_pcba_part_num', 'UTF8', None, ), # 7 - (8, TType.STRING, 'odm_pcba_ser_num', 'UTF8', None, ), # 8 - (9, TType.I16, 'prod_state', None, None, ), # 9 - (10, TType.I16, 'prod_ver', None, None, ), # 10 - (11, TType.I16, 'prod_sub_ver', None, None, ), # 11 - (12, TType.STRING, 'prod_ser_num', 'UTF8', None, ), # 12 - (13, TType.STRING, 'prod_ast_tag', 'UTF8', None, ), # 13 - (14, TType.STRING, 'sys_mfger', 'UTF8', None, ), # 14 - (15, TType.STRING, 'sys_mfg_date', 'UTF8', None, ), # 15 - (16, TType.STRING, 'pcb_mfger', 'UTF8', None, ), # 16 - (17, TType.STRING, 'assembled_at', 'UTF8', None, ), # 17 - (18, TType.STRING, 'loc_mac_addr', 'UTF8', None, ), # 18 - (19, TType.STRING, 'ext_mac_addr', 'UTF8', None, ), # 19 - (20, TType.I32, 'ext_mac_addr_size', None, None, ), # 20 - (21, TType.STRING, 'location', 'UTF8', None, ), # 21 - (22, TType.I16, 'crc8', None, None, ), # 22 - ) def __init__(self, version=None, prod_name=None, prod_part_num=None, sys_asm_part_num=None, bfn_pcba_part_num=None, bfn_pcbb_part_num=None, odm_pcba_part_num=None, odm_pcba_ser_num=None, prod_state=None, prod_ver=None, prod_sub_ver=None, prod_ser_num=None, prod_ast_tag=None, sys_mfger=None, sys_mfg_date=None, pcb_mfger=None, assembled_at=None, loc_mac_addr=None, ext_mac_addr=None, ext_mac_addr_size=None, location=None, crc8=None,): self.version = version @@ -260,7 +227,7 @@ def __init__(self, version=None, prod_name=None, prod_part_num=None, sys_asm_par def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -384,7 +351,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_eeprom_t') if self.version is not None: @@ -506,21 +473,9 @@ class pltfm_mgr_pwr_supply_info_t(object): - model - serial - rev + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'vin', None, None, ), # 1 - (2, TType.I32, 'vout', None, None, ), # 2 - (3, TType.I32, 'iout', None, None, ), # 3 - (4, TType.I32, 'pwr_out', None, None, ), # 4 - (5, TType.I32, 'fspeed', None, None, ), # 5 - (6, TType.BOOL, 'ffault', None, None, ), # 6 - (7, TType.BOOL, 'load_sharing', None, None, ), # 7 - (8, TType.STRING, 'model', 'UTF8', None, ), # 8 - (9, TType.STRING, 'serial', 'UTF8', None, ), # 9 - (10, TType.STRING, 'rev', 'UTF8', None, ), # 10 - ) def __init__(self, vin=None, vout=None, iout=None, pwr_out=None, fspeed=None, ffault=None, load_sharing=None, model=None, serial=None, rev=None,): self.vin = vin @@ -536,7 +491,7 @@ def __init__(self, vin=None, vout=None, iout=None, pwr_out=None, fspeed=None, ff def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -600,7 +555,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_pwr_supply_info_t') if self.vin is not None: @@ -680,27 +635,9 @@ class pltfm_mgr_pwr_rail_info_t(object): - vrail14 - vrail15 - vrail16 + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'vrail1', None, None, ), # 1 - (2, TType.I32, 'vrail2', None, None, ), # 2 - (3, TType.I32, 'vrail3', None, None, ), # 3 - (4, TType.I32, 'vrail4', None, None, ), # 4 - (5, TType.I32, 'vrail5', None, None, ), # 5 - (6, TType.I32, 'vrail6', None, None, ), # 6 - (7, TType.I32, 'vrail7', None, None, ), # 7 - (8, TType.I32, 'vrail8', None, None, ), # 8 - (9, TType.I32, 'vrail9', None, None, ), # 9 - (10, TType.I32, 'vrail10', None, None, ), # 10 - (11, TType.I32, 'vrail11', None, None, ), # 11 - (12, TType.I32, 'vrail12', None, None, ), # 12 - (13, TType.I32, 'vrail13', None, None, ), # 13 - (14, TType.I32, 'vrail14', None, None, ), # 14 - (15, TType.I32, 'vrail15', None, None, ), # 15 - (16, TType.I32, 'vrail16', None, None, ), # 16 - ) def __init__(self, vrail1=None, vrail2=None, vrail3=None, vrail4=None, vrail5=None, vrail6=None, vrail7=None, vrail8=None, vrail9=None, vrail10=None, vrail11=None, vrail12=None, vrail13=None, vrail14=None, vrail15=None, vrail16=None,): self.vrail1 = vrail1 @@ -722,7 +659,7 @@ def __init__(self, vrail1=None, vrail2=None, vrail3=None, vrail4=None, vrail5=No def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -816,7 +753,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_pwr_rail_info_t') if self.vrail1 is not None: @@ -908,15 +845,9 @@ class pltfm_mgr_fan_info_t(object): - front_rpm - rear_rpm - percent + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'fan_num', None, None, ), # 1 - (2, TType.I32, 'front_rpm', None, None, ), # 2 - (3, TType.I32, 'rear_rpm', None, None, ), # 3 - (4, TType.I32, 'percent', None, None, ), # 4 - ) def __init__(self, fan_num=None, front_rpm=None, rear_rpm=None, percent=None,): self.fan_num = fan_num @@ -926,7 +857,7 @@ def __init__(self, fan_num=None, front_rpm=None, rear_rpm=None, percent=None,): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -960,7 +891,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('pltfm_mgr_fan_info_t') if self.fan_num is not None: @@ -997,23 +928,361 @@ def __ne__(self, other): return not (self == other) +class pltfm_mgr_qsfp_alarm_flags_t(object): + """ + Attributes: + - highalarm + - lowalarm + - highwarning + - lowwarning + + """ + + + def __init__(self, highalarm=None, lowalarm=None, highwarning=None, lowwarning=None,): + self.highalarm = highalarm + self.lowalarm = lowalarm + self.highwarning = highwarning + self.lowwarning = lowwarning + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.highalarm = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.lowalarm = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.highwarning = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.lowwarning = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_alarm_flags_t') + if self.highalarm is not None: + oprot.writeFieldBegin('highalarm', TType.BOOL, 1) + oprot.writeBool(self.highalarm) + oprot.writeFieldEnd() + if self.lowalarm is not None: + oprot.writeFieldBegin('lowalarm', TType.BOOL, 2) + oprot.writeBool(self.lowalarm) + oprot.writeFieldEnd() + if self.highwarning is not None: + oprot.writeFieldBegin('highwarning', TType.BOOL, 3) + oprot.writeBool(self.highwarning) + oprot.writeFieldEnd() + if self.lowwarning is not None: + oprot.writeFieldBegin('lowwarning', TType.BOOL, 4) + oprot.writeBool(self.lowwarning) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class pltfm_mgr_qsfp_threshold_t(object): + """ + Attributes: + - highalarm + - lowalarm + - highwarning + - lowwarning + + """ + + + def __init__(self, highalarm=None, lowalarm=None, highwarning=None, lowwarning=None,): + self.highalarm = highalarm + self.lowalarm = lowalarm + self.highwarning = highwarning + self.lowwarning = lowwarning + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.DOUBLE: + self.highalarm = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.lowalarm = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.DOUBLE: + self.highwarning = iprot.readDouble() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.DOUBLE: + self.lowwarning = iprot.readDouble() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_threshold_t') + if self.highalarm is not None: + oprot.writeFieldBegin('highalarm', TType.DOUBLE, 1) + oprot.writeDouble(self.highalarm) + oprot.writeFieldEnd() + if self.lowalarm is not None: + oprot.writeFieldBegin('lowalarm', TType.DOUBLE, 2) + oprot.writeDouble(self.lowalarm) + oprot.writeFieldEnd() + if self.highwarning is not None: + oprot.writeFieldBegin('highwarning', TType.DOUBLE, 3) + oprot.writeDouble(self.highwarning) + oprot.writeFieldEnd() + if self.lowwarning is not None: + oprot.writeFieldBegin('lowwarning', TType.DOUBLE, 4) + oprot.writeDouble(self.lowwarning) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class pltfm_mgr_qsfp_thresholds_t(object): + """ + Attributes: + - rx_pwr + - temp + - tx_bias + - tx_pwr + - vcc + - rx_pwr_is_set + - temp_is_set + - tx_bias_is_set + - tx_pwr_is_set + - vcc_is_set + + """ + + + def __init__(self, rx_pwr=None, temp=None, tx_bias=None, tx_pwr=None, vcc=None, rx_pwr_is_set=None, temp_is_set=None, tx_bias_is_set=None, tx_pwr_is_set=None, vcc_is_set=None,): + self.rx_pwr = rx_pwr + self.temp = temp + self.tx_bias = tx_bias + self.tx_pwr = tx_pwr + self.vcc = vcc + self.rx_pwr_is_set = rx_pwr_is_set + self.temp_is_set = temp_is_set + self.tx_bias_is_set = tx_bias_is_set + self.tx_pwr_is_set = tx_pwr_is_set + self.vcc_is_set = vcc_is_set + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rx_pwr = pltfm_mgr_qsfp_threshold_t() + self.rx_pwr.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.temp = pltfm_mgr_qsfp_threshold_t() + self.temp.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.tx_bias = pltfm_mgr_qsfp_threshold_t() + self.tx_bias.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.tx_pwr = pltfm_mgr_qsfp_threshold_t() + self.tx_pwr.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.vcc = pltfm_mgr_qsfp_threshold_t() + self.vcc.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.rx_pwr_is_set = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.temp_is_set = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.tx_bias_is_set = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.BOOL: + self.tx_pwr_is_set = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.BOOL: + self.vcc_is_set = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + 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])) + return + oprot.writeStructBegin('pltfm_mgr_qsfp_thresholds_t') + if self.rx_pwr is not None: + oprot.writeFieldBegin('rx_pwr', TType.STRUCT, 1) + self.rx_pwr.write(oprot) + oprot.writeFieldEnd() + if self.temp is not None: + oprot.writeFieldBegin('temp', TType.STRUCT, 2) + self.temp.write(oprot) + oprot.writeFieldEnd() + if self.tx_bias is not None: + oprot.writeFieldBegin('tx_bias', TType.STRUCT, 3) + self.tx_bias.write(oprot) + oprot.writeFieldEnd() + if self.tx_pwr is not None: + oprot.writeFieldBegin('tx_pwr', TType.STRUCT, 4) + self.tx_pwr.write(oprot) + oprot.writeFieldEnd() + if self.vcc is not None: + oprot.writeFieldBegin('vcc', TType.STRUCT, 5) + self.vcc.write(oprot) + oprot.writeFieldEnd() + if self.rx_pwr_is_set is not None: + oprot.writeFieldBegin('rx_pwr_is_set', TType.BOOL, 6) + oprot.writeBool(self.rx_pwr_is_set) + oprot.writeFieldEnd() + if self.temp_is_set is not None: + oprot.writeFieldBegin('temp_is_set', TType.BOOL, 7) + oprot.writeBool(self.temp_is_set) + oprot.writeFieldEnd() + if self.tx_bias_is_set is not None: + oprot.writeFieldBegin('tx_bias_is_set', TType.BOOL, 8) + oprot.writeBool(self.tx_bias_is_set) + oprot.writeFieldEnd() + if self.tx_pwr_is_set is not None: + oprot.writeFieldBegin('tx_pwr_is_set', TType.BOOL, 9) + oprot.writeBool(self.tx_pwr_is_set) + oprot.writeFieldEnd() + if self.vcc_is_set is not None: + oprot.writeFieldBegin('vcc_is_set', TType.BOOL, 10) + oprot.writeBool(self.vcc_is_set) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + class InvalidPltfmMgrOperation(TException): """ Attributes: - code + """ - thrift_spec = ( - None, # 0 - (1, TType.I32, 'code', None, None, ), # 1 - ) def __init__(self, code=None,): self.code = code def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: @@ -1032,7 +1301,7 @@ def read(self, iprot): def write(self, oprot): 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 oprot.writeStructBegin('InvalidPltfmMgrOperation') if self.code is not None: @@ -1058,3 +1327,122 @@ def __eq__(self, other): def __ne__(self, other): return not (self == other) +all_structs.append(pltfm_mgr_sys_tmp_t) +pltfm_mgr_sys_tmp_t.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'tmp1', None, None, ), # 1 + (2, TType.DOUBLE, 'tmp2', None, None, ), # 2 + (3, TType.DOUBLE, 'tmp3', None, None, ), # 3 + (4, TType.DOUBLE, 'tmp4', None, None, ), # 4 + (5, TType.DOUBLE, 'tmp5', None, None, ), # 5 + (6, TType.DOUBLE, 'tmp6', None, None, ), # 6 + (7, TType.DOUBLE, 'tmp7', None, None, ), # 7 + (8, TType.DOUBLE, 'tmp8', None, None, ), # 8 + (9, TType.DOUBLE, 'tmp9', None, None, ), # 9 + (10, TType.DOUBLE, 'tmp10', None, None, ), # 10 +) +all_structs.append(pltfm_mgr_eeprom_t) +pltfm_mgr_eeprom_t.thrift_spec = ( + None, # 0 + (1, TType.I16, 'version', None, None, ), # 1 + (2, TType.STRING, 'prod_name', 'UTF8', None, ), # 2 + (3, TType.STRING, 'prod_part_num', 'UTF8', None, ), # 3 + (4, TType.STRING, 'sys_asm_part_num', 'UTF8', None, ), # 4 + (5, TType.STRING, 'bfn_pcba_part_num', 'UTF8', None, ), # 5 + (6, TType.STRING, 'bfn_pcbb_part_num', 'UTF8', None, ), # 6 + (7, TType.STRING, 'odm_pcba_part_num', 'UTF8', None, ), # 7 + (8, TType.STRING, 'odm_pcba_ser_num', 'UTF8', None, ), # 8 + (9, TType.I16, 'prod_state', None, None, ), # 9 + (10, TType.I16, 'prod_ver', None, None, ), # 10 + (11, TType.I16, 'prod_sub_ver', None, None, ), # 11 + (12, TType.STRING, 'prod_ser_num', 'UTF8', None, ), # 12 + (13, TType.STRING, 'prod_ast_tag', 'UTF8', None, ), # 13 + (14, TType.STRING, 'sys_mfger', 'UTF8', None, ), # 14 + (15, TType.STRING, 'sys_mfg_date', 'UTF8', None, ), # 15 + (16, TType.STRING, 'pcb_mfger', 'UTF8', None, ), # 16 + (17, TType.STRING, 'assembled_at', 'UTF8', None, ), # 17 + (18, TType.STRING, 'loc_mac_addr', 'UTF8', None, ), # 18 + (19, TType.STRING, 'ext_mac_addr', 'UTF8', None, ), # 19 + (20, TType.I32, 'ext_mac_addr_size', None, None, ), # 20 + (21, TType.STRING, 'location', 'UTF8', None, ), # 21 + (22, TType.I16, 'crc8', None, None, ), # 22 +) +all_structs.append(pltfm_mgr_pwr_supply_info_t) +pltfm_mgr_pwr_supply_info_t.thrift_spec = ( + None, # 0 + (1, TType.I32, 'vin', None, None, ), # 1 + (2, TType.I32, 'vout', None, None, ), # 2 + (3, TType.I32, 'iout', None, None, ), # 3 + (4, TType.I32, 'pwr_out', None, None, ), # 4 + (5, TType.I32, 'fspeed', None, None, ), # 5 + (6, TType.BOOL, 'ffault', None, None, ), # 6 + (7, TType.BOOL, 'load_sharing', None, None, ), # 7 + (8, TType.STRING, 'model', 'UTF8', None, ), # 8 + (9, TType.STRING, 'serial', 'UTF8', None, ), # 9 + (10, TType.STRING, 'rev', 'UTF8', None, ), # 10 +) +all_structs.append(pltfm_mgr_pwr_rail_info_t) +pltfm_mgr_pwr_rail_info_t.thrift_spec = ( + None, # 0 + (1, TType.I32, 'vrail1', None, None, ), # 1 + (2, TType.I32, 'vrail2', None, None, ), # 2 + (3, TType.I32, 'vrail3', None, None, ), # 3 + (4, TType.I32, 'vrail4', None, None, ), # 4 + (5, TType.I32, 'vrail5', None, None, ), # 5 + (6, TType.I32, 'vrail6', None, None, ), # 6 + (7, TType.I32, 'vrail7', None, None, ), # 7 + (8, TType.I32, 'vrail8', None, None, ), # 8 + (9, TType.I32, 'vrail9', None, None, ), # 9 + (10, TType.I32, 'vrail10', None, None, ), # 10 + (11, TType.I32, 'vrail11', None, None, ), # 11 + (12, TType.I32, 'vrail12', None, None, ), # 12 + (13, TType.I32, 'vrail13', None, None, ), # 13 + (14, TType.I32, 'vrail14', None, None, ), # 14 + (15, TType.I32, 'vrail15', None, None, ), # 15 + (16, TType.I32, 'vrail16', None, None, ), # 16 +) +all_structs.append(pltfm_mgr_fan_info_t) +pltfm_mgr_fan_info_t.thrift_spec = ( + None, # 0 + (1, TType.I32, 'fan_num', None, None, ), # 1 + (2, TType.I32, 'front_rpm', None, None, ), # 2 + (3, TType.I32, 'rear_rpm', None, None, ), # 3 + (4, TType.I32, 'percent', None, None, ), # 4 +) +all_structs.append(pltfm_mgr_qsfp_alarm_flags_t) +pltfm_mgr_qsfp_alarm_flags_t.thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'highalarm', None, None, ), # 1 + (2, TType.BOOL, 'lowalarm', None, None, ), # 2 + (3, TType.BOOL, 'highwarning', None, None, ), # 3 + (4, TType.BOOL, 'lowwarning', None, None, ), # 4 +) +all_structs.append(pltfm_mgr_qsfp_threshold_t) +pltfm_mgr_qsfp_threshold_t.thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'highalarm', None, None, ), # 1 + (2, TType.DOUBLE, 'lowalarm', None, None, ), # 2 + (3, TType.DOUBLE, 'highwarning', None, None, ), # 3 + (4, TType.DOUBLE, 'lowwarning', None, None, ), # 4 +) +all_structs.append(pltfm_mgr_qsfp_thresholds_t) +pltfm_mgr_qsfp_thresholds_t.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rx_pwr', [pltfm_mgr_qsfp_threshold_t, None], None, ), # 1 + (2, TType.STRUCT, 'temp', [pltfm_mgr_qsfp_threshold_t, None], None, ), # 2 + (3, TType.STRUCT, 'tx_bias', [pltfm_mgr_qsfp_threshold_t, None], None, ), # 3 + (4, TType.STRUCT, 'tx_pwr', [pltfm_mgr_qsfp_threshold_t, None], None, ), # 4 + (5, TType.STRUCT, 'vcc', [pltfm_mgr_qsfp_threshold_t, None], None, ), # 5 + (6, TType.BOOL, 'rx_pwr_is_set', None, None, ), # 6 + (7, TType.BOOL, 'temp_is_set', None, None, ), # 7 + (8, TType.BOOL, 'tx_bias_is_set', None, None, ), # 8 + (9, TType.BOOL, 'tx_pwr_is_set', None, None, ), # 9 + (10, TType.BOOL, 'vcc_is_set', None, None, ), # 10 +) +all_structs.append(InvalidPltfmMgrOperation) +InvalidPltfmMgrOperation.thrift_spec = ( + None, # 0 + (1, TType.I32, 'code', None, None, ), # 1 +) +fix_spec(all_structs) +del all_structs diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/psu.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/psu.py index e5f245d53074..fb9bce50e071 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/psu.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/psu.py @@ -3,6 +3,7 @@ try: import os import sys + import time sys.path.append(os.path.dirname(__file__)) @@ -18,6 +19,10 @@ class Psu(PsuBase): def __init__(self, index): PsuBase.__init__(self) self.__index = index + self.__info = None + self.__ts = 0 + # STUB IMPLEMENTATION + self.color = "" ''' Units of returned info object values: @@ -31,7 +36,16 @@ def __info_get(self): def psu_info_get(client): return client.pltfm_mgr.pltfm_mgr_pwr_supply_info_get(self.__index) - return thrift_try(psu_info_get) + # Update cache once per 2 seconds + if self.__ts + 2 < time.time(): + self.__info = None + try: + self.__info = thrift_try(psu_info_get, attempts=1) + finally: + self.__ts = time.time() + return self.__info + return self.__info + @staticmethod def get_num_psus(): @@ -41,6 +55,9 @@ def get_num_psus(): """ return 2 + def get_name(self): + return f"psu-{self.__index}" + def get_powergood_status(self): """ Retrieves the oprational status of power supply unit (PSU) defined @@ -49,6 +66,8 @@ def get_powergood_status(self): :return: Boolean, True if PSU is operating properly, False if PSU is faulty """ info = self.__info_get() + if info is None: + return False return info.ffault == False and info.vout != 0 def get_voltage(self): @@ -59,7 +78,8 @@ def get_voltage(self): A float number, the output voltage in volts, e.g. 12.1 """ - return float(self.__info_get().vout) + info = self.__info_get() + return float(info.vout) if info else 0 def get_current(self): """ @@ -68,7 +88,8 @@ def get_current(self): Returns: A float number, the electric current in amperes, e.g 15.4 """ - return self.__info_get().iout / 1000. + info = self.__info_get() + return info.iout / 1000 if info else 0 def get_power(self): """ @@ -77,7 +98,8 @@ def get_power(self): Returns: A float number, the power in watts, e.g. 302.6 """ - return self.__info_get().pwr_out / 1000. + info = self.__info_get() + return info.pwr_out / 1000 if info else 0 def get_presence(self): """ @@ -89,19 +111,94 @@ def get_presence(self): def psu_present_get(client): return client.pltfm_mgr.pltfm_mgr_pwr_supply_present_get(self.__index) - status = thrift_try(psu_present_get) - return status + status = False + try: + status = thrift_try(psu_present_get) + finally: + return status + + def set_status_led(self, color): + """ + Sets the state of the PSU status LED + + Args: + color: A string representing the color with which to set the + PSU status LED + + Returns: + bool: True if status LED state is set successfully, False if not + """ + # STUB IMPLEMENTATION + self.color = color + return True + + def get_status_led(self): + """ + Gets the state of the PSU status LED + + Returns: + A string, one of the predefined STATUS_LED_COLOR_* strings above + """ + # STUB IMPLEMENTATION + return self.color # DeviceBase iface: def get_serial(self): - return self.__info_get().serial + """ + Retrieves the serial number of the device + + Returns: + string: Serial number of device + """ + info = self.__info_get() + return info.serial if info else "N/A" def get_model(self): - return self.__info_get().model + """ + Retrieves the model number (or part number) of the device + + Returns: + string: Model/part number of device + """ + info = self.__info_get() + return info.model if info else "N/A" def is_replaceable(self): + """ + Indicate whether this device is replaceable. + Returns: + bool: True if it is replaceable. + """ return True + def get_revision(self): + """ + Retrieves the hardware revision of the device + + Returns: + string: Revision value of device + """ + info = self.__info_get() + return info.rev if info else "N/A" + + def get_status(self): + """ + Retrieves the operational status of the device + + Returns: + A boolean value, True if device is operating properly, False if not + """ + return self.get_powergood_status() + + def get_position_in_parent(self): + """ + Retrieves 1-based relative physical position in parent device. If the agent cannot determine the parent-relative position + for some reason, or if the associated value of entPhysicalContainedIn is '0', then the value '-1' is returned + Returns: + integer: The 1-based relative physical position in parent device or -1 if cannot determine the position + """ + return self.__index + def psu_list_get(): psu_list = [] for i in range(1, Psu.get_num_psus() + 1): diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py index 640b1c41948c..572db5dc3227 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py @@ -13,6 +13,7 @@ from .platform_thrift_client import ThriftClient from .platform_thrift_client import thrift_try + from .platform_thrift_client import pltfm_mgr_try from sonic_platform_base.sfp_base import SfpBase from sonic_platform_base.sonic_sfp.sfputilbase import SfpUtilBase @@ -270,6 +271,107 @@ def get_transceiver_threshold_info(self): def get_change_event(self, timeout=0): return Sfp.get_transceiver_change_event(timeout) + def get_model(self): + """ + Retrieves the model number (or part number) of the device + Returns: + string: Model/part number of device + """ + def qsfp_model_get(client): + return client.pltfm_mgr.pltfm_mgr_qsfp_info_get(self.port_num) + + _, status = pltfm_mgr_try(qsfp_model_get, False) + return status + + def get_name(self): + """ + Retrieves the name of the device + Returns: + string: The name of the device + """ + return "sfp{}".format(self.port_num) + + def get_reset_status(self): + def get_qsfp_reset(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_reset_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_reset, False) + return status + + def get_rx_los(self): + def get_qsfp_rx_los(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_chan_rx_los_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_rx_los, False) + return status + + def get_rx_power(self): + def get_qsfp_rx_power(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_chan_rx_pwr_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_rx_power, False) + return status + + def get_temperature(self): + def get_qsfp_temperature(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_temperature_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_temperature, False) + return status + + + def get_transceiver_threshold_info(self): + def get_qsfp_threshold(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_thresholds_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_threshold, False) + return status + + def get_tx_bias(self): + def get_qsfp_tx_bias(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_chan_tx_bias_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_tx_bias, False) + return status + + def get_tx_fault(self): + def get_qsfp_tx_fault(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_chan_tx_fault_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_tx_fault, False) + return status + + def get_tx_power(self): + def get_qsfp_tx_power(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_chan_tx_pwr_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_tx_power, False) + return status + + def get_voltage(self): + def get_qsfp_voltage(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_voltage_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_voltage, False) + return status + + def get_power_override(self): + def get_qsfp_power_override(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_pwr_override_get(self.port_num) + _, status = pltfm_mgr_try(get_qsfp_power_override, False) + return status + + def tx_disable(self): + def get_qsfp_tx_disable(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_tx_is_disabled() + _, status = pltfm_mgr_try(get_qsfp_tx_disable, False) + return status + + def tx_disable_channel(self): + def get_qsfp_tx_disable_channel(pltfm_mgr): + return pltfm_mgr.pltfm_mgr_qsfp_tx_disable() + _, status = pltfm_mgr_try(get_qsfp_tx_disable_channel, False) + return status + + def is_replaceable(self): + """ + Indicate whether this device is replaceable. + Returns: + bool: True if it is replaceable. + """ + return True + def sfp_list_get(): sfp_list = [] for index in range(Sfp.port_start(), Sfp.port_end() + 1): diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py index 3a39c10a1e1f..78ddee039c80 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py @@ -1,8 +1,11 @@ try: import subprocess - - from sonic_platform.bfn_extensions.platform_sensors import platform_sensors_get + from collections import namedtuple + import json + from bfn_extensions.platform_sensors import platform_sensors_get from sonic_platform_base.thermal_base import ThermalBase + from sonic_py_common import device_info + import logging except ImportError as e: raise ImportError (str(e) + "- required module not found") @@ -18,6 +21,8 @@ temp2_input: 37.000 ... ''' +Threshold = namedtuple('Threshold', ['crit', 'max', 'min', 'alarm'], defaults=[0.1]*4) + def _sensors_chip_parsed(data: str): def kv(line): k, v, *_ = [t.strip(': ') for t in line.split(':') if t] + [''] @@ -68,27 +73,98 @@ def _value_get(d: dict, key_prefix, key_suffix=''): # Thermal -> ThermalBase -> DeviceBase class Thermal(ThermalBase): - def __init__(self, chip, label): + _thresholds = dict() + _max_temperature = 100.0 + _min_temperature = 0.0 + _min_high_threshold_temperature = 35.0 + + def __init__(self, chip, label, index = 0): self.__chip = chip self.__label = label self.__name = f"{chip}:{label}".lower().replace(' ', '-') + self.__collect_temp = [] + self.__index = index + self.__high_threshold = None + self.__low_threshold = None + f = None + try: + path = device_info.get_path_to_platform_dir() + '/' + 'thermal_thresholds.json' + f = open(path) + except: + logging.warning('can not open the file') + if f is not None: + self.__get_thresholds(f) + + def __get_thresholds(self, f): + def_threshold_json = json.load(f) + all_data = def_threshold_json["thermals"] + for i in all_data: + for key, value in i.items(): + self._thresholds[key] = Threshold(*value) + + def check_in_range(self, temperature): + temp_f = float(temperature) + return temp_f > self._min_temperature and temp_f <= self._max_temperature + + def check_high_threshold(self, temperature, attr_suffix): + temp_f = float(temperature) + check_range = True + if attr_suffix == 'max': + if temp_f < self._min_high_threshold_temperature: + if self.__name in self._thresholds: + temp = self._thresholds[self.__name].max + self.set_high_threshold(temp) + check_range = False + return check_range def __get(self, attr_prefix, attr_suffix): sensor_data = _sensors_get().get(self.__chip, {}).get(self.__label, {}) value = _value_get(sensor_data, attr_prefix, attr_suffix) - if value is not None: return value - raise NotImplementedError + if value is not None and self.check_in_range(value) and self.check_high_threshold(value, attr_suffix): + return value + elif self.__name in self._thresholds and attr_prefix == 'temp': + if attr_suffix == 'crit': + return self._thresholds[self.__name].crit + elif attr_suffix == 'max': + if self.__high_threshold is None: + return self._thresholds[self.__name].max + else: + return self.__high_threshold + elif attr_suffix == 'min': + if self.__low_threshold is None: + return self._thresholds[self.__name].min + else: + return self.__low_threshold + elif attr_suffix == 'alarm': + return self._thresholds[self.__name].alarm + else: + return 1.0 + else: + return 0.05 # ThermalBase interface methods: def get_temperature(self) -> float: - return float(self.__get('temp', 'input')) + temp = self.__get('temp', 'input') + self.__collect_temp.append(float(temp)) + self.__collect_temp.sort() + if len(self.__collect_temp) == 3: + del self.__collect_temp[1] + return float(temp) def get_high_threshold(self) -> float: - return float(self.__get('temp', 'max')) + if self.__high_threshold is None: + return float(self.__get('temp', 'max')) + return float(self.__high_threshold) def get_high_critical_threshold(self) -> float: return float(self.__get('temp', 'crit')) + def get_low_critical_threshold(self) -> float: + return float(self.__get('temp', 'alarm')) + + def get_model(self): + return f"{self.__label}".lower() + # DeviceBase interface methods: def get_name(self): return self.__name @@ -99,11 +175,51 @@ def get_presence(self): def get_status(self): return True + def is_replaceable(self): + return False + + def get_low_threshold(self) -> float: + if self.__low_threshold is None: + return float(self.__get('temp', 'min')) + return float(self.__low_threshold) + + def get_serial(self): + return 'N/A' + + def get_minimum_recorded(self) -> float: + temp = self.__collect_temp[0] if len(self.__collect_temp) > 0 else self.get_temperature() + temp = temp if temp <= 100.0 else 100.0 + temp = temp if temp > 0.0 else 0.1 + return float(temp) + + def get_maximum_recorded(self) -> float: + temp = self.__collect_temp[-1] if len(self.__collect_temp) > 0 else self.get_temperature() + temp = temp if temp <= 100.0 else 100.0 + temp = temp if temp > 0.0 else 0.1 + return float(temp) + + def get_position_in_parent(self): + return self.__index + + def set_high_threshold(self, temperature): + if self.check_in_range(temperature): + self.__high_threshold = temperature + return True + return False + + def set_low_threshold(self, temperature): + if self.check_in_range(temperature): + self.__low_threshold = temperature + return True + return False + def thermal_list_get(): l = [] + index = 0 for chip, chip_data in _sensors_get().items(): for sensor, sensor_data in chip_data.items(): # add only temperature sensors if _value_get(sensor_data, "temp") is not None: - l.append(Thermal(chip, sensor)) + l.append(Thermal(chip, sensor, index)) + index += 1 return l