@classmethod
def _get_virtual_switches(cls, session, parent):
    """will find virtual switch nodes and return a list of such objects.
        """
    class_query_url = '/api/node/class/compHv.json?query-target=self'
    vnodes = []
    ret = session.get(class_query_url)
    vnode_data = ret.json()['imdata']
    for apic_node in vnode_data:
        if 'compHv' in apic_node:
            external_switch = cls(apic_node['compHv']['attributes']['name'])
            external_switch._populate_virtual_from_attributes(apic_node[
                'compHv']['attributes'])
            external_switch._get_system_info(session)
            if parent:
                if isinstance(parent, cls._get_parent_class()):
                    external_switch._parent = parent
                    external_switch._parent.add_child(external_switch)
            vnodes.append(external_switch)
    return vnodes
