From 542939bd0b0e83330429db476e77ab43a83ebe0b Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 30 Mar 2012 12:56:55 -0700 Subject: [PATCH] More string fixes and initial add of docs --- devstack/distros/oneiric.py | 6 +- devstack/distros/rhel6.py | 4 +- devstack/packager.py | 4 +- devstack/pip.py | 6 +- docs/Makefile | 130 ++++++++++++++++++++++++++++++++++++ docs/source/img/logo.jpg | Bin 0 -> 4804 bytes docs/source/index.rst | 98 +++++++++++++++++++++++++++ 7 files changed, 238 insertions(+), 10 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/source/img/logo.jpg create mode 100644 docs/source/index.rst diff --git a/devstack/distros/oneiric.py b/devstack/distros/oneiric.py index f15cacc8..bfa7ea32 100644 --- a/devstack/distros/oneiric.py +++ b/devstack/distros/oneiric.py @@ -33,7 +33,7 @@ LOG = logging.getLogger(__name__) class DBInstaller(db.DBInstaller): def _configure_db_confs(self): - LOG.info("Fixing up %s mysql configs.", self.distro.name) + LOG.info("Fixing up %r mysql configs.", self.distro.name) fc = sh.load_file('/etc/mysql/my.cnf') lines = fc.splitlines() new_lines = list() @@ -52,7 +52,7 @@ class RabbitPackager(apt.AptPackager): #https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/878597 #https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/878600 name = pkg['name'] - LOG.debug("Handling special remove of %s." % (name)) + LOG.debug("Handling special remove of %r" % (name)) pkg_full = self._format_pkg_name(name, pkg.get("version")) cmd = apt.APT_REMOVE + [pkg_full] self._execute_apt(cmd) @@ -67,7 +67,7 @@ class RabbitPackager(apt.AptPackager): #https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/878597 #https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/878600 name = pkg['name'] - LOG.debug("Handling special install of %s." % (name)) + LOG.debug("Handling special install of %r" % (name)) #this seems to be a temporary fix for that bug with tempfile.TemporaryFile() as f: pkg_full = self._format_pkg_name(name, pkg.get("version")) diff --git a/devstack/distros/rhel6.py b/devstack/distros/rhel6.py index e4045305..4f1ce13c 100644 --- a/devstack/distros/rhel6.py +++ b/devstack/distros/rhel6.py @@ -50,7 +50,7 @@ DEF_IDENT = 'unix-group:libvirtd' class DBInstaller(db.DBInstaller): def _configure_db_confs(self): - LOG.info("Fixing up %s mysql configs.", self.distro.name) + LOG.info("Fixing up %r mysql configs.", self.distro.name) fc = sh.load_file('/etc/my.cnf') lines = fc.splitlines() new_lines = list() @@ -69,7 +69,7 @@ class HorizonInstaller(horizon.HorizonInstaller): (user, group) = self._get_apache_user_group() # This is recorded so it gets cleaned up during uninstall self.tracewriter.file_touched(SOCKET_CONF) - LOG.info("Fixing up %s and %s files" % (SOCKET_CONF, HTTPD_CONF)) + LOG.info("Fixing up %r and %r files" % (SOCKET_CONF, HTTPD_CONF)) with sh.Rooted(True): # Fix the socket prefix to someplace we can use fc = "WSGISocketPrefix %s" % (sh.joinpths(self.log_dir, "wsgi-socket")) diff --git a/devstack/packager.py b/devstack/packager.py index 862c1e63..7210148b 100644 --- a/devstack/packager.py +++ b/devstack/packager.py @@ -47,13 +47,13 @@ class Packager(object): def pre_install(self, pkg, params=None): cmds = pkg.get('pre-install') if cmds: - LOG.info("Running pre-install commands for package %s.", + LOG.info("Running pre-install commands for package %r.", pkg['name']) utils.execute_template(*cmds, params=params) def post_install(self, pkg, params=None): cmds = pkg.get('post-install') if cmds: - LOG.info("Running post-install commands for package %s.", + LOG.info("Running post-install commands for package %r.", pkg['name']) utils.execute_template(*cmds, params=params) diff --git a/devstack/pip.py b/devstack/pip.py index 4bb52150..57d85360 100644 --- a/devstack/pip.py +++ b/devstack/pip.py @@ -33,7 +33,7 @@ def _make_pip_name(name, version): def install(pip, distro): name = pip['name'] root_cmd = distro.get_command_config('pip') - LOG.audit("Installing python package (%s) using pip command (%s)" % (name, root_cmd)) + LOG.audit("Installing python package %r using pip command %s" % (name, root_cmd)) name_full = _make_pip_name(name, pip.get('version')) real_cmd = [root_cmd, 'install'] + PIP_INSTALL_CMD_OPTS options = pip.get('options') @@ -49,12 +49,12 @@ def uninstall(pip, distro, skip_errors=True): try: # Versions don't seem to matter here... name = _make_pip_name(pip['name'], None) - LOG.audit("Uninstalling python package (%s) using pip command (%s)" % (name, root_cmd)) + LOG.audit("Uninstalling python package %r using pip command %s" % (name, root_cmd)) cmd = [root_cmd, 'uninstall'] + PIP_UNINSTALL_CMD_OPTS + [name] sh.execute(*cmd, run_as_root=True) except excp.ProcessExecutionError: if skip_errors: - LOG.debug(("Ignoring execution error that occured when uninstalling pip %s!" + LOG.debug(("Ignoring execution error that occured when uninstalling pip %r!" " (this may be ok if it was uninstalled by a previous component)") % (name)) else: raise diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..dda9bfc7 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,130 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/FubuMVC.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/FubuMVC.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/FubuMVC" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/FubuMVC" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + make -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/source/img/logo.jpg b/docs/source/img/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6cf850ec63560ec30c51e6eebd7010f755b3e020 GIT binary patch literal 4804 zcmb_gc|6onwExX84P$4>(hxHWp%RmAn4#=hW-Qr4$i8MNvPLRoC;QS2GuFy7mO_-R zXtHD(ld>g=h*3$N-sio~d;h-A=bd~0I`^J)&pqdU&iUSZFm><|;5E`S)B`{u5MXdP zfCD<93$TE}|M-wt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