Пример #1
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function

import re
import sys

from ansible.plugins.test import core, files, mathstuff

TESTS = list(core.TestModule().tests().keys()) + list(
    files.TestModule().tests().keys()) + list(
        mathstuff.TestModule().tests().keys())

TEST_MAP = {
    'version_compare': 'version',
    'is_dir': 'directory',
    'is_file': 'file',
    'is_link': 'link',
    'is_abs': 'abs',
    'is_same_file': 'same_file',
    'is_mount': 'mount',
    'issubset': 'subset',
    'issuperset': 'superset',
    'isnan': 'nan',
    'succeeded': 'successful',
    'success': 'successful',
Пример #2
0
# with the exception of:
#
# 1. One file needed manual remediation, where \\\\ was ultimately replace with \\ in 8 locations.
# 2. Multiple filter pipeline is unsupported. Example:
#        var|string|search('foo')
#    Which should be converted to:
#        var|string is search('foo')

import argparse
import os
import re

from ansible.plugins.test import core, files, mathstuff


TESTS = list(core.TestModule().tests().keys()) + list(files.TestModule().tests().keys()) + list(mathstuff.TestModule().tests().keys())


TEST_MAP = {
    'version_compare': 'version',
    'is_dir': 'directory',
    'is_file': 'file',
    'is_link': 'link',
    'is_abs': 'abs',
    'is_same_file': 'same_file',
    'is_mount': 'mount',
    'issubset': 'subset',
    'issuperset': 'superset',
    'isnan': 'nan',
    'succeeded': 'successful',
    'success': 'successful',