eho -> savanna
This commit is contained in:
parent
c41c7e5ad4
commit
e23d985387
@ -27,8 +27,8 @@ attr-rgx=[a-z_][a-z0-9_]{1,30}$
|
||||
# Method names shold be at least 3 characters long and be lowercased with underscores
|
||||
method-rgx=([a-z_][a-z0-9_]{1,30}|setUp|tearDown)$
|
||||
|
||||
# Module names matching eho-* are ok (files in bin/)
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(eho-[a-z0-9_-]+))$
|
||||
# Module names matching savanna-* are ok (files in bin/)
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(savanna-[a-z0-9_-]+))$
|
||||
|
||||
# Don't require docstrings on tests.
|
||||
no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$
|
||||
|
@ -1,5 +1,5 @@
|
||||
Elastic Hadoop on OpenStack
|
||||
===========================
|
||||
Savanna project
|
||||
===============
|
||||
|
||||
QuickStart (Ubuntu)
|
||||
----------
|
||||
@ -27,9 +27,9 @@ QuickStart (Ubuntu)
|
||||
::
|
||||
tools/run_tests
|
||||
|
||||
7. Run EHO REST API with stub data and cluster ops on port 8080
|
||||
7. Run Savanna REST API with stub data and cluster ops on port 8080
|
||||
::
|
||||
.venv/bin/python bin/eho-api --reset-db --stub-data --allow-cluster-ops
|
||||
.venv/bin/python bin/savanna-api --reset-db --stub-data --allow-cluster-ops
|
||||
|
||||
|
||||
Pip speedup
|
||||
|
@ -20,16 +20,16 @@ import eventlet
|
||||
from oslo.config.cfg import CONF
|
||||
|
||||
import sys
|
||||
from eho import config
|
||||
import eho.main as server
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna import config
|
||||
import savanna.main as server
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def main():
|
||||
config.parse_args(sys.argv[1:])
|
||||
logging.setup("eho")
|
||||
logging.setup("savanna")
|
||||
|
||||
app = server.make_app()
|
||||
|
@ -23,7 +23,7 @@ import os
|
||||
# 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('.'))
|
||||
sys.path.insert(0, os.path.abspath('../../eho'))
|
||||
sys.path.insert(0, os.path.abspath('../../savanna'))
|
||||
sys.path.append(os.path.abspath('..'))
|
||||
sys.path.append(os.path.abspath('../bin'))
|
||||
|
||||
@ -50,7 +50,7 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Elastic Hadoop on OpenStack'
|
||||
project = u'Savanna'
|
||||
copyright = u'2013, Mirantis Inc.'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@ -175,7 +175,7 @@ html_static_path = ['_static']
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'EHODoc'
|
||||
htmlhelp_basename = 'SavannaDoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
@ -194,7 +194,7 @@ latex_elements = {
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'ehodoc.tex', u'Elastic Hadoop on OpenStack Documentation',
|
||||
('index', 'savannadoc.tex', u'Savanna',
|
||||
u'Mirantis Inc.', 'manual'),
|
||||
]
|
||||
|
||||
@ -224,7 +224,7 @@ latex_documents = [
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'eho', u'Elastic Hadoop on OpenStack Documentation',
|
||||
('index', 'savanna', u'Savanna',
|
||||
[u'Mirantis Inc.'], 1)
|
||||
]
|
||||
|
||||
@ -238,8 +238,8 @@ man_pages = [
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'EHO', u'Elastic Hadoop on OpenStack Documentation',
|
||||
u'Mirantis Inc.', 'EHO', 'Elastic Hadoop on OpenStack',
|
||||
('index', 'Savanna', u'Savanna',
|
||||
u'Mirantis Inc.', 'Savanna', 'Savanna',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
@ -30,4 +30,4 @@
|
||||
[sqlalchemy]
|
||||
|
||||
# URL for sqlalchemy database (string value)
|
||||
#database_uri=sqlite:////tmp/eho-server.db
|
||||
#database_uri=sqlite:////tmp/savanna-server.db
|
@ -1,7 +1,7 @@
|
||||
[DEFAULT]
|
||||
|
||||
#
|
||||
# Options defined in eho.config
|
||||
# Options defined in savanna.config
|
||||
#
|
||||
|
||||
# set host (string value)
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
|
||||
#
|
||||
# Options defined in eho.main
|
||||
# Options defined in savanna.main
|
||||
#
|
||||
|
||||
# Protocol used to access OpenStack Identity service (string
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
#
|
||||
# Options defined in eho.openstack.common.log
|
||||
# Options defined in savanna.openstack.common.log
|
||||
#
|
||||
|
||||
# Print debugging output (set logging level to DEBUG instead
|
||||
@ -140,7 +140,7 @@
|
||||
|
||||
|
||||
#
|
||||
# Options defined in eho.openstack.common.notifier.api
|
||||
# Options defined in savanna.openstack.common.notifier.api
|
||||
#
|
||||
|
||||
# Driver or drivers to handle sending notifications (multi
|
||||
@ -159,7 +159,7 @@
|
||||
[cluster_node]
|
||||
|
||||
#
|
||||
# Options defined in eho.service.cluster_ops
|
||||
# Options defined in savanna.service.cluster_ops
|
||||
#
|
||||
|
||||
# An existing user on Hadoop image (string value)
|
||||
@ -172,11 +172,11 @@
|
||||
[sqlalchemy]
|
||||
|
||||
#
|
||||
# Options defined in eho.main
|
||||
# Options defined in savanna.main
|
||||
#
|
||||
|
||||
# URL for sqlalchemy database (string value)
|
||||
#database_uri=sqlite:////tmp/eho-server.db
|
||||
#database_uri=sqlite:////tmp/savanna-server.db
|
||||
|
||||
# Sqlalchemy echo (boolean value)
|
||||
#echo=false
|
@ -1,6 +1,6 @@
|
||||
[DEFAULT]
|
||||
modules=setup, jsonutils, xmlutils, timeutils, exception, gettextutils, log, local, notifier/api, notifier/log_notifier, notifier/no_op_notifier, notifier/test_notifier, notifier/__init__, importutils, context
|
||||
base=eho
|
||||
base=savanna
|
||||
|
||||
# The following code from 'wsgi' is needed:
|
||||
#
|
||||
@ -8,11 +8,11 @@ base=eho
|
||||
# from xml.dom import minidom
|
||||
# from xml.parsers import expat
|
||||
#
|
||||
# from eho.openstack.common import exception
|
||||
# from eho.openstack.common.gettextutils import _
|
||||
# from eho.openstack.common import jsonutils
|
||||
# from eho.openstack.common import log as logging
|
||||
# from eho.openstack.common import xmlutils
|
||||
# from savanna.openstack.common import exception
|
||||
# from savanna.openstack.common.gettextutils import _
|
||||
# from savanna.openstack.common import jsonutils
|
||||
# from savanna.openstack.common import log as logging
|
||||
# from savanna.openstack.common import xmlutils
|
||||
#
|
||||
# LOG = logging.getLogger(__name__)
|
||||
#
|
||||
|
@ -3,7 +3,7 @@
|
||||
echo "----- Setting up Hadoop configs"
|
||||
|
||||
{% for filename in configfiles -%}
|
||||
cat {{filename}}.eho_template |
|
||||
cat {{filename}}.savanna_template |
|
||||
{%- for item in configs -%}
|
||||
sed -e "s/{{item[0]}}/{{item[1]}}/g" |
|
||||
{%- endfor -%}
|
||||
|
@ -13,10 +13,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from eho.service import api
|
||||
from savanna.service import api
|
||||
|
||||
from eho.utils.api import Rest, render, abort_and_log, request_data
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.utils.api import Rest, render, abort_and_log, request_data
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -37,4 +37,4 @@ CONF.register_cli_opts(cli_opts)
|
||||
|
||||
|
||||
def parse_args(argv):
|
||||
CONF(argv, project='eho')
|
||||
CONF(argv, project='savanna')
|
@ -19,15 +19,15 @@ from keystoneclient.middleware.auth_token import filter_factory as auth_token
|
||||
from oslo.config import cfg
|
||||
from werkzeug.exceptions import default_exceptions
|
||||
from werkzeug.exceptions import HTTPException
|
||||
from eho.api import v02 as api_v02
|
||||
from savanna.api import v02 as api_v02
|
||||
|
||||
from eho.middleware.auth_valid import filter_factory as auth_valid
|
||||
from eho.utils.scheduler import setup_scheduler
|
||||
from eho.storage.defaults import setup_defaults
|
||||
from eho.utils.api import render
|
||||
from eho.storage.storage import setup_storage
|
||||
from savanna.middleware.auth_valid import filter_factory as auth_valid
|
||||
from savanna.utils.scheduler import setup_scheduler
|
||||
from savanna.storage.defaults import setup_defaults
|
||||
from savanna.utils.api import render
|
||||
from savanna.storage.storage import setup_storage
|
||||
|
||||
from eho.openstack.common import log
|
||||
from savanna.openstack.common import log
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
@ -62,7 +62,7 @@ opts = [
|
||||
|
||||
sqlalchemy_opts = [
|
||||
cfg.StrOpt('database_uri',
|
||||
default='sqlite:////tmp/eho-server.db',
|
||||
default='sqlite:////tmp/savanna-server.db',
|
||||
help='URL for sqlalchemy database'),
|
||||
cfg.BoolOpt('echo',
|
||||
default=False,
|
||||
@ -72,14 +72,14 @@ sqlalchemy_opts = [
|
||||
CONF = cfg.CONF
|
||||
CONF.register_opts(opts)
|
||||
CONF.register_opts(sqlalchemy_opts, group='sqlalchemy')
|
||||
CONF.import_opt('log_level', 'eho.config')
|
||||
CONF.import_opt('log_level', 'savanna.config')
|
||||
|
||||
|
||||
def make_app():
|
||||
"""
|
||||
Entry point for Elastic Hadoop on OpenStack REST API server
|
||||
Entry point for Savanna REST API server
|
||||
"""
|
||||
app = Flask('eho.api')
|
||||
app = Flask('savanna.api')
|
||||
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = CONF.sqlalchemy.database_uri
|
||||
app.config['SQLALCHEMY_ECHO'] = CONF.sqlalchemy.echo
|
@ -15,8 +15,8 @@
|
||||
|
||||
from webob.exc import HTTPServiceUnavailable, HTTPNotFound, HTTPUnauthorized
|
||||
|
||||
from eho.openstack.commons import split_path
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.openstack.commons import split_path
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -21,7 +21,7 @@ Exceptions common to OpenStack projects
|
||||
|
||||
import logging
|
||||
|
||||
from eho.openstack.common.gettextutils import _
|
||||
from savanna.openstack.common.gettextutils import _
|
||||
|
||||
_FATAL_EXCEPTION_FORMAT_ERRORS = False
|
||||
|
@ -20,7 +20,7 @@ gettext for openstack-common modules.
|
||||
|
||||
Usual usage in an openstack.common module:
|
||||
|
||||
from eho.openstack.common.gettextutils import _
|
||||
from savanna.openstack.common.gettextutils import _
|
||||
"""
|
||||
|
||||
import gettext
|
@ -40,7 +40,7 @@ import itertools
|
||||
import json
|
||||
import xmlrpclib
|
||||
|
||||
from eho.openstack.common import timeutils
|
||||
from savanna.openstack.common import timeutils
|
||||
|
||||
|
||||
def to_primitive(value, convert_instances=False, convert_datetime=True,
|
@ -42,10 +42,10 @@ import traceback
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from eho.openstack.common.gettextutils import _
|
||||
from eho.openstack.common import jsonutils
|
||||
from eho.openstack.common import local
|
||||
from eho.openstack.common import notifier
|
||||
from savanna.openstack.common.gettextutils import _
|
||||
from savanna.openstack.common import jsonutils
|
||||
from savanna.openstack.common import local
|
||||
from savanna.openstack.common import notifier
|
||||
|
||||
|
||||
_DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s"
|
||||
@ -305,7 +305,7 @@ class JSONFormatter(logging.Formatter):
|
||||
|
||||
class PublishErrorsHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
if ('eho.openstack.common.notifier.log_notifier' in
|
||||
if ('savanna.openstack.common.notifier.log_notifier' in
|
||||
CONF.notification_driver):
|
||||
return
|
||||
notifier.api.notify(None, 'error.publisher',
|
@ -17,12 +17,12 @@ import uuid
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from eho.openstack.common import context
|
||||
from eho.openstack.common.gettextutils import _
|
||||
from eho.openstack.common import importutils
|
||||
from eho.openstack.common import jsonutils
|
||||
from eho.openstack.common import log as logging
|
||||
from eho.openstack.common import timeutils
|
||||
from savanna.openstack.common import context
|
||||
from savanna.openstack.common.gettextutils import _
|
||||
from savanna.openstack.common import importutils
|
||||
from savanna.openstack.common import jsonutils
|
||||
from savanna.openstack.common import log as logging
|
||||
from savanna.openstack.common import timeutils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
@ -15,8 +15,8 @@
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from eho.openstack.common import jsonutils
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.openstack.common import jsonutils
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
@ -30,6 +30,6 @@ def notify(_context, message):
|
||||
CONF.default_notification_level)
|
||||
priority = priority.lower()
|
||||
logger = logging.getLogger(
|
||||
'eho.openstack.common.notification.%s' %
|
||||
'savanna.openstack.common.notification.%s' %
|
||||
message['event_type'])
|
||||
getattr(logger, priority)(jsonutils.dumps(message))
|
@ -24,11 +24,11 @@ import datetime
|
||||
from xml.dom import minidom
|
||||
from xml.parsers import expat
|
||||
|
||||
from eho.openstack.common import exception
|
||||
from eho.openstack.common.gettextutils import _
|
||||
from eho.openstack.common import jsonutils
|
||||
from eho.openstack.common import log as logging
|
||||
from eho.openstack.common import xmlutils
|
||||
from savanna.openstack.common import exception
|
||||
from savanna.openstack.common.gettextutils import _
|
||||
from savanna.openstack.common import jsonutils
|
||||
from savanna.openstack.common import log as logging
|
||||
from savanna.openstack.common import xmlutils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -17,17 +17,17 @@ import eventlet
|
||||
from oslo.config import cfg
|
||||
from flask import request
|
||||
|
||||
from eho.storage.models import NodeTemplate, NodeType, NodeProcess, \
|
||||
from savanna.storage.models import NodeTemplate, NodeType, NodeProcess, \
|
||||
NodeTemplateConfig, Cluster, ClusterNodeCount
|
||||
from eho.storage.storage import DB
|
||||
from eho.utils.api import abort_and_log
|
||||
from eho.service import cluster_ops
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.storage.storage import DB
|
||||
from savanna.utils.api import abort_and_log
|
||||
from savanna.service import cluster_ops
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('allow_cluster_ops', 'eho.config')
|
||||
CONF.import_opt('allow_cluster_ops', 'savanna.config')
|
||||
|
||||
|
||||
def _clean_nones(obj):
|
@ -13,16 +13,17 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import time
|
||||
|
||||
from jinja2 import Environment
|
||||
from jinja2 import PackageLoader
|
||||
from paramiko import SSHClient, AutoAddPolicy
|
||||
from oslo.config import cfg
|
||||
from savanna.storage.models import Node, ServiceUrl
|
||||
from savanna.storage.storage import DB
|
||||
from savanna.utils.openstack.nova import novaclient
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
import time
|
||||
from eho.storage.models import Node, ServiceUrl
|
||||
from eho.storage.storage import DB
|
||||
from eho.utils.openstack.nova import novaclient
|
||||
from eho.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -38,7 +39,7 @@ cluster_node_opts = [
|
||||
]
|
||||
|
||||
CONF.register_opts(cluster_node_opts, 'cluster_node')
|
||||
#CONF.import_opt('nova_internal_net_name', 'eho.main')
|
||||
#CONF.import_opt('nova_internal_net_name', 'savanna.main')
|
||||
|
||||
|
||||
def _find_by_id(lst, id):
|
||||
@ -205,7 +206,7 @@ def _check_if_up(nova, node):
|
||||
|
||||
|
||||
def _render_template(template_name, **kwargs):
|
||||
env = Environment(loader=PackageLoader('eho', '..'))
|
||||
env = Environment(loader=PackageLoader('savanna', '..'))
|
||||
templ = env.get_template('resources/%s.template' % template_name)
|
||||
return templ.render(**kwargs)
|
||||
|
||||
@ -253,13 +254,14 @@ def _setup_node(node, clmap):
|
||||
try:
|
||||
_setup_ssh_connection(node['ip'], ssh)
|
||||
sftp = ssh.open_sftp()
|
||||
fl = sftp.file('/tmp/eho-hadoop-init.sh', 'w')
|
||||
fl = sftp.file('/tmp/savanna-hadoop-init.sh', 'w')
|
||||
fl.write(script_body)
|
||||
fl.close()
|
||||
sftp.chmod('/tmp/eho-hadoop-init.sh', 0500)
|
||||
sftp.chmod('/tmp/savanna-hadoop-init.sh', 0500)
|
||||
|
||||
ret = _open_channel_and_execute(ssh, '/tmp/eho-hadoop-init.sh '
|
||||
'>>/tmp/eho-hadoop-init.log 2>&1')
|
||||
ret = _open_channel_and_execute(ssh,
|
||||
'/tmp/savanna-hadoop-init.sh '
|
||||
'>> /tmp/savanna-hadoop-init.log 2>&1')
|
||||
_ensure_zero(ret)
|
||||
finally:
|
||||
ssh.close()
|
@ -15,16 +15,16 @@
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from eho.storage.models import NodeProcess, NodeProcessProperty, \
|
||||
from savanna.storage.models import NodeProcess, NodeProcessProperty, \
|
||||
NodeType, NodeTemplate, NodeTemplateConfig, Cluster, ClusterNodeCount
|
||||
from eho.storage.storage import DB
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.storage.storage import DB
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('reset_db', 'eho.config')
|
||||
CONF.import_opt('stub_data', 'eho.config')
|
||||
CONF.import_opt('reset_db', 'savanna.config')
|
||||
CONF.import_opt('stub_data', 'savanna.config')
|
||||
|
||||
|
||||
def create_node_process(name, properties):
|
@ -15,7 +15,7 @@
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
from eho.storage.storage import DB
|
||||
from savanna.storage.storage import DB
|
||||
|
||||
|
||||
class NodeTemplate(DB.Model):
|
@ -19,7 +19,7 @@ from oslo.config import cfg
|
||||
DB = SQLAlchemy()
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('reset_db', 'eho.config')
|
||||
CONF.import_opt('reset_db', 'savanna.config')
|
||||
|
||||
|
||||
def setup_storage(app):
|
@ -22,13 +22,13 @@ import os
|
||||
import eventlet
|
||||
from oslo.config import cfg
|
||||
|
||||
from eho.main import make_app
|
||||
from eho.service import api
|
||||
from eho.storage.models import Node, NodeTemplate
|
||||
from eho.storage.storage import DB
|
||||
import eho.main
|
||||
from eho.utils import scheduler
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.main import make_app
|
||||
from savanna.service import api
|
||||
from savanna.storage.models import Node, NodeTemplate
|
||||
from savanna.storage.storage import DB
|
||||
import savanna.main
|
||||
from savanna.utils import scheduler
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -82,12 +82,12 @@ def _stub_auth_valid(*args, **kwargs):
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('reset_db', 'eho.config')
|
||||
CONF.import_opt('stub_data', 'eho.config')
|
||||
CONF.import_opt('log_level', 'eho.config')
|
||||
CONF.import_opt('allow_cluster_ops', 'eho.config')
|
||||
CONF.import_opt('database_uri', 'eho.main', group='sqlalchemy')
|
||||
CONF.import_opt('echo', 'eho.main', group='sqlalchemy')
|
||||
CONF.import_opt('reset_db', 'savanna.config')
|
||||
CONF.import_opt('stub_data', 'savanna.config')
|
||||
CONF.import_opt('log_level', 'savanna.config')
|
||||
CONF.import_opt('allow_cluster_ops', 'savanna.config')
|
||||
CONF.import_opt('database_uri', 'savanna.main', group='sqlalchemy')
|
||||
CONF.import_opt('echo', 'savanna.main', group='sqlalchemy')
|
||||
|
||||
|
||||
class TestApi(unittest.TestCase):
|
||||
@ -105,14 +105,14 @@ class TestApi(unittest.TestCase):
|
||||
CONF.set_override('echo', False, group='sqlalchemy')
|
||||
|
||||
# store functions that will be stubbed
|
||||
self._prev_auth_token = eho.main.auth_token
|
||||
self._prev_auth_valid = eho.main.auth_valid
|
||||
self._prev_auth_token = savanna.main.auth_token
|
||||
self._prev_auth_valid = savanna.main.auth_valid
|
||||
self._prev_cluster_launch = api.cluster_ops.launch_cluster
|
||||
self._prev_cluster_stop = api.cluster_ops.stop_cluster
|
||||
|
||||
# stub functions
|
||||
eho.main.auth_token = _stub_auth_token
|
||||
eho.main.auth_valid = _stub_auth_valid
|
||||
savanna.main.auth_token = _stub_auth_token
|
||||
savanna.main.auth_valid = _stub_auth_valid
|
||||
api.cluster_ops.launch_cluster = _stub_launch_cluster
|
||||
api.cluster_ops.stop_cluster = _stub_stop_cluster
|
||||
|
||||
@ -125,8 +125,8 @@ class TestApi(unittest.TestCase):
|
||||
|
||||
def tearDown(self):
|
||||
# unstub functions
|
||||
eho.main.auth_token = self._prev_auth_token
|
||||
eho.main.auth_valid = self._prev_auth_valid
|
||||
savanna.main.auth_token = self._prev_auth_token
|
||||
savanna.main.auth_valid = self._prev_auth_valid
|
||||
api.cluster_ops.launch_cluster = self._prev_cluster_launch
|
||||
api.cluster_ops.stop_cluster = self._prev_cluster_stop
|
||||
|
@ -19,9 +19,9 @@ import traceback
|
||||
from flask import abort, request, Blueprint, Response
|
||||
from werkzeug.datastructures import MIMEAccept
|
||||
|
||||
from eho.openstack.common.wsgi import JSONDictSerializer, XMLDictSerializer, \
|
||||
JSONDeserializer
|
||||
from eho.openstack.common import log as logging
|
||||
from savanna.openstack.common.wsgi import JSONDictSerializer, \
|
||||
XMLDictSerializer, JSONDeserializer
|
||||
from savanna.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
@ -17,7 +17,7 @@ import logging
|
||||
|
||||
from novaclient.v1_1 import client as nova_client
|
||||
|
||||
from eho.utils.openstack.base import url_for
|
||||
from savanna.utils.openstack.base import url_for
|
||||
|
||||
|
||||
def novaclient(headers):
|
12
setup.py
12
setup.py
@ -1,18 +1,18 @@
|
||||
import setuptools
|
||||
|
||||
from eho.openstack.common import setup as common_setup
|
||||
from savanna.openstack.common import setup as common_setup
|
||||
|
||||
requires = common_setup.parse_requirements()
|
||||
depend_links = common_setup.parse_dependency_links()
|
||||
project = 'eho'
|
||||
project = 'savanna'
|
||||
|
||||
setuptools.setup(
|
||||
name=project,
|
||||
version=common_setup.get_version(project, '0.1'),
|
||||
description='elastic hadoop on openstack',
|
||||
description='Savanna project',
|
||||
author='Mirantis Inc.',
|
||||
author_email='elastic-hadoop-all@mirantis.com',
|
||||
url='http://eho.mirantis.com',
|
||||
author_email='savanna@mirantis.com',
|
||||
url='http://savanna.mirantis.com',
|
||||
classifiers=[
|
||||
'Environment :: OpenStack',
|
||||
'Intended Audience :: Information Technology',
|
||||
@ -30,6 +30,6 @@ setuptools.setup(
|
||||
include_package_data=True,
|
||||
test_suite='nose.collector',
|
||||
setup_requires=['setuptools_git>=0.4'],
|
||||
scripts=['bin/eho-api'],
|
||||
scripts=['bin/savanna-api'],
|
||||
py_modules=[]
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
This generate_sample.sh tool is used to generate etc/eho/eho.conf.sample-full
|
||||
This generate_sample.sh tool is used to generate etc/savanna/savanna.conf.sample-full
|
||||
|
||||
Run it from the top-level working directory i.e.
|
||||
|
||||
|
@ -217,7 +217,7 @@ def _sanitize_default(s):
|
||||
elif s == _get_my_ip():
|
||||
return '10.0.0.1'
|
||||
elif s == socket.getfqdn():
|
||||
return 'eho'
|
||||
return 'savanna'
|
||||
elif s.strip() != s:
|
||||
return '"%s"' % s
|
||||
return s
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
# stolen from the OpenStack Nova
|
||||
|
||||
FILES=$(find eho -type f -name "*.py" ! -path "eho/tests/*" -exec \
|
||||
FILES=$(find savanna -type f -name "*.py" ! -path "savanna/tests/*" -exec \
|
||||
grep -l "Opt(" {} \; | sort -u)
|
||||
BINS=$(echo bin/eho-*)
|
||||
BINS=$(echo bin/savanna-*)
|
||||
|
||||
PYTHONPATH=./:${PYTHONPATH} \
|
||||
tools/with_venv python $(dirname "$0")/extract_opts.py ${FILES} ${BINS} > \
|
||||
etc/eho/eho.conf.sample-full
|
||||
etc/savanna/savanna.conf.sample-full
|
||||
|
||||
# Remove compiled files created by imp.import_source()
|
||||
for bin in ${BINS}; do
|
||||
|
@ -13,9 +13,9 @@ cli_opts = [
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('os_admin_username', 'eho.main')
|
||||
CONF.import_opt('os_admin_password', 'eho.main')
|
||||
CONF.import_opt('os_admin_tenant_name', 'eho.main')
|
||||
CONF.import_opt('os_admin_username', 'savanna.main')
|
||||
CONF.import_opt('os_admin_password', 'savanna.main')
|
||||
CONF.import_opt('os_admin_tenant_name', 'savanna.main')
|
||||
CONF.register_cli_opts(cli_opts)
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ def install_dependencies(venv=VENV):
|
||||
# Tell the virtual env how to "import app"
|
||||
py_ver = _detect_python_version(venv)
|
||||
pthfile = os.path.join(venv, "lib", py_ver,
|
||||
"site-packages", "eho.pth")
|
||||
"site-packages", "savanna.pth")
|
||||
f = open(pthfile, 'w')
|
||||
f.write("%s\n" % ROOT)
|
||||
|
||||
|
@ -3,4 +3,4 @@
|
||||
echo "Running coverage"
|
||||
echo "================"
|
||||
|
||||
.venv/bin/python tools/run_tests.py --with-coverage --cover-package=eho --with-xunit $@
|
||||
.venv/bin/python tools/run_tests.py --with-coverage --cover-package=savanna --with-xunit $@
|
||||
|
@ -3,4 +3,4 @@
|
||||
echo "Running PEP8 checks"
|
||||
echo "==================="
|
||||
|
||||
.venv/bin/pep8 --show-source bin bin/eho-api eho
|
||||
.venv/bin/pep8 --show-source bin bin/savanna-api savanna
|
||||
|
@ -3,4 +3,4 @@
|
||||
echo "Running PyFlakes checks"
|
||||
echo "======================="
|
||||
|
||||
.venv/bin/pyflakes bin bin/eho-api eho
|
||||
.venv/bin/pyflakes bin bin/savanna-api savanna
|
||||
|
@ -3,4 +3,4 @@
|
||||
echo "Running PyLint checks"
|
||||
echo "====================="
|
||||
|
||||
.venv/bin/pylint --output-format=parseable --rcfile=.pylintrc bin/eho-api eho | tee pylint-report.txt
|
||||
.venv/bin/pylint --output-format=parseable --rcfile=.pylintrc bin/savanna-api savanna | tee pylint-report.txt
|
||||
|
@ -4,8 +4,8 @@ from nose import config
|
||||
from nose import core
|
||||
|
||||
import sys
|
||||
from eho.openstack.test_lib import run_tests
|
||||
import eho.tests
|
||||
from savanna.openstack.test_lib import run_tests
|
||||
import savanna.tests
|
||||
|
||||
|
||||
def main():
|
||||
@ -15,7 +15,7 @@ def main():
|
||||
includeExe=True,
|
||||
traverseNamespace=True,
|
||||
plugins=core.DefaultPluginManager())
|
||||
c.configureWhere(eho.tests.__path__)
|
||||
c.configureWhere(savanna.tests.__path__)
|
||||
sys.exit(run_tests(c))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user