'Delete snmp community operation'

def delete_snmp_community(self, **kwargs):

    module = kwargs['module']
    community_name = module.params['community_name']
    access_right = module.params['access_right']
    acl_number = module.params['acl_number']
    community_mib_view = module.params['community_mib_view']
    conf_str = (CE_DELETE_SNMP_COMMUNITY_HEADER % (community_name, access_right))
    if acl_number:
        conf_str += ('<aclNumber>%s</aclNumber>' % acl_number)
    if community_mib_view:
        conf_str += ('<mibViewName>%s</mibViewName>' % community_mib_view)
    conf_str += CE_DELETE_SNMP_COMMUNITY_TAIL
    recv_xml = self.netconf_set_config(module=module, conf_str=conf_str)
    if ('<ok/>' not in recv_xml):
        module.fail_json(msg='Error:    Create    snmp    community    failed.')
    community_safe_name = '******'
    cmd = ('undo    snmp-agent    community    %s    %s' % (access_right, community_safe_name))
    return cmd
