Add SNMP Community to NOS device.

        Args:
            community (str): Community string to be added to device.
            callback (function): A function executed upon completion of the
                method.  The only parameter passed to `callback` will be the
                ``ElementTree`` `config`.

        Returns:
            Return value of `callback`.

        Raises:
            KeyError: if `community` is not defined.

def add_snmp_community(self, **kwargs):
        """
        Add SNMP Community to NOS device.

        Args:
            community (str): Community string to be added to device.
            callback (function): A function executed upon completion of the
                method.  The only parameter passed to `callback` will be the
                ``ElementTree`` `config`.

        Returns:
            Return value of `callback`.

        Raises:
            KeyError: if `community` is not defined.
        """
        community = kwargs.pop('community')
        callback = kwargs.pop('callback', self._callback)

        config = ET.Element('config')
        snmp_server = ET.SubElement(config, 'snmp-server',
                                    xmlns=("urn:brocade.com:mgmt:"
                                           "brocade-snmp"))
        community_el = ET.SubElement(snmp_server, 'community')
        community_name = ET.SubElement(community_el, 'community')
        community_name.text = community

        return callback(config)