Ejemplo n.º 1
0
def getInterfaceCount(tags):
    rowIndex = 0
    for row in range(len(tags)):
        for childIndex in range(len(tags[row]['child'])):
            rowData = tags[row]['child'][childIndex]
            methodTypes = DataUtils.getValidMethod(rowData)
            rowIndex += len(methodTypes)
    return rowIndex
Ejemplo n.º 2
0
def buildListData(tags, keyWord=''):
    listData = []

    for row in range(len(tags)):
        for childIndex in range(len(tags[row]['child'])):
            rowData = tags[row]['child'][childIndex]

            path = rowData['path']
            methodTypes = DataUtils.getValidMethod(rowData)

            for methodType in methodTypes:
                itemData = objects.clone_deep(
                    tags[row]['child'][childIndex][methodType])
                itemData = objects.assign(itemData, {
                    'path': path,
                    'type': methodType
                })
                listData.append(itemData)

    return listData