def find_vswitch_id_for_name(name, vswitch_map):
    """
    Returns the vSwitch K2 id for a given vSwitch Name

    :param name: The vSwitch Name
    :param vswitch_map: The vSwitch map from the HMC Topo
    :returns: vSwitch K2 ID
    """
    for item in vswitch_map.iteritems():
        vswitch_id = item[0]
        vswitch_k2_obj = item[1]
        vswitch_k2_name = vswitch_k2_obj.element.findtext('SwitchName')

        if vswitch_k2_name == name:
            return vswitch_id
    return None