Start of rename to anvil
This commit is contained in:
parent
5bcffa1a16
commit
ebf7bfe0dc
@ -19,6 +19,9 @@ from optparse import OptionParser, OptionGroup
|
||||
|
||||
from anvil import actions
|
||||
from anvil import version
|
||||
from anvil import shell as sh
|
||||
from anvil import settings
|
||||
|
||||
|
||||
HELP_WIDTH = 80
|
||||
|
||||
@ -56,11 +59,12 @@ def parse():
|
||||
|
||||
# Install/start/stop/uninstall specific options
|
||||
base_group = OptionGroup(parser, "Install & uninstall & start & stop specific options")
|
||||
def_persona = sh.joinpths(settings.PERSONA_DIR, 'devstack.sh.yaml')
|
||||
base_group.add_option("-p", "--persona",
|
||||
action="store",
|
||||
type="string",
|
||||
dest="persona_fn",
|
||||
default='conf/personas/devstack.sh.yaml',
|
||||
default=def_persona,
|
||||
metavar="FILE",
|
||||
help="required persona yaml file to apply (default: %default)")
|
||||
base_group.add_option("-a", "--action",
|
||||
|
@ -18,21 +18,23 @@ import os
|
||||
import sys
|
||||
|
||||
# What this program is called
|
||||
PROG_NICE_NAME = "DEVSTACKpy"
|
||||
PROG_NAME = 'anvil'
|
||||
|
||||
# Ip version constants for network ip detection
|
||||
IPV4 = 'IPv4'
|
||||
IPV6 = 'IPv6'
|
||||
|
||||
# RC files generated / used
|
||||
RC_FN_TEMPL = "os-%s.rc"
|
||||
RC_FN_TEMPL = "%s.rc"
|
||||
|
||||
# Where the configs and templates should be at...
|
||||
STACK_BIN_DIR = os.path.abspath(os.path.dirname(sys.argv[0]))
|
||||
STACK_CONFIG_DIR = os.path.join(STACK_BIN_DIR, "conf")
|
||||
STACK_DISTRO_DIR = os.path.join(STACK_CONFIG_DIR, "distros")
|
||||
STACK_TEMPLATE_DIR = os.path.join(STACK_CONFIG_DIR, "templates")
|
||||
STACK_CONFIG_LOCATION = os.path.join(STACK_CONFIG_DIR, "conf.ini")
|
||||
BIN_DIR = os.path.abspath(os.path.dirname(sys.argv[0]))
|
||||
CONFIG_DIR = os.path.join(BIN_DIR, "conf")
|
||||
DISTRO_DIR = os.path.join(CONFIG_DIR, "distros")
|
||||
TEMPLATE_DIR = os.path.join(CONFIG_DIR, "templates")
|
||||
PERSONA_DIR = os.path.join(CONFIG_DIR, "personas")
|
||||
CONFIG_NAME = 'anvil.ini'
|
||||
CONFIG_LOCATION = os.path.join(CONFIG_DIR, CONFIG_NAME)
|
||||
|
||||
|
||||
def gen_rc_filename(root_name):
|
||||
|
@ -687,7 +687,7 @@ def welcome():
|
||||
lower = "| %s |" % (version.version_string())
|
||||
welcome_header = _get_welcome_stack()
|
||||
max_line_len = len(max(welcome_header.splitlines(), key=len))
|
||||
footer = colorizer.color(settings.PROG_NICE_NAME, 'green')
|
||||
footer = colorizer.color(settings.PROG_NAME.upper(), 'green')
|
||||
footer += ": "
|
||||
footer += colorizer.color(lower, 'blue', bold=True)
|
||||
uncolored_footer = (settings.PROG_NICE_NAME + ": " + lower)
|
||||
|
@ -14,9 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
DEVSTACK_VERSION = ['2012', '4']
|
||||
YEAR, COUNT = DEVSTACK_VERSION
|
||||
FINAL = False # May never be final ;-)
|
||||
VERSION = ['2012', '5']
|
||||
YEAR, COUNT = VERSION
|
||||
FINAL = False # May never be final ;)
|
||||
|
||||
|
||||
def canonical_version_string():
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
# Fedora 16 configuration for DevstackPy
|
||||
# Fedora 16
|
||||
name: fedora-16
|
||||
distro_pattern: fedora-16
|
||||
packager_name: anvil.packaging.yum:YumPackager
|
||||
|
@ -6,16 +6,15 @@ import sys, os
|
||||
sys.path.insert(0, os.path.abspath('../../'))
|
||||
sys.path.insert(0, os.path.abspath('../'))
|
||||
sys.path.insert(0, os.path.abspath('./'))
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
from anvil import version as anvil_version
|
||||
from anvil import settings as anvil_settings
|
||||
|
||||
# Supress warnings for docs that aren't used yet
|
||||
#unused_docs = [
|
||||
#]
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
@ -31,66 +30,32 @@ intersphinx_mapping = {
|
||||
'sphinx': ('http://sphinx.pocoo.org', None)
|
||||
}
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
#templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'DEVSTACKpy'
|
||||
project = anvil_settings.PROG_NAME.upper()
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
from anvil import version as devstack_version
|
||||
release = devstack_version.version_string()
|
||||
version = devstack_version.canonical_version_string()
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
release = anvil_version.version_string()
|
||||
version = anvil_version.canonical_version_string()
|
||||
|
||||
# Set the default Pygments syntax
|
||||
highlight_language = 'python'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
#pygments_style = 'monokai'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
@ -105,112 +70,6 @@ html_theme_options = {
|
||||
"headfont": "Arial, sans-serif"
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = ['_themes']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = "DEVSTACKpy"
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = "FubuMVC"
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
html_logo = 'img/logo.png'
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = "favicon.ico"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {
|
||||
#'**': ['sidebar_versions.html', 'sidebar_links.html'],
|
||||
#}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
#htmlhelp_basename = 'DEVSTACKpy-doc'
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
# The paper size ('letter' or 'a4').
|
||||
#latex_paper_size = 'letter'
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#latex_font_size = '10pt'
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#latex_preamble = ''
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
html_logo = 'img/anvil-tiny.png'
|
||||
|
BIN
docs/source/img/anvil-tiny.png
Normal file
BIN
docs/source/img/anvil-tiny.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
docs/source/img/anvil.png
Normal file
BIN
docs/source/img/anvil.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
BIN
docs/source/img/anvil.xcf
Normal file
BIN
docs/source/img/anvil.xcf
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
@ -1,10 +1,10 @@
|
||||
.. _index:
|
||||
|
||||
=====================
|
||||
DEVSTACKpy Documentation
|
||||
ANVIL Documentation
|
||||
=====================
|
||||
|
||||
.. rubric:: Everything about DEVSTACKpy, a set of **python** scripts and utilities to quickly deploy an OpenStack cloud.
|
||||
.. rubric:: Everything about ANVIL, a set of **python** scripts and utilities to quickly deploy an OpenStack cloud.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
7
smithy
7
smithy
@ -116,10 +116,9 @@ def find_config(args):
|
||||
"""
|
||||
|
||||
locs = []
|
||||
locs.append(settings.STACK_CONFIG_LOCATION)
|
||||
locs.append(sh.joinpths("/etc", "anvil", "conf.ini"))
|
||||
locs.append(sh.joinpths(settings.STACK_CONFIG_DIR, "conf.ini"))
|
||||
for path in locs:
|
||||
locs.append(settings.CONFIG_LOCATION)
|
||||
locs.append(sh.joinpths("/etc", settings.PROG_NAME, settings.CONFIG_NAME))
|
||||
for path in set(locs):
|
||||
LOG.debug("Looking for anvil configuration in: %r", path)
|
||||
if sh.isfile(path):
|
||||
LOG.debug("Found anvil configuration in: %r", path)
|
||||
|
@ -8,7 +8,7 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir,
|
||||
'devstack',
|
||||
'anvil',
|
||||
'__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
@ -35,11 +35,10 @@ def find_config():
|
||||
"""
|
||||
|
||||
locs = []
|
||||
locs.append(settings.STACK_CONFIG_LOCATION)
|
||||
locs.append(sh.joinpths("/etc", "devstack", "stack.ini"))
|
||||
locs.append(sh.joinpths(settings.STACK_CONFIG_DIR, "stack.ini"))
|
||||
locs.append(sh.joinpths("conf", "stack.ini"))
|
||||
for path in locs:
|
||||
locs.append(settings.CONFIG_LOCATION)
|
||||
locs.append(sh.joinpths("/etc", settings.PROG_NAME, settings.CONFIG_NAME)
|
||||
locs.append(sh.joinpths(os.getcwd(), "../", settings.CONFIG_DIR, settings.CONFIG_NAME))
|
||||
for path in set(locs):
|
||||
if sh.isfile(path):
|
||||
return path
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user