eho -> savanna

This commit is contained in:
Sergey Lukjanov 2013-03-20 11:19:46 +04:00
parent c41c7e5ad4
commit e23d985387
62 changed files with 143 additions and 141 deletions

View File

@ -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 names shold be at least 3 characters long and be lowercased with underscores
method-rgx=([a-z_][a-z0-9_]{1,30}|setUp|tearDown)$ method-rgx=([a-z_][a-z0-9_]{1,30}|setUp|tearDown)$
# Module names matching eho-* are ok (files in bin/) # Module names matching savanna-* are ok (files in bin/)
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(eho-[a-z0-9_-]+))$ module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(savanna-[a-z0-9_-]+))$
# Don't require docstrings on tests. # Don't require docstrings on tests.
no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$ no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$

View File

@ -1,5 +1,5 @@
Elastic Hadoop on OpenStack Savanna project
=========================== ===============
QuickStart (Ubuntu) QuickStart (Ubuntu)
---------- ----------
@ -27,9 +27,9 @@ QuickStart (Ubuntu)
:: ::
tools/run_tests 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 Pip speedup

View File

@ -20,16 +20,16 @@ import eventlet
from oslo.config.cfg import CONF from oslo.config.cfg import CONF
import sys import sys
from eho import config from savanna import config
import eho.main as server import savanna.main as server
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
def main(): def main():
config.parse_args(sys.argv[1:]) config.parse_args(sys.argv[1:])
logging.setup("eho") logging.setup("savanna")
app = server.make_app() app = server.make_app()

View File

@ -23,7 +23,7 @@ import os
# add these directories to sys.path here. If the directory is relative to the # 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. # 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('.'))
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('..'))
sys.path.append(os.path.abspath('../bin')) sys.path.append(os.path.abspath('../bin'))
@ -50,7 +50,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Elastic Hadoop on OpenStack' project = u'Savanna'
copyright = u'2013, Mirantis Inc.' copyright = u'2013, Mirantis Inc.'
# The version info for the project you're documenting, acts as replacement for # 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 #html_file_suffix = None
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'EHODoc' htmlhelp_basename = 'SavannaDoc'
# -- Options for LaTeX output -------------------------------------------------- # -- Options for LaTeX output --------------------------------------------------
@ -194,7 +194,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]). # (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'ehodoc.tex', u'Elastic Hadoop on OpenStack Documentation', ('index', 'savannadoc.tex', u'Savanna',
u'Mirantis Inc.', 'manual'), u'Mirantis Inc.', 'manual'),
] ]
@ -224,7 +224,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'eho', u'Elastic Hadoop on OpenStack Documentation', ('index', 'savanna', u'Savanna',
[u'Mirantis Inc.'], 1) [u'Mirantis Inc.'], 1)
] ]
@ -238,8 +238,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'EHO', u'Elastic Hadoop on OpenStack Documentation', ('index', 'Savanna', u'Savanna',
u'Mirantis Inc.', 'EHO', 'Elastic Hadoop on OpenStack', u'Mirantis Inc.', 'Savanna', 'Savanna',
'Miscellaneous'), 'Miscellaneous'),
] ]

View File

@ -30,4 +30,4 @@
[sqlalchemy] [sqlalchemy]
# URL for sqlalchemy database (string value) # URL for sqlalchemy database (string value)
#database_uri=sqlite:////tmp/eho-server.db #database_uri=sqlite:////tmp/savanna-server.db

View File

@ -1,7 +1,7 @@
[DEFAULT] [DEFAULT]
# #
# Options defined in eho.config # Options defined in savanna.config
# #
# set host (string value) # 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 # 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 # 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 # Driver or drivers to handle sending notifications (multi
@ -159,7 +159,7 @@
[cluster_node] [cluster_node]
# #
# Options defined in eho.service.cluster_ops # Options defined in savanna.service.cluster_ops
# #
# An existing user on Hadoop image (string value) # An existing user on Hadoop image (string value)
@ -172,11 +172,11 @@
[sqlalchemy] [sqlalchemy]
# #
# Options defined in eho.main # Options defined in savanna.main
# #
# URL for sqlalchemy database (string value) # URL for sqlalchemy database (string value)
#database_uri=sqlite:////tmp/eho-server.db #database_uri=sqlite:////tmp/savanna-server.db
# Sqlalchemy echo (boolean value) # Sqlalchemy echo (boolean value)
#echo=false #echo=false

View File

@ -1,6 +1,6 @@
[DEFAULT] [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 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: # The following code from 'wsgi' is needed:
# #
@ -8,11 +8,11 @@ base=eho
# from xml.dom import minidom # from xml.dom import minidom
# from xml.parsers import expat # from xml.parsers import expat
# #
# from eho.openstack.common import exception # from savanna.openstack.common import exception
# from eho.openstack.common.gettextutils import _ # from savanna.openstack.common.gettextutils import _
# from eho.openstack.common import jsonutils # from savanna.openstack.common import jsonutils
# from eho.openstack.common import log as logging # from savanna.openstack.common import log as logging
# from eho.openstack.common import xmlutils # from savanna.openstack.common import xmlutils
# #
# LOG = logging.getLogger(__name__) # LOG = logging.getLogger(__name__)
# #

View File

@ -3,7 +3,7 @@
echo "----- Setting up Hadoop configs" echo "----- Setting up Hadoop configs"
{% for filename in configfiles -%} {% for filename in configfiles -%}
cat {{filename}}.eho_template | cat {{filename}}.savanna_template |
{%- for item in configs -%} {%- for item in configs -%}
sed -e "s/{{item[0]}}/{{item[1]}}/g" | sed -e "s/{{item[0]}}/{{item[1]}}/g" |
{%- endfor -%} {%- endfor -%}
@ -23,4 +23,4 @@ chmod -R 700 /mnt
chown -R hadoop:hadoop /mnt chown -R hadoop:hadoop /mnt
{% block master %} {% block master %}
{% endblock %} {% endblock %}

View File

@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 savanna.utils.api import Rest, render, abort_and_log, request_data
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -37,4 +37,4 @@ CONF.register_cli_opts(cli_opts)
def parse_args(argv): def parse_args(argv):
CONF(argv, project='eho') CONF(argv, project='savanna')

View File

@ -19,15 +19,15 @@ from keystoneclient.middleware.auth_token import filter_factory as auth_token
from oslo.config import cfg from oslo.config import cfg
from werkzeug.exceptions import default_exceptions from werkzeug.exceptions import default_exceptions
from werkzeug.exceptions import HTTPException 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 savanna.middleware.auth_valid import filter_factory as auth_valid
from eho.utils.scheduler import setup_scheduler from savanna.utils.scheduler import setup_scheduler
from eho.storage.defaults import setup_defaults from savanna.storage.defaults import setup_defaults
from eho.utils.api import render from savanna.utils.api import render
from eho.storage.storage import setup_storage from savanna.storage.storage import setup_storage
from eho.openstack.common import log from savanna.openstack.common import log
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ -62,7 +62,7 @@ opts = [
sqlalchemy_opts = [ sqlalchemy_opts = [
cfg.StrOpt('database_uri', cfg.StrOpt('database_uri',
default='sqlite:////tmp/eho-server.db', default='sqlite:////tmp/savanna-server.db',
help='URL for sqlalchemy database'), help='URL for sqlalchemy database'),
cfg.BoolOpt('echo', cfg.BoolOpt('echo',
default=False, default=False,
@ -72,14 +72,14 @@ sqlalchemy_opts = [
CONF = cfg.CONF CONF = cfg.CONF
CONF.register_opts(opts) CONF.register_opts(opts)
CONF.register_opts(sqlalchemy_opts, group='sqlalchemy') CONF.register_opts(sqlalchemy_opts, group='sqlalchemy')
CONF.import_opt('log_level', 'eho.config') CONF.import_opt('log_level', 'savanna.config')
def make_app(): 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_DATABASE_URI'] = CONF.sqlalchemy.database_uri
app.config['SQLALCHEMY_ECHO'] = CONF.sqlalchemy.echo app.config['SQLALCHEMY_ECHO'] = CONF.sqlalchemy.echo

View File

@ -15,8 +15,8 @@
from webob.exc import HTTPServiceUnavailable, HTTPNotFound, HTTPUnauthorized from webob.exc import HTTPServiceUnavailable, HTTPNotFound, HTTPUnauthorized
from eho.openstack.commons import split_path from savanna.openstack.commons import split_path
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -21,7 +21,7 @@ Exceptions common to OpenStack projects
import logging import logging
from eho.openstack.common.gettextutils import _ from savanna.openstack.common.gettextutils import _
_FATAL_EXCEPTION_FORMAT_ERRORS = False _FATAL_EXCEPTION_FORMAT_ERRORS = False

View File

@ -20,7 +20,7 @@ gettext for openstack-common modules.
Usual usage in an openstack.common module: Usual usage in an openstack.common module:
from eho.openstack.common.gettextutils import _ from savanna.openstack.common.gettextutils import _
""" """
import gettext import gettext

View File

@ -40,7 +40,7 @@ import itertools
import json import json
import xmlrpclib import xmlrpclib
from eho.openstack.common import timeutils from savanna.openstack.common import timeutils
def to_primitive(value, convert_instances=False, convert_datetime=True, def to_primitive(value, convert_instances=False, convert_datetime=True,

View File

@ -42,10 +42,10 @@ import traceback
from oslo.config import cfg from oslo.config import cfg
from eho.openstack.common.gettextutils import _ from savanna.openstack.common.gettextutils import _
from eho.openstack.common import jsonutils from savanna.openstack.common import jsonutils
from eho.openstack.common import local from savanna.openstack.common import local
from eho.openstack.common import notifier from savanna.openstack.common import notifier
_DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s" _DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s"
@ -305,7 +305,7 @@ class JSONFormatter(logging.Formatter):
class PublishErrorsHandler(logging.Handler): class PublishErrorsHandler(logging.Handler):
def emit(self, record): def emit(self, record):
if ('eho.openstack.common.notifier.log_notifier' in if ('savanna.openstack.common.notifier.log_notifier' in
CONF.notification_driver): CONF.notification_driver):
return return
notifier.api.notify(None, 'error.publisher', notifier.api.notify(None, 'error.publisher',

View File

@ -17,12 +17,12 @@ import uuid
from oslo.config import cfg from oslo.config import cfg
from eho.openstack.common import context from savanna.openstack.common import context
from eho.openstack.common.gettextutils import _ from savanna.openstack.common.gettextutils import _
from eho.openstack.common import importutils from savanna.openstack.common import importutils
from eho.openstack.common import jsonutils from savanna.openstack.common import jsonutils
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
from eho.openstack.common import timeutils from savanna.openstack.common import timeutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -15,8 +15,8 @@
from oslo.config import cfg from oslo.config import cfg
from eho.openstack.common import jsonutils from savanna.openstack.common import jsonutils
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
CONF = cfg.CONF CONF = cfg.CONF
@ -30,6 +30,6 @@ def notify(_context, message):
CONF.default_notification_level) CONF.default_notification_level)
priority = priority.lower() priority = priority.lower()
logger = logging.getLogger( logger = logging.getLogger(
'eho.openstack.common.notification.%s' % 'savanna.openstack.common.notification.%s' %
message['event_type']) message['event_type'])
getattr(logger, priority)(jsonutils.dumps(message)) getattr(logger, priority)(jsonutils.dumps(message))

View File

@ -24,11 +24,11 @@ import datetime
from xml.dom import minidom from xml.dom import minidom
from xml.parsers import expat from xml.parsers import expat
from eho.openstack.common import exception from savanna.openstack.common import exception
from eho.openstack.common.gettextutils import _ from savanna.openstack.common.gettextutils import _
from eho.openstack.common import jsonutils from savanna.openstack.common import jsonutils
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
from eho.openstack.common import xmlutils from savanna.openstack.common import xmlutils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -17,17 +17,17 @@ import eventlet
from oslo.config import cfg from oslo.config import cfg
from flask import request from flask import request
from eho.storage.models import NodeTemplate, NodeType, NodeProcess, \ from savanna.storage.models import NodeTemplate, NodeType, NodeProcess, \
NodeTemplateConfig, Cluster, ClusterNodeCount NodeTemplateConfig, Cluster, ClusterNodeCount
from eho.storage.storage import DB from savanna.storage.storage import DB
from eho.utils.api import abort_and_log from savanna.utils.api import abort_and_log
from eho.service import cluster_ops from savanna.service import cluster_ops
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('allow_cluster_ops', 'eho.config') CONF.import_opt('allow_cluster_ops', 'savanna.config')
def _clean_nones(obj): def _clean_nones(obj):

View File

@ -13,16 +13,17 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import time
from jinja2 import Environment from jinja2 import Environment
from jinja2 import PackageLoader from jinja2 import PackageLoader
from paramiko import SSHClient, AutoAddPolicy from paramiko import SSHClient, AutoAddPolicy
from oslo.config import cfg 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__) LOG = logging.getLogger(__name__)
@ -38,7 +39,7 @@ cluster_node_opts = [
] ]
CONF.register_opts(cluster_node_opts, 'cluster_node') 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): def _find_by_id(lst, id):
@ -205,7 +206,7 @@ def _check_if_up(nova, node):
def _render_template(template_name, **kwargs): 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) templ = env.get_template('resources/%s.template' % template_name)
return templ.render(**kwargs) return templ.render(**kwargs)
@ -253,13 +254,14 @@ def _setup_node(node, clmap):
try: try:
_setup_ssh_connection(node['ip'], ssh) _setup_ssh_connection(node['ip'], ssh)
sftp = ssh.open_sftp() 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.write(script_body)
fl.close() 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 ' ret = _open_channel_and_execute(ssh,
'>>/tmp/eho-hadoop-init.log 2>&1') '/tmp/savanna-hadoop-init.sh '
'>> /tmp/savanna-hadoop-init.log 2>&1')
_ensure_zero(ret) _ensure_zero(ret)
finally: finally:
ssh.close() ssh.close()

View File

@ -15,16 +15,16 @@
from oslo.config import cfg from oslo.config import cfg
from eho.storage.models import NodeProcess, NodeProcessProperty, \ from savanna.storage.models import NodeProcess, NodeProcessProperty, \
NodeType, NodeTemplate, NodeTemplateConfig, Cluster, ClusterNodeCount NodeType, NodeTemplate, NodeTemplateConfig, Cluster, ClusterNodeCount
from eho.storage.storage import DB from savanna.storage.storage import DB
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('reset_db', 'eho.config') CONF.import_opt('reset_db', 'savanna.config')
CONF.import_opt('stub_data', 'eho.config') CONF.import_opt('stub_data', 'savanna.config')
def create_node_process(name, properties): def create_node_process(name, properties):

View File

@ -15,7 +15,7 @@
from uuid import uuid4 from uuid import uuid4
from eho.storage.storage import DB from savanna.storage.storage import DB
class NodeTemplate(DB.Model): class NodeTemplate(DB.Model):

View File

@ -19,7 +19,7 @@ from oslo.config import cfg
DB = SQLAlchemy() DB = SQLAlchemy()
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('reset_db', 'eho.config') CONF.import_opt('reset_db', 'savanna.config')
def setup_storage(app): def setup_storage(app):

View File

@ -22,13 +22,13 @@ import os
import eventlet import eventlet
from oslo.config import cfg from oslo.config import cfg
from eho.main import make_app from savanna.main import make_app
from eho.service import api from savanna.service import api
from eho.storage.models import Node, NodeTemplate from savanna.storage.models import Node, NodeTemplate
from eho.storage.storage import DB from savanna.storage.storage import DB
import eho.main import savanna.main
from eho.utils import scheduler from savanna.utils import scheduler
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -82,12 +82,12 @@ def _stub_auth_valid(*args, **kwargs):
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('reset_db', 'eho.config') CONF.import_opt('reset_db', 'savanna.config')
CONF.import_opt('stub_data', 'eho.config') CONF.import_opt('stub_data', 'savanna.config')
CONF.import_opt('log_level', 'eho.config') CONF.import_opt('log_level', 'savanna.config')
CONF.import_opt('allow_cluster_ops', 'eho.config') CONF.import_opt('allow_cluster_ops', 'savanna.config')
CONF.import_opt('database_uri', 'eho.main', group='sqlalchemy') CONF.import_opt('database_uri', 'savanna.main', group='sqlalchemy')
CONF.import_opt('echo', 'eho.main', group='sqlalchemy') CONF.import_opt('echo', 'savanna.main', group='sqlalchemy')
class TestApi(unittest.TestCase): class TestApi(unittest.TestCase):
@ -105,14 +105,14 @@ class TestApi(unittest.TestCase):
CONF.set_override('echo', False, group='sqlalchemy') CONF.set_override('echo', False, group='sqlalchemy')
# store functions that will be stubbed # store functions that will be stubbed
self._prev_auth_token = eho.main.auth_token self._prev_auth_token = savanna.main.auth_token
self._prev_auth_valid = eho.main.auth_valid self._prev_auth_valid = savanna.main.auth_valid
self._prev_cluster_launch = api.cluster_ops.launch_cluster self._prev_cluster_launch = api.cluster_ops.launch_cluster
self._prev_cluster_stop = api.cluster_ops.stop_cluster self._prev_cluster_stop = api.cluster_ops.stop_cluster
# stub functions # stub functions
eho.main.auth_token = _stub_auth_token savanna.main.auth_token = _stub_auth_token
eho.main.auth_valid = _stub_auth_valid savanna.main.auth_valid = _stub_auth_valid
api.cluster_ops.launch_cluster = _stub_launch_cluster api.cluster_ops.launch_cluster = _stub_launch_cluster
api.cluster_ops.stop_cluster = _stub_stop_cluster api.cluster_ops.stop_cluster = _stub_stop_cluster
@ -125,8 +125,8 @@ class TestApi(unittest.TestCase):
def tearDown(self): def tearDown(self):
# unstub functions # unstub functions
eho.main.auth_token = self._prev_auth_token savanna.main.auth_token = self._prev_auth_token
eho.main.auth_valid = self._prev_auth_valid savanna.main.auth_valid = self._prev_auth_valid
api.cluster_ops.launch_cluster = self._prev_cluster_launch api.cluster_ops.launch_cluster = self._prev_cluster_launch
api.cluster_ops.stop_cluster = self._prev_cluster_stop api.cluster_ops.stop_cluster = self._prev_cluster_stop

View File

@ -19,9 +19,9 @@ import traceback
from flask import abort, request, Blueprint, Response from flask import abort, request, Blueprint, Response
from werkzeug.datastructures import MIMEAccept from werkzeug.datastructures import MIMEAccept
from eho.openstack.common.wsgi import JSONDictSerializer, XMLDictSerializer, \ from savanna.openstack.common.wsgi import JSONDictSerializer, \
JSONDeserializer XMLDictSerializer, JSONDeserializer
from eho.openstack.common import log as logging from savanna.openstack.common import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@ -17,7 +17,7 @@ import logging
from novaclient.v1_1 import client as nova_client 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): def novaclient(headers):

View File

@ -1,18 +1,18 @@
import setuptools 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() requires = common_setup.parse_requirements()
depend_links = common_setup.parse_dependency_links() depend_links = common_setup.parse_dependency_links()
project = 'eho' project = 'savanna'
setuptools.setup( setuptools.setup(
name=project, name=project,
version=common_setup.get_version(project, '0.1'), version=common_setup.get_version(project, '0.1'),
description='elastic hadoop on openstack', description='Savanna project',
author='Mirantis Inc.', author='Mirantis Inc.',
author_email='elastic-hadoop-all@mirantis.com', author_email='savanna@mirantis.com',
url='http://eho.mirantis.com', url='http://savanna.mirantis.com',
classifiers=[ classifiers=[
'Environment :: OpenStack', 'Environment :: OpenStack',
'Intended Audience :: Information Technology', 'Intended Audience :: Information Technology',
@ -30,6 +30,6 @@ setuptools.setup(
include_package_data=True, include_package_data=True,
test_suite='nose.collector', test_suite='nose.collector',
setup_requires=['setuptools_git>=0.4'], setup_requires=['setuptools_git>=0.4'],
scripts=['bin/eho-api'], scripts=['bin/savanna-api'],
py_modules=[] py_modules=[]
) )

View File

@ -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. Run it from the top-level working directory i.e.

View File

@ -217,7 +217,7 @@ def _sanitize_default(s):
elif s == _get_my_ip(): elif s == _get_my_ip():
return '10.0.0.1' return '10.0.0.1'
elif s == socket.getfqdn(): elif s == socket.getfqdn():
return 'eho' return 'savanna'
elif s.strip() != s: elif s.strip() != s:
return '"%s"' % s return '"%s"' % s
return s return s

View File

@ -19,13 +19,13 @@
# stolen from the OpenStack Nova # 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) grep -l "Opt(" {} \; | sort -u)
BINS=$(echo bin/eho-*) BINS=$(echo bin/savanna-*)
PYTHONPATH=./:${PYTHONPATH} \ PYTHONPATH=./:${PYTHONPATH} \
tools/with_venv python $(dirname "$0")/extract_opts.py ${FILES} ${BINS} > \ 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() # Remove compiled files created by imp.import_source()
for bin in ${BINS}; do for bin in ${BINS}; do

View File

@ -13,9 +13,9 @@ cli_opts = [
] ]
CONF = cfg.CONF CONF = cfg.CONF
CONF.import_opt('os_admin_username', 'eho.main') CONF.import_opt('os_admin_username', 'savanna.main')
CONF.import_opt('os_admin_password', 'eho.main') CONF.import_opt('os_admin_password', 'savanna.main')
CONF.import_opt('os_admin_tenant_name', 'eho.main') CONF.import_opt('os_admin_tenant_name', 'savanna.main')
CONF.register_cli_opts(cli_opts) CONF.register_cli_opts(cli_opts)

View File

@ -110,7 +110,7 @@ def install_dependencies(venv=VENV):
# Tell the virtual env how to "import app" # Tell the virtual env how to "import app"
py_ver = _detect_python_version(venv) py_ver = _detect_python_version(venv)
pthfile = os.path.join(venv, "lib", py_ver, pthfile = os.path.join(venv, "lib", py_ver,
"site-packages", "eho.pth") "site-packages", "savanna.pth")
f = open(pthfile, 'w') f = open(pthfile, 'w')
f.write("%s\n" % ROOT) f.write("%s\n" % ROOT)

View File

@ -3,4 +3,4 @@
echo "Running coverage" echo "Running coverage"
echo "================" 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 $@

View File

@ -3,4 +3,4 @@
echo "Running PEP8 checks" echo "Running PEP8 checks"
echo "===================" echo "==================="
.venv/bin/pep8 --show-source bin bin/eho-api eho .venv/bin/pep8 --show-source bin bin/savanna-api savanna

View File

@ -3,4 +3,4 @@
echo "Running PyFlakes checks" echo "Running PyFlakes checks"
echo "=======================" echo "======================="
.venv/bin/pyflakes bin bin/eho-api eho .venv/bin/pyflakes bin bin/savanna-api savanna

View File

@ -3,4 +3,4 @@
echo "Running PyLint checks" echo "Running PyLint checks"
echo "=====================" 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

View File

@ -4,8 +4,8 @@ from nose import config
from nose import core from nose import core
import sys import sys
from eho.openstack.test_lib import run_tests from savanna.openstack.test_lib import run_tests
import eho.tests import savanna.tests
def main(): def main():
@ -15,7 +15,7 @@ def main():
includeExe=True, includeExe=True,
traverseNamespace=True, traverseNamespace=True,
plugins=core.DefaultPluginManager()) plugins=core.DefaultPluginManager())
c.configureWhere(eho.tests.__path__) c.configureWhere(savanna.tests.__path__)
sys.exit(run_tests(c)) sys.exit(run_tests(c))