parent
4f29662a9e
commit
9a5a61bdca
|
@ -1,13 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sh
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
import sh
|
||||
REPO_PATH = {
|
||||
'extras': '/srv/ansible/stable-2.2/lib/ansible/modules/extras',
|
||||
'core': '/srv/ansible/stable-2.2/lib/ansible/modules/core'
|
||||
}
|
||||
|
||||
REPO_PATH = {'extras': '/srv/ansible/stable-2.2/lib/ansible/modules/extras',
|
||||
'core': '/srv/ansible/stable-2.2/lib/ansible/modules/core'}
|
||||
|
||||
if __name__ == '__main__':
|
||||
commit_hash = sys.argv[1]
|
||||
|
@ -49,4 +51,3 @@ if __name__ == '__main__':
|
|||
print("Problem occurred. Patch saved in: {}".format(patchfilename))
|
||||
else:
|
||||
os.remove(patchfilename)
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
import ansible.constants as C
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
print(C.DEFAULT_MODULE_PATH)
|
||||
return 0
|
||||
|
|
|
@ -86,6 +86,7 @@ def parse_args(arg_string):
|
|||
|
||||
return action, {'version': version, 'overwrite': overwrite, 'csvfile': csvfile}
|
||||
|
||||
|
||||
def seek_end_of_dict(module_data, start_line, start_col, next_node_line, next_node_col):
|
||||
"""Look for the end of a dict in a set of lines
|
||||
|
||||
|
@ -232,7 +233,9 @@ def extract_metadata(module_data):
|
|||
|
||||
# Determine where the current metadata ends
|
||||
end_line, end_col = seek_end_of_dict(module_data,
|
||||
child.lineno - 1, child.col_offset, next_lineno,
|
||||
child.lineno - 1,
|
||||
child.col_offset,
|
||||
next_lineno,
|
||||
next_col_offset)
|
||||
|
||||
elif isinstance(child.value, ast.Str):
|
||||
|
@ -483,9 +486,8 @@ def metadata_summary(plugins, version=None):
|
|||
|
||||
return list(no_metadata.values()), list(has_metadata.values()), supported_by, status
|
||||
|
||||
#
|
||||
# Filters to convert between metadata versions
|
||||
#
|
||||
|
||||
|
||||
def convert_metadata_pre_1_0_to_1_0(metadata):
|
||||
"""
|
||||
|
@ -511,9 +513,8 @@ def convert_metadata_pre_1_0_to_1_0(metadata):
|
|||
|
||||
return new_metadata
|
||||
|
||||
#
|
||||
# Subcommands
|
||||
#
|
||||
|
||||
|
||||
def add_from_csv(csv_file, version=None, overwrite=False):
|
||||
"""Implement the subcommand to add metadata from a csv file
|
||||
|
|
|
@ -74,4 +74,3 @@ output = {
|
|||
}
|
||||
|
||||
print(json.dumps(output, indent=4))
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ docs/bin/dump_keywords.py
|
|||
docs/bin/plugin_formatter.py
|
||||
docs/docsite/rst/conf.py
|
||||
examples/scripts/uptime.py
|
||||
hacking/cherrypick.py
|
||||
hacking/get_library.py
|
||||
hacking/metadata-tool.py
|
||||
hacking/tests/gen_distribution_version_testcase.py
|
||||
lib/ansible/cli/__init__.py
|
||||
lib/ansible/cli/adhoc.py
|
||||
lib/ansible/cli/console.py
|
||||
|
|
Loading…
Reference in New Issue