diff --git a/autogenerate_config_docs/autohelp-wrapper b/autogenerate_config_docs/autohelp-wrapper index 8d6a7fba..78e70726 100755 --- a/autogenerate_config_docs/autohelp-wrapper +++ b/autogenerate_config_docs/autohelp-wrapper @@ -63,7 +63,7 @@ activate_venv() { project=$1 . $VENVDIR/$project/bin/activate - pip install --upgrade pip + pip install --upgrade pip setuptools } get_project() { diff --git a/autogenerate_config_docs/diff_branches.py b/autogenerate_config_docs/diff_branches.py index 7c3e6049..fcc7c06d 100755 --- a/autogenerate_config_docs/diff_branches.py +++ b/autogenerate_config_docs/diff_branches.py @@ -83,6 +83,8 @@ def get_options(project, branch, args): cmd = ("python extract_swift_flags.py dump " "-s %(sources)s/swift -m %(sources)s/openstack-manuals" % {'sources': args.sources}) + if branch == 'stable/liberty': + cmd += " -f docbook" repo_path = args.sources else: packages = _get_packages(project, branch) @@ -215,11 +217,13 @@ def get_env(project, new_branch, old_list, new_list): for name in sorted(new_opts, _cmpopts): opt = new_list[name][1] name = format_option_name(name) + helptext = opt['help'].strip().replace('\n', ' ') + helptext = ' '.join(helptext.split()) cells = (("%(name)s = %(default)s" % {'name': name, 'default': opt['default']}).strip(), "(%(type)s) %(help)s" % {'type': opt['type'], - 'help': opt['help']}) + 'help': helptext}) env['new_opts'].append(cells) # New defaults diff --git a/autogenerate_config_docs/extract_swift_flags.py b/autogenerate_config_docs/extract_swift_flags.py index 4ecbb82e..9c4f1245 100644 --- a/autogenerate_config_docs/extract_swift_flags.py +++ b/autogenerate_config_docs/extract_swift_flags.py @@ -86,7 +86,7 @@ def get_existing_options_from_rst(optfiles): """Parse an existing RST table to compile a list of existing options.""" options = {} for optfile in optfiles: - input_string = open(optfile).read() + input_string = open(optfile).read().replace(':ref:', '') output, pub = core.publish_programmatically( source_class=io.StringInput, source=input_string, source_path=optfile, destination_class=io.NullOutput, @@ -114,7 +114,7 @@ def get_existing_options(optfiles): for optfile in optfiles: if optfile.endswith('/swift-conf-changes.xml'): continue - xml = etree.fromstring(open(optfile).read()) + xml = etree.fromstring(open(optfile).read().replace(':ref:', '')) tbody = xml.find(DBK_NS + "tbody") trlist = tbody.findall(DBK_NS + "tr") for tr in trlist: @@ -224,8 +224,6 @@ def read_options(swift_repo, manuals_repo, read_from, verbose): options = get_existing_options( glob.glob(manuals_repo + '/doc/common/tables/swift*xml')) - sys.exit(0) - option_descs = extract_descriptions_from_devref(swift_repo, options) conf_samples = glob.glob(swift_repo + '/etc/*conf-sample') for sample in conf_samples: