def _fcontext_add_or_delete_policy(action, name, filetype=None, sel_type=None, sel_user=None, sel_level=None):
    '''
    .. versionadded:: 2019.2.0

    Performs the action as called from ``fcontext_add_policy`` or ``fcontext_delete_policy``.

    Returns the result of the call to semanage.
    '''
    if action not in ['add', 'delete']:
        raise SaltInvocationError('Actions supported are "add" and "delete", not "{0}".'.format(action))
    cmd = 'semanage fcontext --{0}'.format(action)
    # "semanage --ftype a" isn't valid on Centos 6,
    # don't pass --ftype since "a" is the default filetype.
    if filetype is not None and filetype != 'a':
        _validate_filetype(filetype)
        cmd += ' --ftype {0}'.format(filetype)
    if sel_type is not None:
        cmd += ' --type {0}'.format(sel_type)
    if sel_user is not None:
        cmd += ' --seuser {0}'.format(sel_user)
    if sel_level is not None:
        cmd += ' --range {0}'.format(sel_level)
    cmd += ' ' + re.escape(name)
    return __salt__['cmd.run_all'](cmd)
.. versionadded:: 2019.2.0

    Performs the action as called from ``fcontext_add_policy`` or ``fcontext_delete_policy``.

    Returns the result of the call to semanage.