码迷,mamicode.com
首页 > 其他好文 > 详细

yaml格式处理

时间:2018-12-15 19:54:43      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:int   pop   port   str   value   aml   top   yam   signed   

class_item
str: SCKA_TopoPort

values
list: [{‘SCKA_TopoPort‘: {‘properties‘: {‘portID‘: {‘type‘: ‘unsigned int‘}, ‘slotID‘: {‘type‘: ‘unsigned int‘},
‘destPort‘: {‘type‘: ‘SCKA_LinkInPort‘}}}, ‘SCKA_LinkInNode‘: {‘properties‘: {‘src_Id‘: {‘type‘: ‘unsigned int‘},
‘srcSlot_Id‘: {‘type‘: ‘unsigned int‘}}}, ‘SCKA_LinkInPort‘: {‘properties‘: {‘dstSlotId‘: {‘type‘: ‘unsigned int‘},
‘dstPortId‘: {‘type‘: ‘unsigned int‘}, ‘speedLevel‘: {‘type‘: ‘unsigned int‘}, ‘dstNeId‘: {‘type‘: ‘unsigned int‘},
‘fiberType‘: {‘type‘: ‘unsigned int‘}}}}]

tom = values[0]

dict: {‘SCKA_TopoPort‘: {‘properties‘: {‘portID‘: {‘type‘: ‘unsigned int‘}, ‘slotID‘: {‘type‘: ‘unsigned int‘},
‘destPort‘: {‘type‘: ‘SCKA_LinkInPort‘}}}, ‘SCKA_LinkInNode‘: {‘properties‘: {‘src_Id‘: {‘type‘: ‘unsigned int‘},
‘srcSlot_Id‘: {‘type‘: ‘unsigned int‘}}}, ‘SCKA_LinkInPort‘: {‘properties‘: {‘dstSlotId‘: {‘type‘: ‘unsigned int‘},
‘dstPortId‘: {‘type‘: ‘unsigned int‘}, ‘speedLevel‘: {‘type‘: ‘unsigned int‘}, ‘dstNeId‘: {‘type‘: ‘unsigned int‘},
‘fiberType‘: {‘type‘: ‘unsigned int‘}}}}



tom = values[0].values()

list: [{‘properties‘: {‘portID‘: {‘type‘: ‘unsigned int‘}, ‘slotID‘: {‘type‘: ‘unsigned int‘}, ‘destPort‘: {‘type‘:
‘SCKA_LinkInPort‘}}}, {‘properties‘: {‘src_Id‘: {‘type‘: ‘unsigned int‘}, ‘srcSlot_Id‘: {‘type‘: ‘unsigned int‘}}},
{‘properties‘: {‘dstSlotId‘: {‘type‘: ‘unsigned int‘}, ‘dstPortId‘: {‘type‘: ‘unsigned int‘}, ‘speedLevel‘: {‘type‘:
‘unsigned int‘}, ‘dstNeId‘: {‘type‘: ‘unsigned int‘}, ‘fiberType‘: {‘type‘: ‘unsigned int‘}}}]


tom = [ values[0] ]
list: [{‘SCKA_TopoPort‘: {‘properties‘: {‘portID‘: {‘type‘: ‘unsigned int‘}, ‘slotID‘: {‘type‘: ‘unsigned int‘},
‘destPort‘: {‘type‘: ‘SCKA_LinkInPort‘}}}, ‘SCKA_LinkInNode‘: {‘properties‘: {‘src_Id‘: {‘type‘: ‘unsigned int‘},
‘srcSlot_Id‘: {‘type‘: ‘unsigned int‘}}}, ‘SCKA_LinkInPort‘: {‘properties‘: {‘dstSlotId‘: {‘type‘: ‘unsigned int‘},
‘dstPortId‘: {‘type‘: ‘unsigned int‘}, ‘speedLevel‘: {‘type‘: ‘unsigned int‘}, ‘dstNeId‘: {‘type‘: ‘unsigned int‘},
‘fiberType‘: {‘type‘: ‘unsigned int‘}}}}]

yaml格式处理

标签:int   pop   port   str   value   aml   top   yam   signed   

原文地址:https://www.cnblogs.com/tianhu9102/p/10124295.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!