Returns the teaming of a distributed virtual portgroup

    pg_name
        The name of the portgroup

    pg_default_port_config
        The dafault port config of the portgroup

def _get_dvportgroup_teaming(pg_name, pg_default_port_config):
    '''
    Returns the teaming of a distributed virtual portgroup

    pg_name
        The name of the portgroup

    pg_default_port_config
        The dafault port config of the portgroup
    '''
    log.trace('Retrieving portgroup\'s \'%s\' teaming config', pg_name)
    teaming_policy = pg_default_port_config.uplinkTeamingPolicy
    if not teaming_policy:
        return {}
    ret_dict = {'notify_switches': teaming_policy.notifySwitches.value,
                'policy': teaming_policy.policy.value,
                'reverse_policy': teaming_policy.reversePolicy.value,
                'rolling_order': teaming_policy.rollingOrder.value}
    if teaming_policy.failureCriteria:
        failure_criteria = teaming_policy.failureCriteria
        ret_dict.update({'failure_criteria': {
            'check_beacon': failure_criteria.checkBeacon.value,
            'check_duplex': failure_criteria.checkDuplex.value,
            'check_error_percent': failure_criteria.checkErrorPercent.value,
            'check_speed': failure_criteria.checkSpeed.value,
            'full_duplex': failure_criteria.fullDuplex.value,
            'percentage': failure_criteria.percentage.value,
            'speed': failure_criteria.speed.value}})
    if teaming_policy.uplinkPortOrder:
        uplink_order = teaming_policy.uplinkPortOrder
        ret_dict.update({'port_order': {
            'active': uplink_order.activeUplinkPort,
            'standby': uplink_order.standbyUplinkPort}})
    return ret_dict