Start of rename to anvil
This commit is contained in:
parent
7fa08420be
commit
5bcffa1a16
26
AUTHORS
26
AUTHORS
|
@ -1,5 +1,5 @@
|
|||
V2
|
||||
--
|
||||
Anvil
|
||||
-----
|
||||
Chris Wright <chrisw@sous-sol.org>
|
||||
Gunther Hagleitner <hagleitn@yahoo-inc.com>
|
||||
Jonathan Lacour <jonathan@dreamhost.com>
|
||||
|
@ -8,26 +8,4 @@ Ken Thomas <krt@yahoo-inc.com>
|
|||
Ed Hall <edhall@yahoo-inc.com>
|
||||
Mike Perez <thingee@gmail.com>
|
||||
Mike Pittaro <mikeyp@LaHondaResearch.org>
|
||||
|
||||
V1
|
||||
--
|
||||
Andy Smith <github@anarkystic.com>
|
||||
Anthony Young <sleepsonthefloor@gmail.com>
|
||||
Brad Hall <brad@nicira.com>
|
||||
Chmouel Boudjnah <chmouel@chmouel.com>
|
||||
Dean Troyer <dtroyer@gmail.com>
|
||||
Devin Carlen <devin.carlen@gmail.com>
|
||||
Eddie Hebert <edhebert@gmail.com>
|
||||
Jake Dahn <admin@jakedahn.com>
|
||||
James E. Blair <james.blair@rackspace.com>
|
||||
Jason Cannavale <jason.cannavale@rackspace.com>
|
||||
Jay Pipes <jaypipes@gmail.com>
|
||||
Jesse Andrews <anotherjesse@gmail.com>
|
||||
Justin Shepherd <galstrom21@gmail.com>
|
||||
Kiall Mac Innes <kiall@managedit.ie>
|
||||
Scott Moser <smoser@ubuntu.com>
|
||||
Todd Willey <xtoddx@gmail.com>
|
||||
Tres Henry <tres@treshenry.net>
|
||||
Vishvananda Ishaya <vishvananda@gmail.com>
|
||||
Yun Mao <yunmao@gmail.com>
|
||||
Doug Hellmann <doug.hellmann@dreamhost.com>
|
||||
|
|
24
HACKING.md
24
HACKING.md
|
@ -1,26 +1,22 @@
|
|||
# Contributing to DEVSTACKpy
|
||||
# Contributing to Anvil
|
||||
|
||||
## General
|
||||
|
||||
DEVSTACKpy is written in python (we should be compatible with ``python >= 2.6``).
|
||||
Anvil is written in python (we should be compatible with ``python >= 2.6``).
|
||||
|
||||
DEVSTACKpy's official repository is located on GitHub at
|
||||
https://github.com/yahoo/Openstack-DevstackPy.git.
|
||||
Anvil's official repository is located on GitHub at: https://github.com/yahoo/Openstack-DevstackPy.git.
|
||||
|
||||
Besides the master branch that tracks the OpenStack ``trunk`` branches will maintained for all
|
||||
OpenStack releases starting with Essex (stable/essex).
|
||||
Besides the master branch that tracks the OpenStack ``trunk`` branches will maintained for all OpenStack releases starting with Essex (stable/essex).
|
||||
|
||||
The primary script in DEVSTACKpy is ``stack``, which performs the bulk of the
|
||||
work for DevStack's use cases (it acts as the main program entrypoint).
|
||||
The primary script in Anvil is ``smithy``, which performs the bulk of the work for Anvil's use cases (it acts as the main program entrypoint).
|
||||
|
||||
A number of additional scripts can be found in the ``tools`` directory that may
|
||||
be useful for other tasks related to DEVSTACKpy.
|
||||
A number of additional scripts can be found in the ``tools`` directory that may or may not be useful to you.
|
||||
|
||||
## Documentation
|
||||
|
||||
Please create documentation in the ``docs/`` folder which will be synced with:
|
||||
|
||||
http://readthedocs.org/docs/devstackpy/
|
||||
http://readthedocs.org/docs/anvil/
|
||||
|
||||
This will suffice until a more *official* documentation site can be made.
|
||||
|
||||
|
@ -35,12 +31,6 @@ This will suffice until a more *official* documentation site can be made.
|
|||
* Please also attempt to run the yaml validation if you adjust any yaml files in the `conf` directory.
|
||||
* ``./run_tests.sh -y``
|
||||
|
||||
## Tests
|
||||
|
||||
To run our limited set of tests (WIP) use the following command:
|
||||
|
||||
./run_tests.sh
|
||||
|
||||
## Environment Variables
|
||||
|
||||
* The ``OS_*`` environment variables should be the only ones used for all
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# We want more information!
|
||||
|
||||
Please check out: <http://readthedocs.org/docs/devstackpy/>
|
||||
Please check out: <http://readthedocs.org/docs/anvil/>
|
||||
|
|
|
@ -17,17 +17,17 @@
|
|||
import abc
|
||||
import collections
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import date
|
||||
from devstack import env_rc
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import packager
|
||||
from devstack import pip
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from devstack import trace as tr
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import date
|
||||
from anvil import env_rc
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import packager
|
||||
from anvil import pip
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
from anvil import trace as tr
|
||||
from anvil import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -19,11 +19,11 @@ import re
|
|||
|
||||
import iniparse
|
||||
|
||||
from devstack import cfg_helpers
|
||||
from devstack import env
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import utils
|
||||
from anvil import cfg_helpers
|
||||
from anvil import env
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import utils
|
||||
|
||||
ENV_PAT = re.compile(r"^\s*\$\{([\w\d]+):\-(.*)\}\s*$")
|
||||
SUB_MATCH = re.compile(r"(?:\$\(([\w\d]+):([\w\d]+))\)")
|
|
@ -17,14 +17,14 @@
|
|||
import re
|
||||
import weakref
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import downloader as down
|
||||
from devstack import exceptions as excp
|
||||
from devstack import importer
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import trace as tr
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import downloader as down
|
||||
from anvil import exceptions as excp
|
||||
from anvil import importer
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import trace as tr
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -512,7 +512,7 @@ class ProgramRuntime(ComponentBase):
|
|||
pass
|
||||
|
||||
def _fetch_run_type(self):
|
||||
return self.cfg.getdefaulted("DEFAULT", "run_type", 'devstack.runners.fork:ForkRunner')
|
||||
return self.cfg.getdefaulted("DEFAULT", "run_type", 'anvil.runners.fork:ForkRunner')
|
||||
|
||||
def configure(self):
|
||||
# First make a pass and make sure all runtime (e.g. upstart starting)
|
|
@ -14,12 +14,12 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
import abc
|
||||
|
|
@ -18,15 +18,15 @@ from urlparse import urlunparse
|
|||
|
||||
import io
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from anvil import cfg
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
|
||||
from devstack.components import db
|
||||
from devstack.components import keystone
|
||||
from anvil.components import db
|
||||
from anvil.components import keystone
|
||||
|
||||
from devstack.image import uploader
|
||||
from anvil.image import uploader
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from anvil.components import db
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -18,14 +18,14 @@ import io
|
|||
|
||||
from urlparse import urlunparse
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import cfg
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from anvil.components import db
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
import io
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import cfg
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from anvil.components import db
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -20,19 +20,19 @@ import weakref
|
|||
|
||||
from urlparse import urlunparse
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import date
|
||||
from devstack import exceptions
|
||||
from devstack import libvirt as lv
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import cfg
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import date
|
||||
from anvil import exceptions
|
||||
from anvil import libvirt as lv
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from devstack.components import keystone
|
||||
from devstack.components import rabbit
|
||||
from anvil.components import db
|
||||
from anvil.components import keystone
|
||||
from anvil.components import rabbit
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -592,23 +592,24 @@ class NovaConfConfigurator(object):
|
|||
# Do a little check to make sure actually have that interface/s
|
||||
public_interface = self._getstr('public_interface')
|
||||
vlan_interface = self._getstr('vlan_interface', public_interface)
|
||||
if not utils.is_interface(public_interface):
|
||||
msg = "Public interface %r is not a known interface" % (public_interface)
|
||||
known_interfaces = utils.get_interfaces()
|
||||
if not public_interface in known_interfaces:
|
||||
msg = "Public interface %r is not a known interface (is it one of %s??)" % (public_interface, ", ".join(known_interfaces))
|
||||
raise exceptions.ConfigException(msg)
|
||||
if not utils.is_interface(vlan_interface):
|
||||
msg = "VLAN interface %r is not a known interface" % (vlan_interface)
|
||||
if not vlan_interface in known_interfaces:
|
||||
msg = "VLAN interface %r is not a known interface (is it one of %s??)" % (vlan_interface, ", ".join(known_interfaces))
|
||||
raise exceptions.ConfigException(msg)
|
||||
# Driver specific interface checks
|
||||
drive_canon = canon_virt_driver(self._getstr('virt_driver'))
|
||||
if drive_canon == 'xenserver':
|
||||
xs_flat_ifc = self._getstr('xs_flat_interface', XS_DEF_INTERFACE)
|
||||
if xs_flat_ifc and not utils.is_interface(xs_flat_ifc):
|
||||
msg = "Xenserver flat interface %s is not a known interface" % (xs_flat_ifc)
|
||||
if xs_flat_ifc and not xs_flat_ifc in known_interfaces:
|
||||
msg = "Xenserver flat interface %s is not a known interface (is it one of %s??)" % (xs_flat_ifc, ", ".join(known_interfaces))
|
||||
raise exceptions.ConfigException(msg)
|
||||
elif drive_canon == 'libvirt':
|
||||
flat_interface = self._getstr('flat_interface')
|
||||
if flat_interface and not utils.is_interface(flat_interface):
|
||||
msg = "Libvirt flat interface %s is not a known interface" % (flat_interface)
|
||||
if flat_interface and not flat_interface in known_interfaces:
|
||||
msg = "Libvirt flat interface %s is not a known interface (is it one of %s??)" % (flat_interface, ", ".join(known_interfaces))
|
||||
raise exceptions.ConfigException(msg)
|
||||
|
||||
def configure(self, root_wrapped):
|
|
@ -14,8 +14,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
|
||||
from devstack.components import nova
|
||||
from anvil.components import nova
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from devstack import component
|
||||
from anvil import component
|
||||
|
||||
|
||||
class Installer(component.PkgInstallComponent):
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
import io
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import cfg
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from anvil.components import db
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
from tempfile import TemporaryFile
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
import re
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import component as comp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import component as comp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
import functools
|
||||
import pprint
|
||||
|
||||
from devstack import log as logging
|
||||
from anvil import log as logging
|
||||
|
||||
# Very useful example ones...
|
||||
# See: http://wiki.python.org/moin/PythonDecoratorLibrary
|
|
@ -22,11 +22,11 @@ import shlex
|
|||
|
||||
import yaml
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import importer
|
||||
from devstack import log as logging
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from anvil import colorizer
|
||||
from anvil import importer
|
||||
from anvil import log as logging
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -18,9 +18,9 @@
|
|||
"""Platform-specific logic for RedHat Fedora 16 components.
|
||||
"""
|
||||
|
||||
from devstack import log as logging
|
||||
from anvil import log as logging
|
||||
|
||||
from devstack.distros import rhel6
|
||||
from anvil.distros import rhel6
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -21,14 +21,14 @@
|
|||
import tempfile
|
||||
import time
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from anvil.components import db
|
||||
|
||||
from devstack.packaging import apt
|
||||
from anvil.packaging import apt
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -20,17 +20,17 @@
|
|||
|
||||
import re
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import db
|
||||
from devstack.components import horizon
|
||||
from devstack.components import nova
|
||||
from devstack.components import rabbit
|
||||
from anvil.components import db
|
||||
from anvil.components import horizon
|
||||
from anvil.components import nova
|
||||
from anvil.components import rabbit
|
||||
|
||||
from devstack.packaging import yum
|
||||
from anvil.packaging import yum
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -186,6 +186,6 @@ class YumPackagerWithRelinks(yum.YumPackager):
|
|||
# parallel.
|
||||
#
|
||||
# This of course doesn't work when running from git
|
||||
# like devstack does....
|
||||
# like anvil does....
|
||||
sh.symlink(src, tgt)
|
||||
return True
|
|
@ -19,9 +19,9 @@ import urllib
|
|||
|
||||
import progressbar
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from anvil import colorizer
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import os
|
||||
|
||||
from devstack import log as logging
|
||||
from anvil import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
|
@ -17,13 +17,13 @@
|
|||
from urlparse import urlunparse
|
||||
import re
|
||||
|
||||
from devstack import date
|
||||
from devstack import env
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import date
|
||||
from anvil import env
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import keystone
|
||||
from anvil.components import keystone
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -20,11 +20,11 @@ import re
|
|||
import tarfile
|
||||
import urlparse
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import downloader as down
|
||||
from devstack import log
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import downloader as down
|
||||
from anvil import log
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
import contextlib
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import exceptions as excp
|
||||
from devstack import importer
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import exceptions as excp
|
||||
from anvil import importer
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -23,7 +23,7 @@ import sys
|
|||
from logging.handlers import SysLogHandler
|
||||
from logging.handlers import WatchedFileHandler
|
||||
|
||||
from devstack import colorizer
|
||||
from anvil import colorizer
|
||||
|
||||
|
||||
# A list of things we want to replicate from logging levels
|
||||
|
@ -118,5 +118,5 @@ def setupLogging(log_level, format='%(levelname)s: @%(name)s : %(message)s'):
|
|||
root_logger.setLevel(log_level)
|
||||
|
||||
|
||||
def getLogger(name='devstack'):
|
||||
def getLogger(name='anvil'):
|
||||
return TermAdapter(logging.getLogger(name))
|
|
@ -17,8 +17,8 @@
|
|||
from optparse import IndentedHelpFormatter
|
||||
from optparse import OptionParser, OptionGroup
|
||||
|
||||
from devstack import actions
|
||||
from devstack import version
|
||||
from anvil import actions
|
||||
from anvil import version
|
||||
|
||||
HELP_WIDTH = 80
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
import abc
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import importer
|
||||
from devstack import log as logging
|
||||
from devstack import utils
|
||||
from anvil import colorizer
|
||||
from anvil import importer
|
||||
from anvil import log as logging
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -15,11 +15,11 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from devstack import log as logging
|
||||
from devstack import packager as pack
|
||||
from devstack import shell as sh
|
||||
from anvil import log as logging
|
||||
from anvil import packager as pack
|
||||
from anvil import shell as sh
|
||||
|
||||
LOG = logging.getLogger("devstack.packaging.apt")
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# Base apt commands
|
||||
APT_GET = ['apt-get']
|
|
@ -14,11 +14,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from devstack import log as logging
|
||||
from devstack import packager as pack
|
||||
from devstack import shell as sh
|
||||
from anvil import log as logging
|
||||
from anvil import packager as pack
|
||||
from anvil import shell as sh
|
||||
|
||||
LOG = logging.getLogger("devstack.packaging.yum")
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# Root yum command
|
||||
YUM_CMD = ['yum']
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
import yaml
|
||||
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
# under the License.
|
||||
|
||||
|
||||
from devstack import log as logging
|
||||
from devstack import shell as sh
|
||||
from devstack import packager as pack
|
||||
from anvil import log as logging
|
||||
from anvil import shell as sh
|
||||
from anvil import packager as pack
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -22,11 +22,11 @@ import signal
|
|||
import sys
|
||||
import time
|
||||
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import runner as base
|
||||
from devstack import shell as sh
|
||||
from devstack import trace as tr
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import runner as base
|
||||
from anvil import shell as sh
|
||||
from anvil import trace as tr
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -18,14 +18,14 @@ import json
|
|||
import re
|
||||
import tempfile
|
||||
|
||||
from devstack import date
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import runner as base
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from devstack import trace as tr
|
||||
from devstack import utils
|
||||
from anvil import date
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import runner as base
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
from anvil import trace as tr
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -54,7 +54,7 @@ LIST_CMD = ['screen', '-ls']
|
|||
SCREEN_KILLER = ['screen', '-X', '-S', '%SCREEN_ID%', 'quit']
|
||||
|
||||
# Where our screen sockets will go
|
||||
SCREEN_SOCKET_DIR_NAME = "devstack-screen-sockets"
|
||||
SCREEN_SOCKET_DIR_NAME = "forged-screen-sockets"
|
||||
SCREEN_SOCKET_PERM = 0700
|
||||
|
||||
# Screen RC file
|
|
@ -16,13 +16,13 @@
|
|||
|
||||
import json
|
||||
|
||||
from devstack import date
|
||||
from devstack import log as logging
|
||||
from devstack import runner as base
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from devstack import trace as tr
|
||||
from devstack import utils
|
||||
from anvil import date
|
||||
from anvil import log as logging
|
||||
from anvil import runner as base
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
from anvil import trace as tr
|
||||
from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -32,7 +32,7 @@ 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, "stack.ini")
|
||||
STACK_CONFIG_LOCATION = os.path.join(STACK_CONFIG_DIR, "conf.ini")
|
||||
|
||||
|
||||
def gen_rc_filename(root_name):
|
|
@ -23,9 +23,9 @@ import shutil
|
|||
import subprocess
|
||||
import time
|
||||
|
||||
from devstack import env
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from anvil import env
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
from devstack import date
|
||||
from devstack import exceptions as excp
|
||||
from devstack import shell as sh
|
||||
from anvil import date
|
||||
from anvil import exceptions as excp
|
||||
from anvil import shell as sh
|
||||
|
||||
# Trace per line output format and file extension formats
|
||||
TRACE_FMT = ("%s - %s" + os.linesep)
|
|
@ -28,13 +28,13 @@ import distutils.version
|
|||
import netifaces
|
||||
import progressbar
|
||||
|
||||
from devstack import colorizer
|
||||
from devstack import date
|
||||
from devstack import exceptions as excp
|
||||
from devstack import log as logging
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from devstack import version
|
||||
from anvil import colorizer
|
||||
from anvil import date
|
||||
from anvil import exceptions as excp
|
||||
from anvil import log as logging
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
from anvil import version
|
||||
|
||||
# The pattern will match either a comment to the EOL, or a
|
||||
# token to be subbed. The replacer will check which it got and
|
||||
|
@ -304,10 +304,6 @@ def get_host_ip():
|
|||
return ip
|
||||
|
||||
|
||||
def is_interface(intfc):
|
||||
return intfc in get_interfaces()
|
||||
|
||||
|
||||
def get_interfaces():
|
||||
interfaces = dict()
|
||||
for intfc in netifaces.interfaces():
|
|
@ -1,4 +1,4 @@
|
|||
# Devstack2 local configuration
|
||||
# Anvil's local configuration
|
||||
|
||||
# When a value looks like a bash variable + default then it is parsed like a bash
|
||||
# variable and will perform similar lookups. Ie ${SQL_HOST:-localhost} will
|
||||
|
@ -28,10 +28,10 @@
|
|||
[DEFAULT]
|
||||
|
||||
# Which run type to use.
|
||||
# For forking/daemonizing mode use: devstack.runners.fork:ForkRunner
|
||||
# For screen mode use: devstack.runners.screen:ScreenRunner
|
||||
# For upstart mode use: devstack.runners.upstart:UpstartRunner
|
||||
run_type = ${RUN_TYPE:-devstack.runners.fork:ForkRunner}
|
||||
# For forking/daemonizing mode use: anvil.runners.fork:ForkRunner
|
||||
# For screen mode use: anvil.runners.screen:ScreenRunner
|
||||
# For upstart mode use: anvil.runners.upstart:UpstartRunner
|
||||
run_type = ${RUN_TYPE:-anvil.runners.fork:ForkRunner}
|
||||
|
||||
# How many seconds to wait until a service comes online before using it.
|
||||
# For example, before uploading to glance we need keystone and glance to be online.
|
||||
|
@ -342,7 +342,7 @@ partition_power_size = ${SWIFT_PARTITION_POWER_SIZE:-9}
|
|||
# and if no password is found (ie an empty string) then the user will be prompted to enter
|
||||
# a password, if they do not enter one (or its blank) then one will be generated for the user.
|
||||
|
||||
# You will need to send the same MYSQL_PASSWORD to every host if you are doing a multi-node devstack installation.
|
||||
# You will need to send the same MYSQL_PASSWORD to every host if you are doing a multi-node openstack installation.
|
||||
sql = ${MYSQL_PASSWORD:-}
|
||||
|
||||
# Change the rabbit password since the default is "guest"
|
|
@ -2,7 +2,7 @@
|
|||
# Fedora 16 configuration for DevstackPy
|
||||
name: fedora-16
|
||||
distro_pattern: fedora-16
|
||||
packager_name: devstack.packaging.yum:YumPackager
|
||||
packager_name: anvil.packaging.yum:YumPackager
|
||||
commands:
|
||||
apache:
|
||||
restart: service httpd restart
|
||||
|
@ -60,9 +60,9 @@ commands:
|
|||
components:
|
||||
db:
|
||||
action_classes:
|
||||
install: devstack.distros.fedora16:DBInstaller
|
||||
running: devstack.components.db:DBRuntime
|
||||
uninstall: devstack.components.db:DBUninstaller
|
||||
install: anvil.distros.fedora16:DBInstaller
|
||||
running: anvil.components.db:DBRuntime
|
||||
uninstall: anvil.components.db:DBUninstaller
|
||||
packages:
|
||||
- name: mysql
|
||||
removable: true
|
||||
|
@ -72,9 +72,9 @@ components:
|
|||
version: 5.5*
|
||||
general:
|
||||
action_classes:
|
||||
install: devstack.components.pkglist:Installer
|
||||
running: devstack.component:EmptyRuntime
|
||||
uninstall: devstack.components.pkglist:Uninstaller
|
||||
install: anvil.components.pkglist:Installer
|
||||
running: anvil.component:EmptyRuntime
|
||||
uninstall: anvil.components.pkglist:Uninstaller
|
||||
packages:
|
||||
- name: curl
|
||||
removable: false
|
||||
|
@ -162,9 +162,9 @@ components:
|
|||
version: 1.12*
|
||||
glance:
|
||||
action_classes:
|
||||
install: devstack.components.glance:GlanceInstaller
|
||||
running: devstack.components.glance:GlanceRuntime
|
||||
uninstall: devstack.components.glance:GlanceUninstaller
|
||||
install: anvil.components.glance:GlanceInstaller
|
||||
running: anvil.components.glance:GlanceRuntime
|
||||
uninstall: anvil.components.glance:GlanceUninstaller
|
||||
packages:
|
||||
- name: MySQL-python
|
||||
removable: true
|
||||
|
@ -204,18 +204,18 @@ components:
|
|||
version: 0.2
|
||||
glance-client:
|
||||
action_classes:
|
||||
install: devstack.components.glance_client:GlanceClientInstaller
|
||||
running: devstack.components.glance_client:GlanceClientRuntime
|
||||
uninstall: devstack.components.glance_client:GlanceClientUninstaller
|
||||
install: anvil.components.glance_client:GlanceClientInstaller
|
||||
running: anvil.components.glance_client:GlanceClientRuntime
|
||||
uninstall: anvil.components.glance_client:GlanceClientUninstaller
|
||||
packages:
|
||||
- name: python-prettytable
|
||||
removable: true
|
||||
version: 0.5*
|
||||
horizon:
|
||||
action_classes:
|
||||
install: devstack.distros.fedora16:HorizonInstaller
|
||||
running: devstack.components.horizon:HorizonRuntime
|
||||
uninstall: devstack.components.horizon:HorizonUninstaller
|
||||
install: anvil.distros.fedora16:HorizonInstaller
|
||||
running: anvil.components.horizon:HorizonRuntime
|
||||
uninstall: anvil.components.horizon:HorizonUninstaller
|
||||
packages:
|
||||
- name: django-registration
|
||||
removable: true
|
||||
|
@ -282,9 +282,9 @@ components:
|
|||
version: 1.4
|
||||
keystone:
|
||||
action_classes:
|
||||
install: devstack.components.keystone:KeystoneInstaller
|
||||
running: devstack.components.keystone:KeystoneRuntime
|
||||
uninstall: devstack.components.keystone:KeystoneUninstaller
|
||||
install: anvil.components.keystone:KeystoneInstaller
|
||||
running: anvil.components.keystone:KeystoneRuntime
|
||||
uninstall: anvil.components.keystone:KeystoneUninstaller
|
||||
packages:
|
||||
- name: MySQL-python
|
||||
removable: true
|
||||
|
@ -345,9 +345,9 @@ components:
|
|||
version: 3.7*
|
||||
keystone-client:
|
||||
action_classes:
|
||||
install: devstack.components.keystone_client:KeyStoneClientInstaller
|
||||
running: devstack.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: devstack.components.keystone_client:KeyStoneClientUninstaller
|
||||
install: anvil.components.keystone_client:KeyStoneClientInstaller
|
||||
running: anvil.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: anvil.components.keystone_client:KeyStoneClientUninstaller
|
||||
packages:
|
||||
- name: python-prettytable
|
||||
removable: true
|
||||
|
@ -357,24 +357,24 @@ components:
|
|||
version: 1.5.0*
|
||||
melange:
|
||||
action_classes:
|
||||
install: devstack.components.melange:MelangeInstaller
|
||||
running: devstack.components.melange:MelangeRuntime
|
||||
uninstall: devstack.components.melange:MelangeUninstaller
|
||||
install: anvil.components.melange:MelangeInstaller
|
||||
running: anvil.components.melange:MelangeRuntime
|
||||
uninstall: anvil.components.melange:MelangeUninstaller
|
||||
packages: null
|
||||
no-vnc:
|
||||
action_classes:
|
||||
install: devstack.components.novnc:NoVNCInstaller
|
||||
running: devstack.components.novnc:NoVNCRuntime
|
||||
uninstall: devstack.components.novnc:NoVNCUninstaller
|
||||
install: anvil.components.novnc:NoVNCInstaller
|
||||
running: anvil.components.novnc:NoVNCRuntime
|
||||
uninstall: anvil.components.novnc:NoVNCUninstaller
|
||||
packages:
|
||||
- name: numpy
|
||||
removable: false
|
||||
version: 1.6*
|
||||
nova:
|
||||
action_classes:
|
||||
install: devstack.distros.fedora16:NovaInstaller
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
install: anvil.distros.fedora16:NovaInstaller
|
||||
running: anvil.components.nova:NovaRuntime
|
||||
uninstall: anvil.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: python-webob
|
||||
removable: true
|
||||
|
@ -548,18 +548,18 @@ components:
|
|||
version: 1.0*
|
||||
nova-client:
|
||||
action_classes:
|
||||
install: devstack.components.nova_client:NovaClientInstaller
|
||||
running: devstack.components.nova_client:NovaClientRuntime
|
||||
uninstall: devstack.components.nova_client:NovaClientUninstaller
|
||||
install: anvil.components.nova_client:NovaClientInstaller
|
||||
running: anvil.components.nova_client:NovaClientRuntime
|
||||
uninstall: anvil.components.nova_client:NovaClientUninstaller
|
||||
packages:
|
||||
- name: python-prettytable
|
||||
removable: true
|
||||
version: 0.5*
|
||||
quantum:
|
||||
action_classes:
|
||||
install: devstack.components.quantum:QuantumInstaller
|
||||
running: devstack.components.quantum:QuantumRuntime
|
||||
uninstall: devstack.components.quantum:QuantumUninstaller
|
||||
install: anvil.components.quantum:QuantumInstaller
|
||||
running: anvil.components.quantum:QuantumRuntime
|
||||
uninstall: anvil.components.quantum:QuantumUninstaller
|
||||
packages:
|
||||
- name: libxml2-python
|
||||
removable: false
|
||||
|
@ -603,18 +603,18 @@ components:
|
|||
version: 0.7.2
|
||||
quantum-client:
|
||||
action_classes:
|
||||
install: devstack.components.quantum_client:QuantumClientInstaller
|
||||
running: devstack.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: devstack.components.quantum_client:QuantumClientUninstaller
|
||||
install: anvil.components.quantum_client:QuantumClientInstaller
|
||||
running: anvil.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: anvil.components.quantum_client:QuantumClientUninstaller
|
||||
packages:
|
||||
- name: python-gflags
|
||||
removable: true
|
||||
version: 1.5*
|
||||
rabbit-mq:
|
||||
action_classes:
|
||||
install: devstack.components.rabbit:RabbitInstaller
|
||||
running: devstack.distros.fedora16:RabbitRuntime
|
||||
uninstall: devstack.components.rabbit:RabbitUninstaller
|
||||
install: anvil.components.rabbit:RabbitInstaller
|
||||
running: anvil.distros.fedora16:RabbitRuntime
|
||||
uninstall: anvil.components.rabbit:RabbitUninstaller
|
||||
packages:
|
||||
- name: rabbitmq-server
|
||||
pre-install:
|
||||
|
@ -633,9 +633,9 @@ components:
|
|||
version: 2.6*
|
||||
swift:
|
||||
action_classes:
|
||||
install: devstack.components.swift:SwiftInstaller
|
||||
running: devstack.components.swift:SwiftRuntime
|
||||
uninstall: devstack.components.swift:SwiftUninstaller
|
||||
install: anvil.components.swift:SwiftInstaller
|
||||
running: anvil.components.swift:SwiftRuntime
|
||||
uninstall: anvil.components.swift:SwiftUninstaller
|
||||
packages:
|
||||
- name: memcached
|
||||
removable: true
|
||||
|
@ -655,7 +655,7 @@ components:
|
|||
- name: python-paste-deploy
|
||||
removable: true
|
||||
version: 1.5*
|
||||
# TODO(mikeyp) resolve python-simplejson, listed in devstack
|
||||
# TODO(mikeyp) resolve python-simplejson,
|
||||
# is it really needed ?
|
||||
- name : python-simplejson
|
||||
version: 2.1.6*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# RedHat Enterprise Linux 6
|
||||
name: rhel-6
|
||||
distro_pattern: redhat-6(.*)
|
||||
packager_name: devstack.packaging.yum:YumPackager
|
||||
packager_name: anvil.packaging.yum:YumPackager
|
||||
commands:
|
||||
apache:
|
||||
restart: service httpd restart
|
||||
|
@ -60,9 +60,9 @@ commands:
|
|||
components:
|
||||
db:
|
||||
action_classes:
|
||||
install: devstack.distros.rhel6:DBInstaller
|
||||
running: devstack.components.db:DBRuntime
|
||||
uninstall: devstack.components.db:DBUninstaller
|
||||
install: anvil.distros.rhel6:DBInstaller
|
||||
running: anvil.components.db:DBRuntime
|
||||
uninstall: anvil.components.db:DBUninstaller
|
||||
packages:
|
||||
- name: mysql
|
||||
removable: true
|
||||
|
@ -72,9 +72,9 @@ components:
|
|||
version: 5.1*
|
||||
general:
|
||||
action_classes:
|
||||
install: devstack.components.pkglist:Installer
|
||||
running: devstack.component:EmptyRuntime
|
||||
uninstall: devstack.components.pkglist:Uninstaller
|
||||
install: anvil.components.pkglist:Installer
|
||||
running: anvil.component:EmptyRuntime
|
||||
uninstall: anvil.components.pkglist:Uninstaller
|
||||
packages:
|
||||
- name: coreutils
|
||||
removable: false
|
||||
|
@ -166,9 +166,9 @@ components:
|
|||
version: 1.1.2
|
||||
glance:
|
||||
action_classes:
|
||||
install: devstack.components.glance:GlanceInstaller
|
||||
running: devstack.components.glance:GlanceRuntime
|
||||
uninstall: devstack.components.glance:GlanceUninstaller
|
||||
install: anvil.components.glance:GlanceInstaller
|
||||
running: anvil.components.glance:GlanceRuntime
|
||||
uninstall: anvil.components.glance:GlanceUninstaller
|
||||
packages:
|
||||
- name: MySQL-python
|
||||
removable: true
|
||||
|
@ -210,9 +210,9 @@ components:
|
|||
version: 0.2
|
||||
glance-client:
|
||||
action_classes:
|
||||
install: devstack.components.glance_client:GlanceClientInstaller
|
||||
running: devstack.components.glance_client:GlanceClientRuntime
|
||||
uninstall: devstack.components.glance_client:GlanceClientUninstaller
|
||||
install: anvil.components.glance_client:GlanceClientInstaller
|
||||
running: anvil.components.glance_client:GlanceClientRuntime
|
||||
uninstall: anvil.components.glance_client:GlanceClientUninstaller
|
||||
packages:
|
||||
- name: python-argparse
|
||||
removable: true
|
||||
|
@ -222,9 +222,9 @@ components:
|
|||
version: 0.5*
|
||||
horizon:
|
||||
action_classes:
|
||||
install: devstack.distros.rhel6:HorizonInstaller
|
||||
running: devstack.components.horizon:HorizonRuntime
|
||||
uninstall: devstack.components.horizon:HorizonUninstaller
|
||||
install: anvil.distros.rhel6:HorizonInstaller
|
||||
running: anvil.components.horizon:HorizonRuntime
|
||||
uninstall: anvil.components.horizon:HorizonUninstaller
|
||||
packages:
|
||||
- name: httpd
|
||||
removable: true
|
||||
|
@ -244,7 +244,7 @@ components:
|
|||
- name: python-webob1.0
|
||||
removable: true
|
||||
version: 1.0*
|
||||
packager_name: devstack.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_name: anvil.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_options:
|
||||
links:
|
||||
- source: /usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/
|
||||
|
@ -283,9 +283,9 @@ components:
|
|||
version: 0.7.2
|
||||
keystone:
|
||||
action_classes:
|
||||
install: devstack.components.keystone:KeystoneInstaller
|
||||
running: devstack.components.keystone:KeystoneRuntime
|
||||
uninstall: devstack.components.keystone:KeystoneUninstaller
|
||||
install: anvil.components.keystone:KeystoneInstaller
|
||||
running: anvil.components.keystone:KeystoneRuntime
|
||||
uninstall: anvil.components.keystone:KeystoneUninstaller
|
||||
packages:
|
||||
- name: MySQL-python
|
||||
removable: true
|
||||
|
@ -323,7 +323,7 @@ components:
|
|||
- name: python-webob1.0
|
||||
removable: true
|
||||
version: 1.0*
|
||||
packager_name: devstack.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_name: anvil.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_options:
|
||||
links:
|
||||
- source: /usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/
|
||||
|
@ -351,9 +351,9 @@ components:
|
|||
version: 0.7.2
|
||||
keystone-client:
|
||||
action_classes:
|
||||
install: devstack.components.keystone_client:KeyStoneClientInstaller
|
||||
running: devstack.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: devstack.components.keystone_client:KeyStoneClientUninstaller
|
||||
install: anvil.components.keystone_client:KeyStoneClientInstaller
|
||||
running: anvil.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: anvil.components.keystone_client:KeyStoneClientUninstaller
|
||||
packages:
|
||||
- name: python-argparse
|
||||
removable: true
|
||||
|
@ -363,27 +363,27 @@ components:
|
|||
version: 0.5*
|
||||
melange:
|
||||
action_classes:
|
||||
install: devstack.components.melange:MelangeInstaller
|
||||
running: devstack.components.melange:MelangeRuntime
|
||||
uninstall: devstack.components.melange:MelangeUninstaller
|
||||
install: anvil.components.melange:MelangeInstaller
|
||||
running: anvil.components.melange:MelangeRuntime
|
||||
uninstall: anvil.components.melange:MelangeUninstaller
|
||||
no-vnc:
|
||||
action_classes:
|
||||
install: devstack.components.novnc:NoVNCInstaller
|
||||
running: devstack.components.novnc:NoVNCRuntime
|
||||
uninstall: devstack.components.novnc:NoVNCUninstaller
|
||||
install: anvil.components.novnc:NoVNCInstaller
|
||||
running: anvil.components.novnc:NoVNCRuntime
|
||||
uninstall: anvil.components.novnc:NoVNCUninstaller
|
||||
pips:
|
||||
- name: numpy
|
||||
version: '1.5'
|
||||
nova:
|
||||
action_classes:
|
||||
install: devstack.distros.rhel6:NovaInstaller
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
install: anvil.distros.rhel6:NovaInstaller
|
||||
running: anvil.components.nova:NovaRuntime
|
||||
uninstall: anvil.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: python-webob1.0
|
||||
removable: true
|
||||
version: 1.0*
|
||||
packager_name: devstack.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_name: anvil.distros.rhel6:YumPackagerWithRelinks
|
||||
packager_options:
|
||||
links:
|
||||
- source: /usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/
|
||||
|
@ -532,9 +532,9 @@ components:
|
|||
version: 1.0*
|
||||
nova-client:
|
||||
action_classes:
|
||||
install: devstack.components.nova_client:NovaClientInstaller
|
||||
running: devstack.components.nova_client:NovaClientRuntime
|
||||
uninstall: devstack.components.nova_client:NovaClientUninstaller
|
||||
install: anvil.components.nova_client:NovaClientInstaller
|
||||
running: anvil.components.nova_client:NovaClientRuntime
|
||||
uninstall: anvil.components.nova_client:NovaClientUninstaller
|
||||
packages:
|
||||
- name: python-argparse
|
||||
removable: true
|
||||
|
@ -544,9 +544,9 @@ components:
|
|||
version: 0.5*
|
||||
quantum:
|
||||
action_classes:
|
||||
install: devstack.components.quantum:QuantumInstaller
|
||||
running: devstack.components.quantum:QuantumRuntime
|
||||
uninstall: devstack.components.quantum:QuantumUninstaller
|
||||
install: anvil.components.quantum:QuantumInstaller
|
||||
running: anvil.components.quantum:QuantumRuntime
|
||||
uninstall: anvil.components.quantum:QuantumUninstaller
|
||||
packages:
|
||||
- name: libxml2-python
|
||||
removable: false
|
||||
|
@ -575,18 +575,18 @@ components:
|
|||
version: 0.7.2
|
||||
quantum-client:
|
||||
action_classes:
|
||||
install: devstack.components.quantum_client:QuantumClientInstaller
|
||||
running: devstack.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: devstack.components.quantum_client:QuantumClientUninstaller
|
||||
install: anvil.components.quantum_client:QuantumClientInstaller
|
||||
running: anvil.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: anvil.components.quantum_client:QuantumClientUninstaller
|
||||
packages:
|
||||
- name: python-gflags
|
||||
removable: true
|
||||
version: 1.4*
|
||||
rabbit-mq:
|
||||
action_classes:
|
||||
install: devstack.components.rabbit:RabbitInstaller
|
||||
running: devstack.distros.rhel6:RabbitRuntime
|
||||
uninstall: devstack.components.rabbit:RabbitUninstaller
|
||||
install: anvil.components.rabbit:RabbitInstaller
|
||||
running: anvil.distros.rhel6:RabbitRuntime
|
||||
uninstall: anvil.components.rabbit:RabbitUninstaller
|
||||
packages:
|
||||
- name: rabbitmq-server
|
||||
pre-install:
|
||||
|
@ -606,8 +606,8 @@ components:
|
|||
version: 2.6*
|
||||
swift:
|
||||
action_classes:
|
||||
install: devstack.components.swift:SwiftInstaller
|
||||
running: devstack.components.swift:SwiftRuntime
|
||||
uninstall: devstack.components.swift:SwiftUninstaller
|
||||
install: anvil.components.swift:SwiftInstaller
|
||||
running: anvil.components.swift:SwiftRuntime
|
||||
uninstall: anvil.components.swift:SwiftUninstaller
|
||||
...
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Ubuntu 11.10 (Oneiric)
|
||||
distro_pattern: "(Ubuntu)(.*?)(oneiric)"
|
||||
name: ubuntu-oneiric
|
||||
packager_name: devstack.packaging.apt:AptPackager
|
||||
packager_name: anvil.packaging.apt:AptPackager
|
||||
commands:
|
||||
apache:
|
||||
restart: service apache2 restart
|
||||
|
@ -65,9 +65,9 @@ commands:
|
|||
components:
|
||||
db:
|
||||
action_classes:
|
||||
install: devstack.distros.oneiric:DBInstaller
|
||||
running: devstack.components.db:DBRuntime
|
||||
uninstall: devstack.components.db:DBUninstaller
|
||||
install: anvil.distros.oneiric:DBInstaller
|
||||
running: anvil.components.db:DBRuntime
|
||||
uninstall: anvil.components.db:DBUninstaller
|
||||
packages:
|
||||
- name: mysql-client-5.1
|
||||
removable: true
|
||||
|
@ -92,9 +92,9 @@ components:
|
|||
version: 5.1*
|
||||
general:
|
||||
action_classes:
|
||||
install: devstack.components.pkglist:Installer
|
||||
running: devstack.component:EmptyRuntime
|
||||
uninstall: devstack.components.pkglist:Uninstaller
|
||||
install: anvil.components.pkglist:Installer
|
||||
running: anvil.component:EmptyRuntime
|
||||
uninstall: anvil.components.pkglist:Uninstaller
|
||||
packages:
|
||||
- name: curl
|
||||
removable: false
|
||||
|
@ -176,9 +176,9 @@ components:
|
|||
version: 0.8.0
|
||||
glance:
|
||||
action_classes:
|
||||
install: devstack.components.glance:GlanceInstaller
|
||||
running: devstack.components.glance:GlanceRuntime
|
||||
uninstall: devstack.components.glance:GlanceUninstaller
|
||||
install: anvil.components.glance:GlanceInstaller
|
||||
running: anvil.components.glance:GlanceRuntime
|
||||
uninstall: anvil.components.glance:GlanceUninstaller
|
||||
packages:
|
||||
- name: python-eventlet
|
||||
removable: true
|
||||
|
@ -220,9 +220,9 @@ components:
|
|||
version: 0.2
|
||||
glance-client:
|
||||
action_classes:
|
||||
install: devstack.components.glance_client:GlanceClientInstaller
|
||||
running: devstack.components.glance_client:GlanceClientRuntime
|
||||
uninstall: devstack.components.glance_client:GlanceClientUninstaller
|
||||
install: anvil.components.glance_client:GlanceClientInstaller
|
||||
running: anvil.components.glance_client:GlanceClientRuntime
|
||||
uninstall: anvil.components.glance_client:GlanceClientUninstaller
|
||||
packages:
|
||||
- name: python-argparse
|
||||
removable: true
|
||||
|
@ -232,9 +232,9 @@ components:
|
|||
version: 0.5*
|
||||
horizon:
|
||||
action_classes:
|
||||
install: devstack.components.horizon:HorizonInstaller
|
||||
running: devstack.components.horizon:HorizonRuntime
|
||||
uninstall: devstack.components.horizon:HorizonUninstaller
|
||||
install: anvil.components.horizon:HorizonInstaller
|
||||
running: anvil.components.horizon:HorizonRuntime
|
||||
uninstall: anvil.components.horizon:HorizonUninstaller
|
||||
packages:
|
||||
- name: apache2
|
||||
removable: true
|
||||
|
@ -304,9 +304,9 @@ components:
|
|||
version: 1.7.9.3
|
||||
keystone:
|
||||
action_classes:
|
||||
install: devstack.components.keystone:KeystoneInstaller
|
||||
running: devstack.components.keystone:KeystoneRuntime
|
||||
uninstall: devstack.components.keystone:KeystoneUninstaller
|
||||
install: anvil.components.keystone:KeystoneInstaller
|
||||
running: anvil.components.keystone:KeystoneRuntime
|
||||
uninstall: anvil.components.keystone:KeystoneUninstaller
|
||||
packages:
|
||||
- name: libldap2-dev
|
||||
removable: true
|
||||
|
@ -367,9 +367,9 @@ components:
|
|||
version: 1.5.3
|
||||
keystone-client:
|
||||
action_classes:
|
||||
install: devstack.components.keystone_client:KeyStoneClientInstaller
|
||||
running: devstack.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: devstack.components.keystone_client:KeyStoneClientUninstaller
|
||||
install: anvil.components.keystone_client:KeyStoneClientInstaller
|
||||
running: anvil.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: anvil.components.keystone_client:KeyStoneClientUninstaller
|
||||
packages:
|
||||
- name: python-argparse
|
||||
removable: true
|
||||
|
@ -379,9 +379,9 @@ components:
|
|||
version: 0.5*
|
||||
melange:
|
||||
action_classes:
|
||||
install: devstack.components.melange:MelangeInstaller
|
||||
running: devstack.components.melange:MelangeRuntime
|
||||
uninstall: devstack.components.melange:MelangeUninstaller
|
||||
install: anvil.components.melange:MelangeInstaller
|
||||
running: anvil.components.melange:MelangeRuntime
|
||||
uninstall: anvil.components.melange:MelangeUninstaller
|
||||
packages:
|
||||
- name: python-eventlet
|
||||
removable: true
|
||||
|
@ -409,18 +409,18 @@ components:
|
|||
version: 1.0*
|
||||
no-vnc:
|
||||
action_classes:
|
||||
install: devstack.components.novnc:NoVNCInstaller
|
||||
running: devstack.components.novnc:NoVNCRuntime
|
||||
uninstall: devstack.components.novnc:NoVNCUninstaller
|
||||
install: anvil.components.novnc:NoVNCInstaller
|
||||
running: anvil.components.novnc:NoVNCRuntime
|
||||
uninstall: anvil.components.novnc:NoVNCUninstaller
|
||||
packages:
|
||||
- name: python-numpy
|
||||
removable: true
|
||||
version: 1:1.5*
|
||||
nova:
|
||||
action_classes:
|
||||
install: devstack.components.nova:NovaInstaller
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
install: anvil.components.nova:NovaInstaller
|
||||
running: anvil.components.nova:NovaRuntime
|
||||
uninstall: anvil.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: python-webob
|
||||
removable: true
|
||||
|
@ -569,9 +569,9 @@ components:
|
|||
version: 1:1*
|
||||
nova-client:
|
||||
action_classes:
|
||||
install: devstack.components.nova_client:NovaClientInstaller
|
||||
running: devstack.components.nova_client:NovaClientRuntime
|
||||
uninstall: devstack.components.nova_client:NovaClientUninstaller
|
||||
install: anvil.components.nova_client:NovaClientInstaller
|
||||
running: anvil.components.nova_client:NovaClientRuntime
|
||||
uninstall: anvil.components.nova_client:NovaClientUninstaller
|
||||
packages:
|
||||
- name: python-argparse
|
||||
removable: true
|
||||
|
@ -581,9 +581,9 @@ components:
|
|||
version: 0.5*
|
||||
quantum:
|
||||
action_classes:
|
||||
install: devstack.components.quantum:QuantumInstaller
|
||||
running: devstack.components.quantum:QuantumRuntime
|
||||
uninstall: devstack.components.quantum:QuantumUninstaller
|
||||
install: anvil.components.quantum:QuantumInstaller
|
||||
running: anvil.components.quantum:QuantumRuntime
|
||||
uninstall: anvil.components.quantum:QuantumUninstaller
|
||||
packages:
|
||||
- name: python-eventlet
|
||||
removable: true
|
||||
|
@ -625,28 +625,28 @@ components:
|
|||
version: 0.6*
|
||||
quantum-client:
|
||||
action_classes:
|
||||
install: devstack.components.quantum_client:QuantumClientInstaller
|
||||
running: devstack.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: devstack.components.quantum_client:QuantumClientUninstaller
|
||||
install: anvil.components.quantum_client:QuantumClientInstaller
|
||||
running: anvil.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: anvil.components.quantum_client:QuantumClientUninstaller
|
||||
packages:
|
||||
- name: python-gflags
|
||||
removable: true
|
||||
version: 1.5*
|
||||
rabbit-mq:
|
||||
action_classes:
|
||||
install: devstack.components.rabbit:RabbitInstaller
|
||||
running: devstack.components.rabbit:RabbitRuntime
|
||||
uninstall: devstack.components.rabbit:RabbitUninstaller
|
||||
install: anvil.components.rabbit:RabbitInstaller
|
||||
running: anvil.components.rabbit:RabbitRuntime
|
||||
uninstall: anvil.components.rabbit:RabbitUninstaller
|
||||
packages:
|
||||
- name: rabbitmq-server
|
||||
removable: true
|
||||
version: 2.5*
|
||||
packager_name: devstack.distros.oneiric:RabbitPackager
|
||||
packager_name: anvil.distros.oneiric:RabbitPackager
|
||||
swift:
|
||||
action_classes:
|
||||
install: devstack.components.swift:SwiftInstaller
|
||||
running: devstack.components.swift:SwiftRuntime
|
||||
uninstall: devstack.components.swift:SwiftUninstaller
|
||||
install: anvil.components.swift:SwiftInstaller
|
||||
running: anvil.components.swift:SwiftRuntime
|
||||
uninstall: anvil.components.swift:SwiftUninstaller
|
||||
packages:
|
||||
- name: memcached
|
||||
removable: true
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Ubuntu 12.04 (Precise)
|
||||
distro_pattern: "(Ubuntu)(.*?)(precise)"
|
||||
name: ubuntu-precise
|
||||
packager_name: devstack.packaging.apt:AptPackager
|
||||
packager_name: anvil.packaging.apt:AptPackager
|
||||
commands:
|
||||
apache:
|
||||
restart: service apache2 restart
|
||||
|
@ -65,9 +65,9 @@ commands:
|
|||
components:
|
||||
db:
|
||||
action_classes:
|
||||
install: devstack.distros.oneiric:DBInstaller
|
||||
running: devstack.components.db:DBRuntime
|
||||
uninstall: devstack.components.db:DBUninstaller
|
||||
install: anvil.distros.oneiric:DBInstaller
|
||||
running: anvil.components.db:DBRuntime
|
||||
uninstall: anvil.components.db:DBUninstaller
|
||||
packages:
|
||||
- name: mysql-client-5.5
|
||||
removable: true
|
||||
|
@ -92,9 +92,9 @@ components:
|
|||
version: 5.5*
|
||||
general:
|
||||
action_classes:
|
||||
install: devstack.components.pkglist:Installer
|
||||
running: devstack.component:EmptyRuntime
|
||||
uninstall: devstack.components.pkglist:Uninstaller
|
||||
install: anvil.components.pkglist:Installer
|
||||
running: anvil.component:EmptyRuntime
|
||||
uninstall: anvil.components.pkglist:Uninstaller
|
||||
packages:
|
||||
- name: curl
|
||||
removable: false
|
||||
|
@ -176,9 +176,9 @@ components:
|
|||
version: 0.8.0
|
||||
glance:
|
||||
action_classes:
|
||||
install: devstack.components.glance:GlanceInstaller
|
||||
running: devstack.components.glance:GlanceRuntime
|
||||
uninstall: devstack.components.glance:GlanceUninstaller
|
||||
install: anvil.components.glance:GlanceInstaller
|
||||
running: anvil.components.glance:GlanceRuntime
|
||||
uninstall: anvil.components.glance:GlanceUninstaller
|
||||
packages:
|
||||
- name: python-eventlet
|
||||
removable: true
|
||||
|
@ -218,18 +218,18 @@ components:
|
|||
version: 0.2
|
||||
glance-client:
|
||||
action_classes:
|
||||
install: devstack.components.glance_client:GlanceClientInstaller
|
||||
running: devstack.components.glance_client:GlanceClientRuntime
|
||||
uninstall: devstack.components.glance_client:GlanceClientUninstaller
|
||||
install: anvil.components.glance_client:GlanceClientInstaller
|
||||
running: anvil.components.glance_client:GlanceClientRuntime
|
||||
uninstall: anvil.components.glance_client:GlanceClientUninstaller
|
||||
packages:
|
||||
- name: python-prettytable
|
||||
removable: true
|
||||
version: 0.5*
|
||||
horizon:
|
||||
action_classes:
|
||||
install: devstack.components.horizon:HorizonInstaller
|
||||
running: devstack.components.horizon:HorizonRuntime
|
||||
uninstall: devstack.components.horizon:HorizonUninstaller
|
||||
install: anvil.components.horizon:HorizonInstaller
|
||||
running: anvil.components.horizon:HorizonRuntime
|
||||
uninstall: anvil.components.horizon:HorizonUninstaller
|
||||
packages:
|
||||
- name: apache2
|
||||
removable: true
|
||||
|
@ -298,9 +298,9 @@ components:
|
|||
version: 1.0.8
|
||||
keystone:
|
||||
action_classes:
|
||||
install: devstack.components.keystone:KeystoneInstaller
|
||||
running: devstack.components.keystone:KeystoneRuntime
|
||||
uninstall: devstack.components.keystone:KeystoneUninstaller
|
||||
install: anvil.components.keystone:KeystoneInstaller
|
||||
running: anvil.components.keystone:KeystoneRuntime
|
||||
uninstall: anvil.components.keystone:KeystoneUninstaller
|
||||
packages:
|
||||
- name: libldap2-dev
|
||||
removable: true
|
||||
|
@ -358,18 +358,18 @@ components:
|
|||
version: 1.0.8
|
||||
keystone-client:
|
||||
action_classes:
|
||||
install: devstack.components.keystone_client:KeyStoneClientInstaller
|
||||
running: devstack.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: devstack.components.keystone_client:KeyStoneClientUninstaller
|
||||
install: anvil.components.keystone_client:KeyStoneClientInstaller
|
||||
running: anvil.components.keystone_client:KeyStoneClientRuntime
|
||||
uninstall: anvil.components.keystone_client:KeyStoneClientUninstaller
|
||||
packages:
|
||||
- name: python-prettytable
|
||||
removable: true
|
||||
version: 0.5*
|
||||
melange:
|
||||
action_classes:
|
||||
install: devstack.components.melange:MelangeInstaller
|
||||
running: devstack.components.melange:MelangeRuntime
|
||||
uninstall: devstack.components.melange:MelangeUninstaller
|
||||
install: anvil.components.melange:MelangeInstaller
|
||||
running: anvil.components.melange:MelangeRuntime
|
||||
uninstall: anvil.components.melange:MelangeUninstaller
|
||||
packages:
|
||||
- name: python-eventlet
|
||||
removable: true
|
||||
|
@ -397,18 +397,18 @@ components:
|
|||
version: 1.0.8
|
||||
no-vnc:
|
||||
action_classes:
|
||||
install: devstack.components.novnc:NoVNCInstaller
|
||||
running: devstack.components.novnc:NoVNCRuntime
|
||||
uninstall: devstack.components.novnc:NoVNCUninstaller
|
||||
install: anvil.components.novnc:NoVNCInstaller
|
||||
running: anvil.components.novnc:NoVNCRuntime
|
||||
uninstall: anvil.components.novnc:NoVNCUninstaller
|
||||
packages:
|
||||
- name: python-numpy
|
||||
removable: true
|
||||
version: 1:1.6*
|
||||
nova:
|
||||
action_classes:
|
||||
install: devstack.components.nova:NovaInstaller
|
||||
running: devstack.components.nova:NovaRuntime
|
||||
uninstall: devstack.components.nova:NovaUninstaller
|
||||
install: anvil.components.nova:NovaInstaller
|
||||
running: anvil.components.nova:NovaRuntime
|
||||
uninstall: anvil.components.nova:NovaUninstaller
|
||||
packages:
|
||||
- name: dnsmasq-base
|
||||
removable: true
|
||||
|
@ -554,18 +554,18 @@ components:
|
|||
version: 1:1*
|
||||
nova-client:
|
||||
action_classes:
|
||||
install: devstack.components.nova_client:NovaClientInstaller
|
||||
running: devstack.components.nova_client:NovaClientRuntime
|
||||
uninstall: devstack.components.nova_client:NovaClientUninstaller
|
||||
install: anvil.components.nova_client:NovaClientInstaller
|
||||
running: anvil.components.nova_client:NovaClientRuntime
|
||||
uninstall: anvil.components.nova_client:NovaClientUninstaller
|
||||
packages:
|
||||
- name: python-prettytable
|
||||
removable: true
|
||||
version: 0.5*
|
||||
quantum:
|
||||
action_classes:
|
||||
install: devstack.components.quantum:QuantumInstaller
|
||||
running: devstack.components.quantum:QuantumRuntime
|
||||
uninstall: devstack.components.quantum:QuantumUninstaller
|
||||
install: anvil.components.quantum:QuantumInstaller
|
||||
running: anvil.components.quantum:QuantumRuntime
|
||||
uninstall: anvil.components.quantum:QuantumUninstaller
|
||||
packages:
|
||||
- name: python-eventlet
|
||||
removable: true
|
||||
|
@ -607,28 +607,28 @@ components:
|
|||
version: 0.7*
|
||||
quantum-client:
|
||||
action_classes:
|
||||
install: devstack.components.quantum_client:QuantumClientInstaller
|
||||
running: devstack.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: devstack.components.quantum_client:QuantumClientUninstaller
|
||||
install: anvil.components.quantum_client:QuantumClientInstaller
|
||||
running: anvil.components.quantum_client:QuantumClientRuntime
|
||||
uninstall: anvil.components.quantum_client:QuantumClientUninstaller
|
||||
packages:
|
||||
- name: python-gflags
|
||||
removable: true
|
||||
version: 1.5*
|
||||
rabbit-mq:
|
||||
action_classes:
|
||||
install: devstack.components.rabbit:RabbitInstaller
|
||||
running: devstack.components.rabbit:RabbitRuntime
|
||||
uninstall: devstack.components.rabbit:RabbitUninstaller
|
||||
install: anvil.components.rabbit:RabbitInstaller
|
||||
running: anvil.components.rabbit:RabbitRuntime
|
||||
uninstall: anvil.components.rabbit:RabbitUninstaller
|
||||
packages:
|
||||
- name: rabbitmq-server
|
||||
removable: true
|
||||
version: 2.7*
|
||||
packager_name: devstack.distros.oneiric:RabbitPackager
|
||||
packager_name: anvil.distros.oneiric:RabbitPackager
|
||||
swift:
|
||||
action_classes:
|
||||
install: devstack.components.swift:SwiftInstaller
|
||||
running: devstack.components.swift:SwiftRuntime
|
||||
uninstall: devstack.components.swift:SwiftUninstaller
|
||||
install: anvil.components.swift:SwiftInstaller
|
||||
running: anvil.components.swift:SwiftRuntime
|
||||
uninstall: anvil.components.swift:SwiftUninstaller
|
||||
packages:
|
||||
- name: memcached
|
||||
removable: true
|
||||
|
|
|
@ -49,7 +49,7 @@ project = u'DEVSTACKpy'
|
|||
# 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 devstack import version as devstack_version
|
||||
from anvil import version as devstack_version
|
||||
release = devstack_version.version_string()
|
||||
version = devstack_version.canonical_version_string()
|
||||
|
||||
|
|
95
run_tests.py
95
run_tests.py
|
@ -1,95 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
To run all tests
|
||||
python run_tests.py
|
||||
|
||||
To run a single test:
|
||||
python run_tests.py
|
||||
functional.test_extensions:TestExtensions.test_extensions_json
|
||||
|
||||
To run a single test module:
|
||||
python run_tests.py functional.test_extensions
|
||||
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(format='%(levelname)s: %(message)s')
|
||||
ROOT_LOGGER = logging.getLogger("")
|
||||
ROOT_LOGGER.setLevel(logging.WARNING)
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
# TODO!
|
||||
TESTS = []
|
||||
|
||||
|
||||
def parse_suite_filter():
|
||||
""" Parses out -O or --only argument and returns the value after it as the
|
||||
filter. Removes it from sys.argv in the process. """
|
||||
|
||||
suitefilter = None
|
||||
if '-O' in sys.argv or '--only' in sys.argv:
|
||||
for i in range(len(sys.argv)):
|
||||
if sys.argv[i] in ['-O', '--only']:
|
||||
if len(sys.argv) > i + 1:
|
||||
# Remove -O/--only settings from sys.argv
|
||||
sys.argv.pop(i)
|
||||
suitefilter = sys.argv.pop(i)
|
||||
break
|
||||
return suitefilter
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
SUITE_FILTER = parse_suite_filter()
|
||||
if SUITE_FILTER:
|
||||
TESTS = [t for t in TESTS if SUITE_FILTER in str(t)]
|
||||
if not TESTS:
|
||||
print 'No test configuration by the name %s found' % SUITE_FILTER
|
||||
sys.exit(2)
|
||||
#Run test suites
|
||||
if len(TESTS) > 1:
|
||||
CWD_DIRECTORY = os.getcwd()
|
||||
for test_num, test_cls in enumerate(TESTS):
|
||||
try:
|
||||
result = test_cls().run()
|
||||
if result:
|
||||
LOGGER.error("Run returned %s for test %s. Exiting" %
|
||||
(result, test_cls.__name__))
|
||||
sys.exit(result)
|
||||
except Exception, e:
|
||||
print "Error:", e
|
||||
LOGGER.exception(e)
|
||||
sys.exit(1)
|
||||
# Collect coverage from each run. They'll be combined later in .sh
|
||||
if '--with-coverage' in sys.argv:
|
||||
coverage_file = os.path.join(CWD_DIRECTORY, ".coverage")
|
||||
target_file = "%s.%s" % (coverage_file, test_cls.__name__)
|
||||
try:
|
||||
if os.path.exists(target_file):
|
||||
LOGGER.info("deleting %s" % target_file)
|
||||
os.unlink(target_file)
|
||||
if os.path.exists(coverage_file):
|
||||
LOGGER.info("Saving %s to %s" % (coverage_file,
|
||||
target_file))
|
||||
os.rename(coverage_file, target_file)
|
||||
except Exception, e:
|
||||
LOGGER.exception(e)
|
||||
print ("Failed to move coverage file while running test"
|
||||
": %s. Error reported was: %s" %
|
||||
(test_cls.__name__, e))
|
||||
sys.exit(1)
|
||||
else:
|
||||
for test_num, test_cls in enumerate(TESTS):
|
||||
try:
|
||||
result = test_cls().run()
|
||||
if result:
|
||||
LOGGER.error("Run returned %s for test %s. Exiting" %
|
||||
(result, test_cls.__name__))
|
||||
sys.exit(result)
|
||||
except Exception, e:
|
||||
print "Error:", e
|
||||
LOGGER.exception(e)
|
||||
sys.exit(1)
|
212
run_tests.sh
212
run_tests.sh
|
@ -1,212 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
function usage {
|
||||
echo "Usage: $0 [OPTION]..."
|
||||
echo "Run Devstacks's test suite(s)"
|
||||
echo ""
|
||||
echo " -O, --only test_suite Only run the specified test suite. Valid values are:"
|
||||
echo " Note: by default, run_tests will run all suites."
|
||||
echo " -V, --virtual-env Always use virtualenv. Install automatically if not present."
|
||||
echo " -N, --no-virtual-env Don't use virtualenv. Run tests in local environment."
|
||||
echo " -x, --stop Stop running tests after the first error or failure."
|
||||
echo " -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added."
|
||||
echo " Note: you might need to 'sudo' this since it pip installs into the virtual environment."
|
||||
echo " -P, --skip-pep8 Just run tests; skip pep8 check."
|
||||
echo " -p, --pep8 Just run pep8."
|
||||
echo " -l, --pylint Just run pylint."
|
||||
echo " -y, --yaml Just validate YAML."
|
||||
echo " -c, --with-coverage Generate coverage report."
|
||||
echo " -h, --help Print this usage message."
|
||||
echo " --hide-elapsed Don't print the elapsed time for each test along with slow test list."
|
||||
echo " --verbose Print additional logging."
|
||||
echo ""
|
||||
echo "Note: with no options specified, the script will try to run the tests in a virtual environment,"
|
||||
echo " If no virtualenv is found, the script will ask if you would like to create one. If you "
|
||||
echo " prefer to run tests NOT in a virtual environment, simply pass the -N option."
|
||||
echo ""
|
||||
echo "Note: with no options specified, the script will run the pep8 check after completing the tests."
|
||||
echo " If you prefer not to run pep8, simply pass the -P option."
|
||||
exit
|
||||
}
|
||||
|
||||
only_run_flag=0
|
||||
only_run=""
|
||||
function process_option {
|
||||
if [ $only_run_flag -eq 1 ]; then
|
||||
only_run_flag=0
|
||||
only_run=$1
|
||||
return
|
||||
else
|
||||
case "$1" in
|
||||
-h|--help) usage;;
|
||||
-V|--virtual-env) always_venv=1; never_venv=0;;
|
||||
-N|--no-virtual-env) always_venv=0; never_venv=1;;
|
||||
-O|--only) only_run_flag=1;;
|
||||
-f|--force) force=1;;
|
||||
-P|--skip-pep8) skip_pep8=1;;
|
||||
-p|--pep8) just_pep8=1;;
|
||||
-l|--pylint) just_pylint=1;;
|
||||
-y|--yaml) just_yaml=1;;
|
||||
-c|--with-coverage) coverage=1;;
|
||||
-*) addlopts="$addlopts $1";;
|
||||
*) addlargs="$addlargs $1"
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
venv=.venv
|
||||
with_venv=tools/with_venv.sh
|
||||
always_venv=0
|
||||
never_venv=0
|
||||
force=0
|
||||
addlargs=
|
||||
addlopts=
|
||||
wrapper=""
|
||||
just_pep8=0
|
||||
skip_pep8=0
|
||||
just_pylint=0
|
||||
just_yaml=0
|
||||
coverage=0
|
||||
pylintrc_fn="pylintrc"
|
||||
|
||||
for arg in "$@"; do
|
||||
process_option $arg
|
||||
done
|
||||
|
||||
# If enabled, tell nose/unittest to collect coverage data
|
||||
if [ $coverage -eq 1 ]; then
|
||||
addlopts="$addlopts --with-coverage --cover-package=devstack"
|
||||
fi
|
||||
|
||||
if [ "x$only_run" = "x" ]; then
|
||||
RUNTESTS="python run_tests.py$addlopts$addlargs"
|
||||
else
|
||||
RUNTESTS="python run_tests.py$addlopts$addlargs -O $only_run"
|
||||
fi
|
||||
|
||||
if [ $never_venv -eq 0 ]
|
||||
then
|
||||
# Remove the virtual environment if --force used
|
||||
if [ $force -eq 1 ]; then
|
||||
echo "Cleaning virtualenv..."
|
||||
rm -rf ${venv}
|
||||
fi
|
||||
if [ -e ${venv} ]; then
|
||||
wrapper="${with_venv}"
|
||||
else
|
||||
if [ $always_venv -eq 1 ]; then
|
||||
# Automatically install the virtualenv
|
||||
python tools/install_venv.py
|
||||
wrapper="${with_venv}"
|
||||
else
|
||||
echo -e "No virtual environment found...create one? (Y/n) \c"
|
||||
read use_ve
|
||||
if [ "x$use_ve" = "xY" -o "x$use_ve" = "x" -o "x$use_ve" = "xy" ]; then
|
||||
# Install the virtualenv and run the test suite in it
|
||||
python tools/install_venv.py
|
||||
wrapper=${with_venv}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
function run_tests {
|
||||
OFN="run_tests.log"
|
||||
# Just run the test suites in current environment
|
||||
${wrapper} $RUNTESTS 2>$OFN | tee $OFN
|
||||
# If we get some short import error right away, print the error log directly
|
||||
RESULT=$?
|
||||
echo "Check '$OFN' for a full error report."
|
||||
if [ "$RESULT" -ne "0" ];
|
||||
then
|
||||
ERRSIZE=`wc -l $OFN | awk '{print \$1}'`
|
||||
if [ "$ERRSIZE" -lt "40" ];
|
||||
then
|
||||
cat $OFN
|
||||
fi
|
||||
fi
|
||||
return $RESULT
|
||||
}
|
||||
|
||||
function run_pep8 {
|
||||
echo "Running pep8 ..."
|
||||
SRC_FILES=`find devstack -type f | grep "py\$"`
|
||||
SRC_FILES+=" stack run_tests.py"
|
||||
PEP_IGNORES="E202,E501"
|
||||
TEE_FN="pep8.log"
|
||||
PEP8_OPTS="--ignore=$PEP_IGNORES --repeat"
|
||||
pep8 ${PEP8_OPTS} ${SRC_FILES} 2>&1 | tee $TEE_FN
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "Sorry, cannot run pep8 ..."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully ran pep8 ..."
|
||||
echo "Check '$TEE_FN' for a full report."
|
||||
fi
|
||||
}
|
||||
|
||||
function run_pylint {
|
||||
echo "Running pylint ..."
|
||||
PYLINT_OPTIONS="--rcfile=$pylintrc_fn --output-format=parseable"
|
||||
PYLINT_INCLUDE=`find devstack -type f | grep "py\$"`
|
||||
PYLINT_INCLUDE+=" stack run_tests.py"
|
||||
TEE_FN="pylint.log"
|
||||
echo "Pylint messages count: "
|
||||
pylint ${PYLINT_OPTIONS} ${PYLINT_INCLUDE} 2>&1 | tee $TEE_FN | grep 'devstack/' | wc -l
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "Sorry, cannot run pylint ..."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully ran pylint ..."
|
||||
echo "Check '$TEE_FN' for a full report."
|
||||
fi
|
||||
}
|
||||
|
||||
function validate_yaml {
|
||||
echo "Validating YAML files..."
|
||||
for f in `find conf/ -name *.yaml -type f`; do
|
||||
echo "Checking yaml file: $f"
|
||||
tools/validate_yaml.py $f
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Delete old coverage data from previous runs
|
||||
if [ $coverage -eq 1 ]; then
|
||||
${wrapper} coverage erase
|
||||
fi
|
||||
|
||||
if [ $just_pep8 -eq 1 ]; then
|
||||
run_pep8
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $just_pylint -eq 1 ]; then
|
||||
run_pylint
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $just_yaml -eq 1 ]; then
|
||||
validate_yaml
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
echo "Running tests..."
|
||||
run_tests
|
||||
|
||||
if [ $skip_pep8 -eq 0 ]; then
|
||||
# Run the pep8 check
|
||||
run_pep8
|
||||
fi
|
||||
|
||||
# Since we run multiple test suites, we need to execute 'coverage combine'
|
||||
if [ $coverage -eq 1 ]; then
|
||||
echo "Generating coverage report in covhtml/"
|
||||
${wrapper} coverage combine
|
||||
${wrapper} coverage html -d covhtml -i
|
||||
${wrapper} coverage report --omit='/usr*,devstack/test*,.,setup.py,*egg*,/Library*,*.xml,*.tpl'
|
||||
fi
|
||||
|
|
@ -20,21 +20,21 @@ import sys
|
|||
import time
|
||||
import traceback as tb
|
||||
|
||||
from devstack import actions
|
||||
from devstack import cfg
|
||||
from devstack import cfg_helpers
|
||||
from devstack import colorizer
|
||||
from devstack import date
|
||||
from devstack import distro
|
||||
from devstack import env
|
||||
from devstack import env_rc
|
||||
from devstack import log as logging
|
||||
from devstack import opts
|
||||
from devstack import passwords
|
||||
from devstack import persona
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import actions
|
||||
from anvil import cfg
|
||||
from anvil import cfg_helpers
|
||||
from anvil import colorizer
|
||||
from anvil import date
|
||||
from anvil import distro
|
||||
from anvil import env
|
||||
from anvil import env_rc
|
||||
from anvil import log as logging
|
||||
from anvil import opts
|
||||
from anvil import passwords
|
||||
from anvil import persona
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -59,7 +59,7 @@ RC_FILES = [
|
|||
|
||||
def load_rc_files():
|
||||
"""
|
||||
Loads the desired set of rc files that stack will use to
|
||||
Loads the desired set of rc files that smithy will use to
|
||||
pre-populate its environment settings from.
|
||||
|
||||
Arguments: N/A
|
||||
|
@ -108,7 +108,7 @@ def setup_root(root_dir):
|
|||
|
||||
def find_config(args):
|
||||
"""
|
||||
Finds the stack configuration file.
|
||||
Finds the anvil configuration file.
|
||||
|
||||
Arguments:
|
||||
args: command line args
|
||||
|
@ -117,12 +117,12 @@ def find_config(args):
|
|||
|
||||
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("/etc", "anvil", "conf.ini"))
|
||||
locs.append(sh.joinpths(settings.STACK_CONFIG_DIR, "conf.ini"))
|
||||
for path in locs:
|
||||
LOG.debug("Looking for devstack configuration in: %r", path)
|
||||
LOG.debug("Looking for anvil configuration in: %r", path)
|
||||
if sh.isfile(path):
|
||||
LOG.debug("Found devstack configuration in: %r", path)
|
||||
LOG.debug("Found anvil configuration in: %r", path)
|
||||
return path
|
||||
return None
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
function usage {
|
||||
echo "Usage: $0 [OPTION]..."
|
||||
echo "Run anvils checking suite(s)"
|
||||
echo ""
|
||||
exit
|
||||
}
|
||||
|
||||
function run_pep8 {
|
||||
echo "Running pep8 ..."
|
||||
SRC_FILES=`find anvil -type f | grep "py\$"`
|
||||
SRC_FILES+=" smithy"
|
||||
PEP_IGNORES="E202,E501"
|
||||
TEE_FN="pep8.log"
|
||||
PEP8_OPTS="--ignore=$PEP_IGNORES --repeat"
|
||||
pep8 ${PEP8_OPTS} ${SRC_FILES} 2>&1 | tee $TEE_FN
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "Sorry, cannot run pep8 ..."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully ran pep8 ..."
|
||||
echo "Check '$TEE_FN' for a full report."
|
||||
fi
|
||||
}
|
||||
|
||||
function run_pylint {
|
||||
echo "Running pylint ..."
|
||||
PYLINT_OPTIONS="--rcfile=tests/pylintrc --output-format=parseable"
|
||||
PYLINT_INCLUDE=`find anvil -type f | grep "py\$"`
|
||||
PYLINT_INCLUDE+=" smithy"
|
||||
TEE_FN="pylint.log"
|
||||
echo "Pylint messages count: "
|
||||
pylint ${PYLINT_OPTIONS} ${PYLINT_INCLUDE} 2>&1 | tee $TEE_FN | grep 'anvil/' | wc -l
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "Sorry, cannot run pylint ..."
|
||||
exit 1
|
||||
else
|
||||
echo "Successfully ran pylint ..."
|
||||
echo "Check '$TEE_FN' for a full report."
|
||||
fi
|
||||
}
|
||||
|
||||
function validate_yaml {
|
||||
echo "Validating YAML files..."
|
||||
for f in `find conf/ -name *.yaml -type f`; do
|
||||
echo "Checking yaml file: $f"
|
||||
tools/validate-yaml.py $f
|
||||
done
|
||||
}
|
||||
|
||||
run_pep8
|
||||
run_pylint
|
||||
validate_yaml
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
import mox
|
||||
|
||||
from devstack.components import db
|
||||
from devstack import passwords
|
||||
|
||||
def test_fetch_dbdsn_full():
|
||||
cfg = ConfigParser()
|
||||
cfg.add_section('db')
|
||||
cfg.set('db', 'sql_user', 'sql_user')
|
||||
cfg.set('db', 'sql_host', 'sql_host')
|
||||
cfg.set('db', 'port', '55')
|
||||
cfg.set('db', 'type', 'mysql')
|
||||
cfg.add_section('passwords')
|
||||
cfg.set('passwords', 'sql', 'password')
|
||||
|
||||
dsn = db.fetch_dbdsn(cfg, passwords.PasswordGenerator(cfg, False))
|
||||
assert dsn == 'mysql://sql_user:password@sql_host:55/'
|
||||
|
||||
|
||||
def test_fetch_dbdsn_no_user():
|
||||
cfg = ConfigParser()
|
||||
cfg.add_section('db')
|
||||
cfg.set('db', 'sql_user', '')
|
||||
cfg.set('db', 'sql_host', 'sql_host')
|
||||
cfg.set('db', 'port', '55')
|
||||
cfg.set('db', 'type', 'mysql')
|
||||
cfg.add_section('passwords')
|
||||
cfg.set('passwords', 'sql', 'password')
|
||||
|
||||
dsn = db.fetch_dbdsn(cfg, passwords.PasswordGenerator(cfg, False))
|
||||
assert dsn == 'mysql://:password@sql_host:55/'
|
||||
|
||||
|
||||
def test_fetch_dbdsn_dbname():
|
||||
cfg = ConfigParser()
|
||||
cfg.add_section('db')
|
||||
cfg.set('db', 'sql_user', 'sql_user')
|
||||
cfg.set('db', 'sql_host', 'sql_host')
|
||||
cfg.set('db', 'port', '55')
|
||||
cfg.set('db', 'type', 'mysql')
|
||||
cfg.add_section('passwords')
|
||||
cfg.set('passwords', 'sql', 'password')
|
||||
|
||||
pw_gen = passwords.PasswordGenerator(cfg, False)
|
||||
dsn = db.fetch_dbdsn(cfg, pw_gen, 'dbname')
|
||||
assert dsn == 'mysql://sql_user:password@sql_host:55/dbname'
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
from devstack import distro
|
||||
|
||||
|
||||
def test_component_dependencies():
|
||||
d = distro.Distro('fake', 'ignore', 'apt', {},
|
||||
{'a': {'dependencies': ['b'],
|
||||
},
|
||||
'b': {},
|
||||
})
|
||||
actual = d.resolve_component_dependencies(['a'])
|
||||
assert actual == {'a': set(['b']),
|
||||
'b': set(),
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
from devstack import importer
|
||||
from devstack import distro
|
||||
|
||||
|
||||
def test_function():
|
||||
f = importer.import_entry_point('devstack.importer:import_entry_point')
|
||||
assert f == importer.import_entry_point
|
||||
|
||||
|
||||
def test_class():
|
||||
c = importer.import_entry_point('devstack.distro:Distro')
|
||||
assert c == distro.Distro
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
from devstack import passwords
|
||||
|
||||
|
||||
def test_generate_random():
|
||||
def check_one(i):
|
||||
p = passwords.generate_random(i)
|
||||
assert len(p) == i
|
||||
for i in range(1, 9):
|
||||
yield check_one, i
|
|
@ -1,132 +0,0 @@
|
|||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Copyright 2010 United States Government as represented by the
|
||||
# Administrator of the National Aeronautics and Space Administration.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Copyright 2010 OpenStack LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Installation script for DevstackPy's development virtualenv
|
||||
"""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||
VENV = os.path.join(ROOT, '.venv')
|
||||
PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
|
||||
|
||||
|
||||
def die(message, *args):
|
||||
print >> sys.stderr, message % args
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def run_command(cmd, redirect_output=True, check_exit_code=True):
|
||||
"""
|
||||
Runs a command in an out-of-process shell, returning the
|
||||
output of that command. Working directory is ROOT.
|
||||
"""
|
||||
if redirect_output:
|
||||
stdout = subprocess.PIPE
|
||||
else:
|
||||
stdout = None
|
||||
|
||||
proc = subprocess.Popen(cmd, cwd=ROOT, stdout=stdout)
|
||||
output = proc.communicate()[0]
|
||||
if check_exit_code and proc.returncode != 0:
|
||||
die('Command "%s" failed.\n%s', ' '.join(cmd), output)
|
||||
return output
|
||||
|
||||
|
||||
HAS_EASY_INSTALL = bool(run_command(['which', 'easy_install'],
|
||||
check_exit_code=False).strip())
|
||||
HAS_VIRTUALENV = bool(run_command(['which', 'virtualenv'],
|
||||
check_exit_code=False).strip())
|
||||
|
||||
|
||||
def check_dependencies():
|
||||
"""Make sure virtualenv is in the path."""
|
||||
|
||||
if not HAS_VIRTUALENV:
|
||||
print 'not found.'
|
||||
# Try installing it via easy_install...
|
||||
if HAS_EASY_INSTALL:
|
||||
print 'Installing virtualenv via easy_install...',
|
||||
if not run_command(['which', 'easy_install']):
|
||||
die('ERROR: virtualenv not found.\n\n'
|
||||
'DevstackPy development requires virtualenv, please install'
|
||||
' it using your favorite package management tool')
|
||||
print 'done.'
|
||||
print 'done.'
|
||||
|
||||
|
||||
def create_virtualenv(venv=VENV):
|
||||
"""
|
||||
Creates the virtual environment and installs PIP only into the
|
||||
virtual environment
|
||||
"""
|
||||
print 'Creating venv...',
|
||||
run_command(['virtualenv', '-q', '--no-site-packages', VENV])
|
||||
print 'done.'
|
||||
print 'Installing pip in virtualenv...',
|
||||
if not run_command(['tools/with_venv.sh', 'easy_install',
|
||||
'pip>1.0']).strip():
|
||||
die("Failed to install pip.")
|
||||
print 'done.'
|
||||
|
||||
|
||||
def install_dependencies(venv=VENV):
|
||||
print 'Installing dependencies with pip (this can take a while)...'
|
||||
|
||||
# Install greenlet by hand - just listing it in the requires file does not
|
||||
# get it in stalled in the right order
|
||||
venv_tool = 'tools/with_venv.sh'
|
||||
run_command([venv_tool, 'pip', 'install', '-E', venv, '-r', PIP_REQUIRES],
|
||||
redirect_output=False)
|
||||
|
||||
|
||||
def print_help():
|
||||
help = """
|
||||
Devstack development environment setup is complete.
|
||||
|
||||
Devstack development uses virtualenv to track and manage Python dependencies
|
||||
while in development and testing.
|
||||
|
||||
To activate the Devstack virtualenv for the extent of your current shell
|
||||
session you can run:
|
||||
|
||||
$ source .venv/bin/activate
|
||||
|
||||
Or, if you prefer, you can run commands in the virtualenv on a case by case
|
||||
basis by running:
|
||||
|
||||
$ tools/with_venv.sh <your command>
|
||||
|
||||
"""
|
||||
print help
|
||||
|
||||
|
||||
def main(argv):
|
||||
check_dependencies()
|
||||
create_virtualenv()
|
||||
install_dependencies()
|
||||
print_help()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
|
@ -1,16 +0,0 @@
|
|||
# NOTE: You may need to install additional binary packages prior to using 'pip install'
|
||||
# See the Contributor Documentation for more information
|
||||
|
||||
# Development
|
||||
netifaces
|
||||
termcolor
|
||||
pyyaml # reading data files
|
||||
progressbar
|
||||
|
||||
# Testing
|
||||
nose # for test discovery and console feedback
|
||||
unittest2 # backport of unittest lib in python 2.7
|
||||
pylint # static code analysis
|
||||
pep8 # checks for PEP8 code style compliance
|
||||
mox # mock object framework
|
||||
coverage # computes code coverage percentages
|
|
@ -12,8 +12,8 @@ if os.path.exists(os.path.join(possible_topdir,
|
|||
'__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
from devstack import log
|
||||
from devstack import utils
|
||||
from anvil import log
|
||||
from anvil import utils
|
||||
|
||||
|
||||
class CustomDumper(yaml.SafeDumper):
|
||||
|
|
|
@ -13,16 +13,16 @@ if os.path.exists(os.path.join(possible_topdir,
|
|||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
||||
from devstack import cfg
|
||||
from devstack import log as logging
|
||||
from devstack import passwords
|
||||
from devstack import settings
|
||||
from devstack import shell as sh
|
||||
from devstack import utils
|
||||
from anvil import cfg
|
||||
from anvil import log as logging
|
||||
from anvil import passwords
|
||||
from anvil import settings
|
||||
from anvil import shell as sh
|
||||
from anvil import utils
|
||||
|
||||
from devstack.components import keystone
|
||||
from devstack.components import glance
|
||||
from devstack.image import uploader
|
||||
from anvil.components import keystone
|
||||
from anvil.components import glance
|
||||
from anvil.image import uploader
|
||||
|
||||
|
||||
def find_config():
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
TOOLS=`dirname $0`
|
||||
VENV=$TOOLS/../.venv
|
||||
source $VENV/bin/activate && $@
|
Loading…
Reference in New Issue