Rename to Panko

Change-Id: I50b5f6c7b74a4431ccb7af271c11fe9c027f83ab
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2016-05-06 18:43:44 +02:00
parent ba4f572fd3
commit 3009be7ee7
131 changed files with 561 additions and 578 deletions

View File

@ -1,7 +1,7 @@
[run] [run]
branch = True branch = True
source = ceilometer source = panko
omit = ceilometer/tests/* omit = panko/tests/*
[report] [report]
ignore_errors = True ignore_errors = True

2
.gitignore vendored
View File

@ -11,5 +11,5 @@ cover/*
dist/* dist/*
doc/build doc/build
doc/source/api/ doc/source/api/
etc/ceilometer/ceilometer.conf etc/panko/panko.conf
subunit.log subunit.log

View File

@ -1,4 +1,4 @@
[gerrit] [gerrit]
host=review.openstack.org host=review.openstack.org
port=29418 port=29418
project=openstack/ceilometer.git project=openstack/panko.git

View File

@ -2,7 +2,7 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-600} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-600} \
${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-./ceilometer/tests} -t . $LISTOPT $IDOPTION ${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-./panko/tests} -t . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE test_id_option=--load-list $IDFILE
test_list_option=--list test_list_option=--list
# NOTE(chdent): Only used/matches on gabbi-related tests. # NOTE(chdent): Only used/matches on gabbi-related tests.

View File

@ -13,4 +13,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub: Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/ceilometer https://bugs.launchpad.net/panko

View File

@ -1,12 +1,12 @@
Ceilometer Style Commandments Panko Style Commandments
============================= ========================
- Step 1: Read the OpenStack Style Commandments - Step 1: Read the OpenStack Style Commandments
http://docs.openstack.org/developer/hacking/ http://docs.openstack.org/developer/hacking/
- Step 2: Read on - Step 2: Read on
Ceilometer Specific Commandments Panko Specific Commandments
-------------------------------- ---------------------------
- [C301] LOG.warn() is not allowed. Use LOG.warning() - [C301] LOG.warn() is not allowed. Use LOG.warning()
- [C302] Deprecated library function os.popen() - [C302] Deprecated library function os.popen()

View File

@ -1,10 +1,10 @@
= Generalist Code Reviewers = = Generalist Code Reviewers =
The current members of ceilometer-core are listed here: The current members of panko-core are listed here:
https://launchpad.net/~ceilometer-drivers/+members#active https://launchpad.net/~panko-drivers/+members#active
This group can +2 and approve patches in Ceilometer. However, they may This group can +2 and approve patches in Panko. However, they may
choose to seek feedback from the appropriate specialist maintainer before choose to seek feedback from the appropriate specialist maintainer before
approving a patch if it is in any way controversial or risky. approving a patch if it is in any way controversial or risky.

View File

@ -1,8 +1,8 @@
ceilometer panko
========== =====
Documentation for the project can be found at: Documentation for the project can be found at:
http://docs.openstack.org/developer/ceilometer/ http://docs.openstack.org/developer/panko/
The project home is at: The project home is at:
http://launchpad.net/ceilometer http://launchpad.net/panko

View File

@ -1,6 +1,6 @@
=============================== ==========================
Enabling Ceilometer in DevStack Enabling Panko in DevStack
=============================== ==========================
1. Download Devstack:: 1. Download Devstack::
@ -10,11 +10,11 @@ Enabling Ceilometer in DevStack
2. Add this repo as an external repository in ``local.conf`` file:: 2. Add this repo as an external repository in ``local.conf`` file::
[[local|localrc]] [[local|localrc]]
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer enable_plugin panko https://git.openstack.org/openstack/panko
There are some options, such as CEILOMETER_BACKEND, defined in There are some options, such as PANKO_BACKEND, defined in
``ceilometer/devstack/settings``, they can be used to configure the ``panko/devstack/settings``, they can be used to configure the
installation of Ceilometer. If you don't want to use their default value, installation of Panko. If you don't want to use their default value,
you can set a new one in ``local.conf``. you can set a new one in ``local.conf``.
3. Run ``stack.sh``. 3. Run ``stack.sh``.

View File

@ -1,15 +0,0 @@
Listen %PORT%
<VirtualHost *:%PORT%>
WSGIDaemonProcess ceilometer-api processes=2 threads=10 user=%USER% display-name=%{GROUP} %VIRTUALENV%
WSGIProcessGroup ceilometer-api
WSGIScriptAlias / %WSGIAPP%
WSGIApplicationGroup %{GLOBAL}
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/%APACHE_NAME%/ceilometer.log
CustomLog /var/log/%APACHE_NAME%/ceilometer_access.log combined
</VirtualHost>
WSGISocketPrefix /var/run/%APACHE_NAME%

View File

@ -0,0 +1,15 @@
Listen %PORT%
<VirtualHost *:%PORT%>
WSGIDaemonProcess panko-api processes=2 threads=10 user=%USER% display-name=%{GROUP} %VIRTUALENV%
WSGIProcessGroup panko-api
WSGIScriptAlias / %WSGIAPP%
WSGIApplicationGroup %{GLOBAL}
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/%APACHE_NAME%/panko.log
CustomLog /var/log/%APACHE_NAME%/panko_access.log combined
</VirtualHost>
WSGISocketPrefix /var/run/%APACHE_NAME%

View File

@ -1,15 +1,15 @@
# Install and start **Ceilometer** service in devstack # Install and start **Panko** service in devstack
# #
# To enable Ceilometer in devstack add an entry to local.conf that # To enable Panko in devstack add an entry to local.conf that
# looks like # looks like
# #
# [[local|localrc]] # [[local|localrc]]
# enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer # enable_plugin panko git://git.openstack.org/openstack/panko
# #
# Several variables set in the localrc section adjust common behaviors # Several variables set in the localrc section adjust common behaviors
# of Ceilometer (see within for additional settings): # of Panko (see within for additional settings):
# #
# CEILOMETER_BACKEND: Database backend (e.g. 'mysql', 'mongodb', 'es') # PANKO_BACKEND: Database backend (e.g. 'mysql', 'mongodb', 'es')
# Save trace setting # Save trace setting
XTRACE=$(set +o | grep xtrace) XTRACE=$(set +o | grep xtrace)
@ -17,19 +17,19 @@ set -o xtrace
# Support potential entry-points console scripts in VENV or not # Support potential entry-points console scripts in VENV or not
if [[ ${USE_VENV} = True ]]; then if [[ ${USE_VENV} = True ]]; then
PROJECT_VENV["ceilometer"]=${CEILOMETER_DIR}.venv PROJECT_VENV["panko"]=${PANKO_DIR}.venv
CEILOMETER_BIN_DIR=${PROJECT_VENV["ceilometer"]}/bin PANKO_BIN_DIR=${PROJECT_VENV["panko"]}/bin
else else
CEILOMETER_BIN_DIR=$(get_python_exec_prefix) PANKO_BIN_DIR=$(get_python_exec_prefix)
fi fi
function ceilometer_service_url { function panko_service_url {
echo "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT" echo "$PANKO_SERVICE_PROTOCOL://$PANKO_SERVICE_HOST:$PANKO_SERVICE_PORT"
} }
# _ceilometer_install_mongdb - Install mongodb and python lib. # _panko_install_mongdb - Install mongodb and python lib.
function _ceilometer_install_mongodb { function _panko_install_mongodb {
# Server package is the same on all # Server package is the same on all
local packages=mongodb-server local packages=mongodb-server
@ -51,225 +51,225 @@ function _ceilometer_install_mongodb {
} }
# Configure mod_wsgi # Configure mod_wsgi
function _ceilometer_config_apache_wsgi { function _panko_config_apache_wsgi {
sudo mkdir -p $CEILOMETER_WSGI_DIR sudo mkdir -p $PANKO_WSGI_DIR
local ceilometer_apache_conf=$(apache_site_config_for ceilometer) local panko_apache_conf=$(apache_site_config_for panko)
local apache_version=$(get_apache_version) local apache_version=$(get_apache_version)
local venv_path="" local venv_path=""
# Copy proxy vhost and wsgi file # Copy proxy vhost and wsgi file
sudo cp $CEILOMETER_DIR/ceilometer/api/app.wsgi $CEILOMETER_WSGI_DIR/app sudo cp $PANKO_DIR/panko/api/app.wsgi $PANKO_WSGI_DIR/app
if [[ ${USE_VENV} = True ]]; then if [[ ${USE_VENV} = True ]]; then
venv_path="python-path=${PROJECT_VENV["ceilometer"]}/lib/$(python_version)/site-packages" venv_path="python-path=${PROJECT_VENV["panko"]}/lib/$(python_version)/site-packages"
fi fi
sudo cp $CEILOMETER_DIR/devstack/apache-ceilometer.template $ceilometer_apache_conf sudo cp $PANKO_DIR/devstack/apache-panko.template $panko_apache_conf
sudo sed -e " sudo sed -e "
s|%PORT%|$CEILOMETER_SERVICE_PORT|g; s|%PORT%|$PANKO_SERVICE_PORT|g;
s|%APACHE_NAME%|$APACHE_NAME|g; s|%APACHE_NAME%|$APACHE_NAME|g;
s|%WSGIAPP%|$CEILOMETER_WSGI_DIR/app|g; s|%WSGIAPP%|$PANKO_WSGI_DIR/app|g;
s|%USER%|$STACK_USER|g; s|%USER%|$STACK_USER|g;
s|%VIRTUALENV%|$venv_path|g s|%VIRTUALENV%|$venv_path|g
" -i $ceilometer_apache_conf " -i $panko_apache_conf
} }
# Install required services for storage backends # Install required services for storage backends
function _ceilometer_prepare_storage_backend { function _panko_prepare_storage_backend {
if [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then if [ "$PANKO_BACKEND" = 'mongodb' ] ; then
pip_install_gr pymongo pip_install_gr pymongo
_ceilometer_install_mongodb _panko_install_mongodb
fi fi
if [ "$CEILOMETER_BACKEND" = 'es' ] ; then if [ "$PANKO_BACKEND" = 'es' ] ; then
${TOP_DIR}/pkg/elasticsearch.sh download ${TOP_DIR}/pkg/elasticsearch.sh download
${TOP_DIR}/pkg/elasticsearch.sh install ${TOP_DIR}/pkg/elasticsearch.sh install
fi fi
} }
# Create ceilometer related accounts in Keystone # Create panko related accounts in Keystone
function _ceilometer_create_accounts { function _panko_create_accounts {
if is_service_enabled ceilometer-api; then if is_service_enabled panko-api; then
create_service_user "ceilometer" "admin" create_service_user "panko" "admin"
get_or_create_service "ceilometer" "metering" "OpenStack Telemetry Service" get_or_create_service "panko" "metering" "OpenStack Telemetry Service"
get_or_create_endpoint "metering" \ get_or_create_endpoint "metering" \
"$REGION_NAME" \ "$REGION_NAME" \
"$(ceilometer_service_url)" \ "$(panko_service_url)" \
"$(ceilometer_service_url)" \ "$(panko_service_url)" \
"$(ceilometer_service_url)" "$(panko_service_url)"
fi fi
} }
# Activities to do before ceilometer has been installed. # Activities to do before panko has been installed.
function preinstall_ceilometer { function preinstall_panko {
echo_summary "Preinstall not in virtualenv context. Skipping." echo_summary "Preinstall not in virtualenv context. Skipping."
} }
# Remove WSGI files, disable and remove Apache vhost file # Remove WSGI files, disable and remove Apache vhost file
function _ceilometer_cleanup_apache_wsgi { function _panko_cleanup_apache_wsgi {
if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then if is_service_enabled panko-api && [ "$PANKO_USE_MOD_WSGI" == "True" ]; then
sudo rm -f "$CEILOMETER_WSGI_DIR"/* sudo rm -f "$PANKO_WSGI_DIR"/*
sudo rmdir "$CEILOMETER_WSGI_DIR" sudo rmdir "$PANKO_WSGI_DIR"
sudo rm -f $(apache_site_config_for ceilometer) sudo rm -f $(apache_site_config_for panko)
fi fi
} }
function _drop_database { function _drop_database {
if is_service_enabled ceilometer-api ; then if is_service_enabled panko-api ; then
if [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then if [ "$PANKO_BACKEND" = 'mongodb' ] ; then
mongo ceilometer --eval "db.dropDatabase();" mongo panko --eval "db.dropDatabase();"
elif [ "$CEILOMETER_BACKEND" = 'es' ] ; then elif [ "$PANKO_BACKEND" = 'es' ] ; then
curl -XDELETE "localhost:9200/events_*" curl -XDELETE "localhost:9200/events_*"
fi fi
fi fi
} }
# cleanup_ceilometer() - Remove residual data files, anything left over # cleanup_panko() - Remove residual data files, anything left over
# from previous runs that a clean run would need to clean up # from previous runs that a clean run would need to clean up
function cleanup_ceilometer { function cleanup_panko {
_ceilometer_cleanup_apache_wsgi _panko_cleanup_apache_wsgi
_drop_database _drop_database
sudo rm -f "$CEILOMETER_CONF_DIR"/* sudo rm -f "$PANKO_CONF_DIR"/*
sudo rmdir "$CEILOMETER_CONF_DIR" sudo rmdir "$PANKO_CONF_DIR"
} }
# Set configuration for storage backend. # Set configuration for storage backend.
function _ceilometer_configure_storage_backend { function _panko_configure_storage_backend {
if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] ; then if [ "$PANKO_BACKEND" = 'mysql' ] || [ "$PANKO_BACKEND" = 'postgresql' ] ; then
iniset $CEILOMETER_CONF database event_connection $(database_connection_url ceilometer) iniset $PANKO_CONF database event_connection $(database_connection_url panko)
elif [ "$CEILOMETER_BACKEND" = 'es' ] ; then elif [ "$PANKO_BACKEND" = 'es' ] ; then
# es is only supported for events. we will use sql for metering. # es is only supported for events. we will use sql for metering.
iniset $CEILOMETER_CONF database event_connection es://localhost:9200 iniset $PANKO_CONF database event_connection es://localhost:9200
${TOP_DIR}/pkg/elasticsearch.sh start ${TOP_DIR}/pkg/elasticsearch.sh start
elif [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then elif [ "$PANKO_BACKEND" = 'mongodb' ] ; then
iniset $CEILOMETER_CONF database event_connection mongodb://localhost:27017/ceilometer iniset $PANKO_CONF database event_connection mongodb://localhost:27017/panko
else else
die $LINENO "Unable to configure unknown CEILOMETER_BACKEND $CEILOMETER_BACKEND" die $LINENO "Unable to configure unknown PANKO_BACKEND $PANKO_BACKEND"
fi fi
_drop_database _drop_database
} }
# Configure Ceilometer # Configure Panko
function configure_ceilometer { function configure_panko {
local conffile local conffile
iniset $CEILOMETER_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL" iniset $PANKO_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
# Install the policy file and declarative configuration files to # Install the policy file and declarative configuration files to
# the conf dir. # the conf dir.
# NOTE(cdent): Do not make this a glob as it will conflict # NOTE(cdent): Do not make this a glob as it will conflict
# with rootwrap installation done elsewhere and also clobber # with rootwrap installation done elsewhere and also clobber
# ceilometer.conf settings that have already been made. # panko.conf settings that have already been made.
# Anyway, explicit is better than implicit. # Anyway, explicit is better than implicit.
for conffile in policy.json api_paste.ini; do for conffile in policy.json api_paste.ini; do
cp $CEILOMETER_DIR/etc/ceilometer/$conffile $CEILOMETER_CONF_DIR cp $PANKO_DIR/etc/panko/$conffile $PANKO_CONF_DIR
done done
configure_auth_token_middleware $CEILOMETER_CONF ceilometer $CEILOMETER_AUTH_CACHE_DIR configure_auth_token_middleware $PANKO_CONF panko $PANKO_AUTH_CACHE_DIR
# Configure storage # Configure storage
if is_service_enabled ceilometer-api; then if is_service_enabled panko-api; then
_ceilometer_configure_storage_backend _panko_configure_storage_backend
fi fi
if is_service_enabled ceilometer-api && [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then if is_service_enabled panko-api && [ "$PANKO_USE_MOD_WSGI" == "True" ]; then
iniset $CEILOMETER_CONF api pecan_debug "False" iniset $PANKO_CONF api pecan_debug "False"
_ceilometer_config_apache_wsgi _panko_config_apache_wsgi
fi fi
} }
# init_ceilometer() - Initialize etc. # init_panko() - Initialize etc.
function init_ceilometer { function init_panko {
# Get ceilometer keystone settings in place # Get panko keystone settings in place
_ceilometer_create_accounts _panko_create_accounts
# Create cache dir # Create cache dir
sudo install -d -o $STACK_USER $CEILOMETER_AUTH_CACHE_DIR sudo install -d -o $STACK_USER $PANKO_AUTH_CACHE_DIR
rm -f $CEILOMETER_AUTH_CACHE_DIR/* rm -f $PANKO_AUTH_CACHE_DIR/*
if is_service_enabled ceilometer-api && is_service_enabled mysql postgresql ; then if is_service_enabled panko-api && is_service_enabled mysql postgresql ; then
if [ "$CEILOMETER_BACKEND" = 'mysql' ] || [ "$CEILOMETER_BACKEND" = 'postgresql' ] || [ "$CEILOMETER_BACKEND" = 'es' ] ; then if [ "$PANKO_BACKEND" = 'mysql' ] || [ "$PANKO_BACKEND" = 'postgresql' ] || [ "$PANKO_BACKEND" = 'es' ] ; then
recreate_database ceilometer recreate_database panko
$CEILOMETER_BIN_DIR/ceilometer-dbsync $PANKO_BIN_DIR/panko-dbsync
fi fi
fi fi
} }
# Install Ceilometer. # Install Panko.
function install_ceilometer { function install_panko {
if is_service_enabled ceilometer-api; then if is_service_enabled panko-api; then
_ceilometer_prepare_storage_backend _panko_prepare_storage_backend
fi fi
setup_develop $CEILOMETER_DIR setup_develop $PANKO_DIR
sudo install -d -o $STACK_USER -m 755 $CEILOMETER_CONF_DIR sudo install -d -o $STACK_USER -m 755 $PANKO_CONF_DIR
} }
# start_ceilometer() - Start running processes, including screen # start_panko() - Start running processes, including screen
function start_ceilometer { function start_panko {
if [[ "$CEILOMETER_USE_MOD_WSGI" == "False" ]]; then if [[ "$PANKO_USE_MOD_WSGI" == "False" ]]; then
run_process ceilometer-api "$CEILOMETER_BIN_DIR/ceilometer-api -d -v --config-file $CEILOMETER_CONF" run_process panko-api "$PANKO_BIN_DIR/panko-api -d -v --config-file $PANKO_CONF"
elif is_service_enabled ceilometer-api; then elif is_service_enabled panko-api; then
enable_apache_site ceilometer enable_apache_site panko
restart_apache_server restart_apache_server
tail_log ceilometer /var/log/$APACHE_NAME/ceilometer.log tail_log panko /var/log/$APACHE_NAME/panko.log
tail_log ceilometer-api /var/log/$APACHE_NAME/ceilometer_access.log tail_log panko-api /var/log/$APACHE_NAME/panko_access.log
fi fi
# Only die on API if it was actually intended to be turned on # Only die on API if it was actually intended to be turned on
if is_service_enabled ceilometer-api; then if is_service_enabled panko-api; then
echo "Waiting for ceilometer-api to start..." echo "Waiting for panko-api to start..."
if ! wait_for_service $SERVICE_TIMEOUT $(ceilometer_service_url)/v2/; then if ! wait_for_service $SERVICE_TIMEOUT $(panko_service_url)/v2/; then
die $LINENO "ceilometer-api did not start" die $LINENO "panko-api did not start"
fi fi
fi fi
} }
# stop_ceilometer() - Stop running processes # stop_panko() - Stop running processes
function stop_ceilometer { function stop_panko {
if is_service_enabled ceilometer-api ; then if is_service_enabled panko-api ; then
if [ "$CEILOMETER_USE_MOD_WSGI" == "True" ]; then if [ "$PANKO_USE_MOD_WSGI" == "True" ]; then
disable_apache_site ceilometer disable_apache_site panko
restart_apache_server restart_apache_server
else else
stop_process ceilometer-api stop_process panko-api
fi fi
fi fi
} }
# This is the main for plugin.sh # This is the main for plugin.sh
if is_service_enabled ceilometer; then if is_service_enabled panko; then
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
# Set up other services # Set up other services
echo_summary "Configuring system services for Ceilometer" echo_summary "Configuring system services for Panko"
preinstall_ceilometer preinstall_panko
elif [[ "$1" == "stack" && "$2" == "install" ]]; then elif [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing Ceilometer" echo_summary "Installing Panko"
# Use stack_install_service here to account for vitualenv # Use stack_install_service here to account for vitualenv
stack_install_service ceilometer stack_install_service panko
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring Ceilometer" echo_summary "Configuring Panko"
configure_ceilometer configure_panko
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing Ceilometer" echo_summary "Initializing Panko"
# Tidy base for ceilometer # Tidy base for panko
init_ceilometer init_panko
# Start the services # Start the services
start_ceilometer start_panko
fi fi
if [[ "$1" == "unstack" ]]; then if [[ "$1" == "unstack" ]]; then
echo_summary "Shutting Down Ceilometer" echo_summary "Shutting Down Panko"
stop_ceilometer stop_panko
fi fi
if [[ "$1" == "clean" ]]; then if [[ "$1" == "clean" ]]; then
echo_summary "Cleaning Ceilometer" echo_summary "Cleaning Panko"
cleanup_ceilometer cleanup_panko
fi fi
fi fi

View File

@ -1,20 +1,20 @@
enable_service ceilometer-api enable_service panko-api
# Default directories # Default directories
CEILOMETER_DIR=$DEST/ceilometer PANKO_DIR=$DEST/panko
CEILOMETER_CONF_DIR=/etc/ceilometer PANKO_CONF_DIR=/etc/panko
CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf PANKO_CONF=$PANKO_CONF_DIR/panko.conf
CEILOMETER_AUTH_CACHE_DIR=${CEILOMETER_AUTH_CACHE_DIR:-/var/cache/ceilometer} PANKO_AUTH_CACHE_DIR=${PANKO_AUTH_CACHE_DIR:-/var/cache/panko}
CEILOMETER_WSGI_DIR=${CEILOMETER_WSGI_DIR:-/var/www/ceilometer} PANKO_WSGI_DIR=${PANKO_WSGI_DIR:-/var/www/panko}
# Set up database backend # Set up database backend
CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-mysql} PANKO_BACKEND=${PANKO_BACKEND:-mysql}
# Ceilometer connection info. # Panko connection info.
CEILOMETER_SERVICE_PROTOCOL=http PANKO_SERVICE_PROTOCOL=http
CEILOMETER_SERVICE_HOST=$SERVICE_HOST PANKO_SERVICE_HOST=$SERVICE_HOST
CEILOMETER_SERVICE_PORT=${CEILOMETER_SERVICE_PORT:-8777} PANKO_SERVICE_PORT=${PANKO_SERVICE_PORT:-8779}
CEILOMETER_USE_MOD_WSGI=${CEILOMETER_USE_MOD_WSGI:-${ENABLE_HTTPD_MOD_WSGI_SERVICES}} PANKO_USE_MOD_WSGI=${PANKO_USE_MOD_WSGI:-${ENABLE_HTTPD_MOD_WSGI_SERVICES}}
# Get rid of this before done. # Get rid of this before done.
# Tell emacs to use shell-script-mode # Tell emacs to use shell-script-mode

View File

@ -1,7 +1,7 @@
register_project_for_upgrade ceilometer register_project_for_upgrade panko
devstack_localrc base enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer devstack_localrc base enable_plugin panko git://git.openstack.org/openstack/panko
devstack_localrc base enable_service ceilometer-api tempest devstack_localrc base enable_service panko-api tempest
devstack_localrc target enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer devstack_localrc target enable_plugin panko git://git.openstack.org/openstack/panko
devstack_localrc target enable_service ceilometer-api tempest devstack_localrc target enable_service panko-api tempest

View File

@ -12,16 +12,16 @@ source $BASE_DEVSTACK_DIR/stackrc # needed for status directory
source $BASE_DEVSTACK_DIR/lib/tls source $BASE_DEVSTACK_DIR/lib/tls
source $BASE_DEVSTACK_DIR/lib/apache source $BASE_DEVSTACK_DIR/lib/apache
# Locate the ceilometer plugin and get its functions # Locate the panko plugin and get its functions
CEILOMETER_DEVSTACK_DIR=$(dirname $(dirname $0)) PANKO_DEVSTACK_DIR=$(dirname $(dirname $0))
source $CEILOMETER_DEVSTACK_DIR/plugin.sh source $PANKO_DEVSTACK_DIR/plugin.sh
set -o xtrace set -o xtrace
stop_ceilometer stop_panko
# ensure everything is stopped # ensure everything is stopped
SERVICES_DOWN="ceilometer-api" SERVICES_DOWN="panko-api"
ensure_services_stopped $SERVICES_DOWN ensure_services_stopped $SERVICES_DOWN

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ``upgrade-ceilometer`` # ``upgrade-panko``
echo "*********************************************************************" echo "*********************************************************************"
echo "Begin $0" echo "Begin $0"
@ -34,50 +34,50 @@ source $GRENADE_DIR/functions
set -o errexit set -o errexit
# Save mongodb state (replace with snapshot) # Save mongodb state (replace with snapshot)
# TODO(chdent): There used to be a 'register_db_to_save ceilometer' # TODO(chdent): There used to be a 'register_db_to_save panko'
# which may wish to consider putting back in. # which may wish to consider putting back in.
if grep -q 'connection *= *mongo' /etc/ceilometer/ceilometer.conf; then if grep -q 'connection *= *mongo' /etc/panko/panko.conf; then
mongodump --db ceilometer --out $SAVE_DIR/ceilometer-dump.$BASE_RELEASE mongodump --db panko --out $SAVE_DIR/panko-dump.$BASE_RELEASE
fi fi
# Upgrade Ceilometer # Upgrade Panko
# ================== # ==================
# Locate ceilometer devstack plugin, the directory above the # Locate panko devstack plugin, the directory above the
# grenade plugin. # grenade plugin.
CEILOMETER_DEVSTACK_DIR=$(dirname $(dirname $0)) PANKO_DEVSTACK_DIR=$(dirname $(dirname $0))
# Get functions from current DevStack # Get functions from current DevStack
source $TARGET_DEVSTACK_DIR/functions source $TARGET_DEVSTACK_DIR/functions
source $TARGET_DEVSTACK_DIR/stackrc source $TARGET_DEVSTACK_DIR/stackrc
source $TARGET_DEVSTACK_DIR/lib/apache source $TARGET_DEVSTACK_DIR/lib/apache
# Get ceilometer functions from devstack plugin # Get panko functions from devstack plugin
source $CEILOMETER_DEVSTACK_DIR/settings source $PANKO_DEVSTACK_DIR/settings
# Print the commands being run so that we can see the command that triggers # Print the commands being run so that we can see the command that triggers
# an error. # an error.
set -o xtrace set -o xtrace
# Install the target ceilometer # Install the target panko
source $CEILOMETER_DEVSTACK_DIR/plugin.sh stack install source $PANKO_DEVSTACK_DIR/plugin.sh stack install
# calls upgrade-ceilometer for specific release # calls upgrade-panko for specific release
upgrade_project ceilometer $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH upgrade_project panko $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Migrate the database # Migrate the database
# NOTE(chdent): As we evolve BIN_DIR is likely to be defined, but # NOTE(chdent): As we evolve BIN_DIR is likely to be defined, but
# currently it is not. # currently it is not.
CEILOMETER_BIN_DIR=$(dirname $(which ceilometer-dbsync)) PANKO_BIN_DIR=$(dirname $(which panko-dbsync))
$CEILOMETER_BIN_DIR/ceilometer-dbsync || die $LINENO "DB sync error" $PANKO_BIN_DIR/panko-dbsync || die $LINENO "DB sync error"
# Start Ceilometer # Start Panko
start_ceilometer start_panko
ensure_services_started ceilometer-api ensure_services_started panko-api
# Save mongodb state (replace with snapshot) # Save mongodb state (replace with snapshot)
if grep -q 'connection *= *mongo' /etc/ceilometer/ceilometer.conf; then if grep -q 'connection *= *mongo' /etc/panko/panko.conf; then
mongodump --db ceilometer --out $SAVE_DIR/ceilometer-dump.$TARGET_RELEASE mongodump --db panko --out $SAVE_DIR/panko-dump.$TARGET_RELEASE
fi fi

View File

@ -88,17 +88,17 @@ qthelp:
@echo @echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:" ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Ceilometer.qhcp" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Panko.qhcp"
@echo "To view the help file:" @echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Ceilometer.qhc" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Panko.qhc"
devhelp: devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo @echo
@echo "Build finished." @echo "Build finished."
@echo "To view the help file:" @echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Ceilometer" @echo "# mkdir -p $$HOME/.local/share/devhelp/Panko"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Ceilometer" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Panko"
@echo "# devhelp" @echo "# devhelp"
epub: epub:

View File

@ -1,5 +1,5 @@
# #
# Ceilometer documentation build configuration file, created by # Panko documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 27 11:38:59 2011. # sphinx-quickstart on Thu Oct 27 11:38:59 2011.
# #
# This file is execfile()d with the current directory set to its # This file is execfile()d with the current directory set to its
@ -68,7 +68,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Ceilometer' project = u'Panko'
copyright = u'2012-2015, OpenStack Foundation' copyright = u'2012-2015, OpenStack Foundation'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
@ -199,7 +199,7 @@ except Exception:
#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 = 'Ceilometerdoc' htmlhelp_basename = 'Pankodoc'
# -- Options for LaTeX output ------------------------------------------------- # -- Options for LaTeX output -------------------------------------------------
@ -219,7 +219,7 @@ latex_elements = {
# (source start file, target name, title, author, documentclass # (source start file, target name, title, author, documentclass
# [howto/manual]). # [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'Ceilometer.tex', u'Ceilometer Documentation', ('index', 'Panko.tex', u'Panko Documentation',
u'OpenStack Foundation', 'manual'), u'OpenStack Foundation', 'manual'),
] ]
@ -249,7 +249,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', 'ceilometer', u'Ceilometer Documentation', ('index', 'panko', u'Panko Documentation',
[u'OpenStack'], 1) [u'OpenStack'], 1)
] ]
@ -263,8 +263,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', 'Ceilometer', u'Ceilometer Documentation', u'OpenStack', ('index', 'Panko', u'Panko Documentation', u'OpenStack',
'Ceilometer', 'One line description of project.', 'Miscellaneous'), 'Panko', 'One line description of project.', 'Miscellaneous'),
] ]
# Documents to append as an appendix to all manuals. # Documents to append as an appendix to all manuals.
@ -280,7 +280,7 @@ texinfo_documents = [
# -- Options for Epub output -------------------------------------------------- # -- Options for Epub output --------------------------------------------------
# Bibliographic Dublin Core info. # Bibliographic Dublin Core info.
epub_title = u'Ceilometer' epub_title = u'Panko'
epub_author = u'OpenStack' epub_author = u'OpenStack'
epub_publisher = u'OpenStack' epub_publisher = u'OpenStack'
epub_copyright = u'2012-2015, OpenStack' epub_copyright = u'2012-2015, OpenStack'

View File

@ -14,11 +14,11 @@
.. _contributing: .. _contributing:
============================ ============================
Contributing to Ceilometer Contributing to Panko
============================ ============================
Ceilometer follows the same workflow as other OpenStack projects. To start Panko follows the same workflow as other OpenStack projects. To start
contributing to Ceilometer, please follow the workflow found here_. contributing to Panko, please follow the workflow found here_.
.. _here: https://wiki.openstack.org/wiki/Gerrit_Workflow .. _here: https://wiki.openstack.org/wiki/Gerrit_Workflow
@ -26,8 +26,8 @@ contributing to Ceilometer, please follow the workflow found here_.
Project Hosting Details Project Hosting Details
======================= =======================
:Bug tracker: http://launchpad.net/ceilometer :Bug tracker: http://launchpad.net/panko
:Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev (prefix subjects with ``[Ceilometer]`` for faster responses) :Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev (prefix subjects with ``[Panko]`` for faster responses)
:Wiki: http://wiki.openstack.org/wiki/Ceilometer :Wiki: http://wiki.openstack.org/wiki/Panko
:Code Hosting: https://git.openstack.org/cgit/openstack/ceilometer/ :Code Hosting: https://git.openstack.org/cgit/openstack/panko/
:Code Review: https://review.openstack.org/#/q/status:open+project:openstack/ceilometer,n,z :Code Review: https://review.openstack.org/#/q/status:open+project:openstack/panko,n,z

View File

@ -16,7 +16,7 @@ and a growing number of applications running on top of OpenStack infrastructure.
In an effort to avoid significant integration work that would be required if In an effort to avoid significant integration work that would be required if
each service produced a unique notification payload, we have defined a minimum each service produced a unique notification payload, we have defined a minimum
data set that provides the core data elements needed for downstream metering data set that provides the core data elements needed for downstream metering
processes. This format is not enforced by Ceilometer but serves as an advisory processes. This format is not enforced by Panko but serves as an advisory
guideline for PaaS service developers: guideline for PaaS service developers:
:: ::
@ -184,7 +184,7 @@ guideline for PaaS service developers:
"Type": "enumeration", "Type": "enumeration",
"Description": "gauge, cumulative, delta", "Description": "gauge, cumulative, delta",
"Compliance": "required", "Compliance": "required",
"Notes": "describes the behavior of the metric, from Ceilometer" "Notes": "describes the behavior of the metric, from Panko"
}, },
{ {
"Field": "metric_value", "Field": "metric_value",

View File

@ -16,21 +16,21 @@
Guru Meditation Reports Guru Meditation Reports
======================= =======================
Ceilometer contains a mechanism whereby developers and system administrators Panko contains a mechanism whereby developers and system administrators
can generate a report about the state of a running Ceilometer executable. This can generate a report about the state of a running Panko executable. This
report is called a *Guru Meditation Report* (*GMR* for short). report is called a *Guru Meditation Report* (*GMR* for short).
Generating a GMR Generating a GMR
---------------- ----------------
A *GMR* can be generated by sending the *USR1* signal to any Ceilometer process A *GMR* can be generated by sending the *USR1* signal to any Panko process
with support (see below). The *GMR* will then be outputted standard error for with support (see below). The *GMR* will then be outputted standard error for
that particular process. that particular process.
For example, suppose that ``ceilometer-api`` has process id ``8675``, and For example, suppose that ``panko-api`` has process id ``8675``, and
was run with ``2>/var/log/ceilometer/ceilometer-api.log``. Then, was run with ``2>/var/log/panko/panko-api.log``. Then,
``kill -USR1 8675`` will trigger the Guru Meditation report to be printed to ``kill -USR1 8675`` will trigger the Guru Meditation report to be printed to
``/var/log/ceilometer/ceilometer-api.log``. ``/var/log/panko/panko-api.log``.
Structure of a GMR Structure of a GMR
------------------ ------------------
@ -59,12 +59,12 @@ Adding Support for GMRs to New Executables
Adding support for a *GMR* to a given executable is fairly easy. Adding support for a *GMR* to a given executable is fairly easy.
First import the module (currently residing in oslo-incubator), as well as the First import the module (currently residing in oslo-incubator), as well as the
Ceilometer version module: Panko version module:
.. code-block:: python .. code-block:: python
from oslo_reports import guru_meditation_report as gmr from oslo_reports import guru_meditation_report as gmr
from ceilometer import version from panko import version
Then, register any additional sections (optional): Then, register any additional sections (optional):

View File

@ -13,13 +13,13 @@
License for the specific language governing permissions and limitations License for the specific language governing permissions and limitations
under the License. under the License.
================================================== =============================================
Welcome to the Ceilometer developer documentation! Welcome to the Panko developer documentation!
================================================== =============================================
Ceilometer is a component of the Telemetry project. Panko is a component of the Telemetry project.
This documentation offers information on how Ceilometer works and how to This documentation offers information on how Panko works and how to
contribute to the project. contribute to the project.
Overview Overview

View File

@ -28,14 +28,14 @@ Configuring devstack
2. Create a ``local.conf`` file as input to devstack. 2. Create a ``local.conf`` file as input to devstack.
3. The ceilometer services are not enabled by default, so they must be 3. The panko services are not enabled by default, so they must be
enabled in ``local.conf`` before running ``stack.sh``. enabled in ``local.conf`` before running ``stack.sh``.
This example ``local.conf`` file shows all of the settings required for This example ``local.conf`` file shows all of the settings required for
ceilometer:: panko::
[[local|localrc]] [[local|localrc]]
# Enable the Ceilometer devstack plugin # Enable the Panko devstack plugin
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git enable_plugin panko https://git.openstack.org/openstack/panko.git
.. _devstack: http://www.devstack.org/ .. _devstack: http://www.devstack.org/

View File

@ -16,7 +16,7 @@
.. _install: .. _install:
======================= =======================
Installing Ceilometer Installing Panko
======================= =======================
.. toctree:: .. toctree::

View File

@ -25,7 +25,7 @@ Storage Backend Installation
============================ ============================
This step is a prerequisite for the collector and API services. You may use This step is a prerequisite for the collector and API services. You may use
one of the listed database backends below to store Ceilometer data. one of the listed database backends below to store Panko data.
MongoDB MongoDB
------- -------
@ -35,10 +35,10 @@ MongoDB
2.4.x. You will also need to have pymongo_ 2.4 installed 2.4.x. You will also need to have pymongo_ 2.4 installed
To use MongoDB as the storage backend, change the 'database' section in To use MongoDB as the storage backend, change the 'database' section in
ceilometer.conf as follows:: panko.conf as follows::
[database] [database]
connection = mongodb://username:password@host:27017/ceilometer connection = mongodb://username:password@host:27017/panko
SQLalchemy-supported DBs SQLalchemy-supported DBs
------------------------ ------------------------
@ -47,10 +47,10 @@ SQLalchemy-supported DBs
`PostgreSQL` or `MySQL`. `PostgreSQL` or `MySQL`.
To use MySQL as the storage backend, change the 'database' section in To use MySQL as the storage backend, change the 'database' section in
ceilometer.conf as follows:: panko.conf as follows::
[database] [database]
connection = mysql+pymysql://username:password@host/ceilometer?charset=utf8 connection = mysql+pymysql://username:password@host/panko?charset=utf8
.. _MongoDB: http://www.mongodb.org/ .. _MongoDB: http://www.mongodb.org/
@ -65,38 +65,38 @@ Installing the API Server
.. note:: .. note::
The API server needs to be able to talk to keystone and ceilometer's The API server needs to be able to talk to keystone and panko's
database. It is only required if you choose to store data in legacy database. It is only required if you choose to store data in legacy
database or if you inject new samples via REST API. database or if you inject new samples via REST API.
1. Clone the ceilometer git repository to the server:: 1. Clone the panko git repository to the server::
$ cd /opt/stack $ cd /opt/stack
$ git clone https://git.openstack.org/openstack/ceilometer.git $ git clone https://git.openstack.org/openstack/panko.git
2. As a user with ``root`` permissions or ``sudo`` privileges, run the 2. As a user with ``root`` permissions or ``sudo`` privileges, run the
ceilometer installer:: panko installer::
$ cd ceilometer $ cd panko
$ sudo python setup.py install $ sudo python setup.py install
3. Copy the sample configuration files from the source tree 3. Copy the sample configuration files from the source tree
to their final location:: to their final location::
$ mkdir -p /etc/ceilometer $ mkdir -p /etc/panko
$ cp etc/ceilometer/api_paste.ini /etc/ceilometer $ cp etc/panko/api_paste.ini /etc/panko
$ cp etc/ceilometer/*.json /etc/ceilometer $ cp etc/panko/*.json /etc/panko
$ cp etc/ceilometer/*.yaml /etc/ceilometer $ cp etc/panko/*.yaml /etc/panko
$ cp etc/ceilometer/ceilometer.conf.sample /etc/ceilometer/ceilometer.conf $ cp etc/panko/panko.conf.sample /etc/panko/panko.conf
4. Create a service for ceilometer in keystone:: 4. Create a service for panko in keystone::
$ openstack service create metering --name=ceilometer \ $ openstack service create metering --name=panko \
--description="Ceilometer Service" --description="Panko Service"
5. Create an endpoint in keystone for ceilometer:: 5. Create an endpoint in keystone for panko::
$ openstack endpoint create $CEILOMETER_SERVICE \ $ openstack endpoint create $PANKO_SERVICE \
--region RegionOne \ --region RegionOne \
--publicurl "http://$SERVICE_HOST:8777" \ --publicurl "http://$SERVICE_HOST:8777" \
--adminurl "http://$SERVICE_HOST:8777" \ --adminurl "http://$SERVICE_HOST:8777" \
@ -104,14 +104,14 @@ Installing the API Server
.. note:: .. note::
CEILOMETER_SERVICE is the id of the service created by the first command PANKO_SERVICE is the id of the service created by the first command
and SERVICE_HOST is the host where the Ceilometer API is running. The and SERVICE_HOST is the host where the Panko API is running. The
default port value for ceilometer API is 8777. If the port value default port value for panko API is 8777. If the port value
has been customized, adjust accordingly. has been customized, adjust accordingly.
6. Choose and start the API server. 6. Choose and start the API server.
Ceilometer includes the ``ceilometer-api`` command. This can be Panko includes the ``panko-api`` command. This can be
used to run the API server. For smaller or proof-of-concept used to run the API server. For smaller or proof-of-concept
installations this is a reasonable choice. For larger installations it installations this is a reasonable choice. For larger installations it
is strongly recommended to install the API server in a WSGI host is strongly recommended to install the API server in a WSGI host
@ -119,10 +119,10 @@ Installing the API Server
performance and more options for making adjustments specific to the performance and more options for making adjustments specific to the
installation environment. installation environment.
If you are using the ``ceilometer-api`` command it can be started If you are using the ``panko-api`` command it can be started
as:: as::
$ ceilometer-api $ panko-api
.. note:: .. note::

View File

@ -17,23 +17,23 @@
Installing the API behind mod_wsgi Installing the API behind mod_wsgi
=================================== ===================================
Ceilometer comes with a few example files for configuring the API Panko comes with a few example files for configuring the API
service to run behind Apache with ``mod_wsgi``. service to run behind Apache with ``mod_wsgi``.
app.wsgi app.wsgi
======== ========
The file ``ceilometer/api/app.wsgi`` sets up the V2 API WSGI The file ``panko/api/app.wsgi`` sets up the V2 API WSGI
application. The file is installed with the rest of the ceilometer application. The file is installed with the rest of the panko
application code, and should not need to be modified. application code, and should not need to be modified.
etc/apache2/ceilometer etc/apache2/panko
====================== ======================
The ``etc/apache2/ceilometer`` file contains example settings that The ``etc/apache2/panko`` file contains example settings that
work with a copy of ceilometer installed via devstack. work with a copy of panko installed via devstack.
.. literalinclude:: ../../../etc/apache2/ceilometer .. literalinclude:: ../../../etc/apache2/panko
1. On deb-based systems copy or symlink the file to 1. On deb-based systems copy or symlink the file to
``/etc/apache2/sites-available``. For rpm-based systems the file will go in ``/etc/apache2/sites-available``. For rpm-based systems the file will go in
@ -41,11 +41,11 @@ work with a copy of ceilometer installed via devstack.
2. Modify the ``WSGIDaemonProcess`` directive to set the ``user`` and 2. Modify the ``WSGIDaemonProcess`` directive to set the ``user`` and
``group`` values to an appropriate user on your server. In many ``group`` values to an appropriate user on your server. In many
installations ``ceilometer`` will be correct. installations ``panko`` will be correct.
3. Enable the ceilometer site. On deb-based systems:: 3. Enable the panko site. On deb-based systems::
$ a2ensite ceilometer $ a2ensite panko
$ service apache2 reload $ service apache2 reload
On rpm-based systems:: On rpm-based systems::
@ -56,11 +56,11 @@ work with a copy of ceilometer installed via devstack.
Limitation Limitation
========== ==========
As Ceilometer is using Pecan and Pecan's DebugMiddleware doesn't support As Panko is using Pecan and Pecan's DebugMiddleware doesn't support
multiple processes, there is no way to set debug mode in the multiprocessing multiple processes, there is no way to set debug mode in the multiprocessing
case. To allow multiple processes the DebugMiddleware may be turned off by case. To allow multiple processes the DebugMiddleware may be turned off by
setting ``pecan_debug`` to ``False`` in the ``api`` section of setting ``pecan_debug`` to ``False`` in the ``api`` section of
``ceilometer.conf``. ``panko.conf``.
For other WSGI setup you can refer to the `pecan deployment`_ documentation. For other WSGI setup you can refer to the `pecan deployment`_ documentation.
.. _`pecan deployment`: http://pecan.readthedocs.org/en/latest/deployment.html .. _`pecan deployment`: http://pecan.readthedocs.org/en/latest/deployment.html

View File

@ -17,7 +17,7 @@
Running the Tests Running the Tests
================= =================
Ceilometer includes an extensive set of automated unit tests which are Panko includes an extensive set of automated unit tests which are
run through tox_. run through tox_.
1. Install ``tox``:: 1. Install ``tox``::
@ -37,11 +37,11 @@ run through tox_.
3. Install the test dependencies:: 3. Install the test dependencies::
$ sudo pip install -r /opt/stack/ceilometer/test-requirements.txt $ sudo pip install -r /opt/stack/panko/test-requirements.txt
4. Run the unit and code-style tests:: 4. Run the unit and code-style tests::
$ cd /opt/stack/ceilometer $ cd /opt/stack/panko
$ tox -e py27,pep8 $ tox -e py27,pep8
As tox is a wrapper around testr, it also accepts the same flags as testr. As tox is a wrapper around testr, it also accepts the same flags as testr.
@ -57,20 +57,20 @@ run through tox_.
environment. Here's an example, passing the name of a test since you'll environment. Here's an example, passing the name of a test since you'll
normally only want to run the test that hits your breakpoint:: normally only want to run the test that hits your breakpoint::
$ tox -e debug ceilometer.tests.test_bin $ tox -e debug panko.tests.test_bin
For reference, the ``debug`` tox environment implements the instructions For reference, the ``debug`` tox environment implements the instructions
here: https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests here: https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests
5. There is a growing suite of tests which use a tool called `gabbi`_ to 5. There is a growing suite of tests which use a tool called `gabbi`_ to
test and validate the behavior of the Ceilometer API. These tests are run test and validate the behavior of the Panko API. These tests are run
when using the usual ``py27`` tox target but if desired they can be run by when using the usual ``py27`` tox target but if desired they can be run by
themselves:: themselves::
$ tox -e gabbi $ tox -e gabbi
The YAML files used to drive the gabbi tests can be found in The YAML files used to drive the gabbi tests can be found in
``ceilometer/tests/gabbi/gabbits``. If you are adding to or adjusting the ``panko/tests/gabbi/gabbits``. If you are adding to or adjusting the
API you should consider adding tests here. API you should consider adding tests here.
.. _gabbi: https://gabbi.readthedocs.org/ .. _gabbi: https://gabbi.readthedocs.org/

View File

@ -14,37 +14,37 @@ returns a flattened dictionary of properties with associated boolean values -
a 'False' or absent value means that the corresponding feature is not a 'False' or absent value means that the corresponding feature is not
available in the backend. available in the backend.
.. rest-controller:: ceilometer.api.controllers.v2.capabilities:CapabilitiesController .. rest-controller:: panko.api.controllers.v2.capabilities:CapabilitiesController
:webprefix: /v2/capabilities :webprefix: /v2/capabilities
.. autotype:: ceilometer.api.controllers.v2.capabilities.Capabilities .. autotype:: panko.api.controllers.v2.capabilities.Capabilities
:members: :members:
Events and Traits Events and Traits
================= =================
.. rest-controller:: ceilometer.api.controllers.v2.events:EventTypesController .. rest-controller:: panko.api.controllers.v2.events:EventTypesController
:webprefix: /v2/event_types :webprefix: /v2/event_types
.. rest-controller:: ceilometer.api.controllers.v2.events:TraitsController .. rest-controller:: panko.api.controllers.v2.events:TraitsController
:webprefix: /v2/event_types/(event_type)/traits :webprefix: /v2/event_types/(event_type)/traits
.. rest-controller:: ceilometer.api.controllers.v2.events:EventsController .. rest-controller:: panko.api.controllers.v2.events:EventsController
:webprefix: /v2/events :webprefix: /v2/events
.. autotype:: ceilometer.api.controllers.v2.events.Event .. autotype:: panko.api.controllers.v2.events.Event
:members: :members:
.. autotype:: ceilometer.api.controllers.v2.events.Trait .. autotype:: panko.api.controllers.v2.events.Trait
:members: :members:
.. autotype:: ceilometer.api.controllers.v2.events.TraitDescription .. autotype:: panko.api.controllers.v2.events.TraitDescription
:members: :members:
Filtering Queries Filtering Queries
================= =================
Ceilometer's REST API currently supports two types of queries. The Simple Panko's REST API currently supports two types of queries. The Simple
Query functionality provides simple filtering on several fields of the Query functionality provides simple filtering on several fields of the
*Sample* type. Complex Query provides the possibility to specify queries *Sample* type. Complex Query provides the possibility to specify queries
with logical and comparison operators on the fields of *Sample*. with logical and comparison operators on the fields of *Sample*.
@ -73,7 +73,7 @@ type (for example, if you apply a filter on a query for statistics,
you won't target *duration_start* field of *Statistics*, but *timestamp* you won't target *duration_start* field of *Statistics*, but *timestamp*
field of *Sample*). See :ref:`api-queries` for how to query the API. field of *Sample*). See :ref:`api-queries` for how to query the API.
.. autotype:: ceilometer.api.controllers.v2.base.Query .. autotype:: panko.api.controllers.v2.base.Query
:members: :members:
Event Query Event Query
@ -86,5 +86,5 @@ event_type, message_id, start_timestamp, end_timestamp, then this field
will be applied on event, otherwise it will be treated as trait name and will be applied on event, otherwise it will be treated as trait name and
applied on trait. See :ref:`api-queries` for how to query the API. applied on trait. See :ref:`api-queries` for how to query the API.
.. autotype:: ceilometer.api.controllers.v2.events.EventQuery .. autotype:: panko.api.controllers.v2.events.EventQuery
:members: :members:

View File

@ -1,18 +0,0 @@
{
"context_is_admin": "role:admin",
"segregation": "rule:context_is_admin",
"telemetry:get_samples": "",
"telemetry:get_sample": "",
"telemetry:query_sample": "",
"telemetry:create_samples": "",
"telemetry:compute_statistics": "",
"telemetry:get_meters": "",
"telemetry:get_resource": "",
"telemetry:get_resources": "",
"telemetry:events:index": "",
"telemetry:events:show": ""
}

View File

@ -1,6 +1,6 @@
# Ceilometer API WSGI Pipeline # Panko API WSGI Pipeline
# Define the filters that make up the pipeline for processing WSGI requests # Define the filters that make up the pipeline for processing WSGI requests
# Note: This pipeline is PasteDeploy's term rather than Ceilometer's pipeline # Note: This pipeline is PasteDeploy's term rather than Panko's pipeline
# used for processing samples # used for processing samples
# Remove authtoken from the pipeline if you don't want to use keystone authentication # Remove authtoken from the pipeline if you don't want to use keystone authentication
@ -8,7 +8,7 @@
pipeline = cors request_id authtoken api-server pipeline = cors request_id authtoken api-server
[app:api-server] [app:api-server]
paste.app_factory = ceilometer.api.app:app_factory paste.app_factory = panko.api.app:app_factory
[filter:authtoken] [filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory paste.filter_factory = keystonemiddleware.auth_token:filter_factory
@ -18,4 +18,4 @@ paste.filter_factory = oslo_middleware:RequestId.factory
[filter:cors] [filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = ceilometer oslo_config_project = panko

View File

@ -1,7 +1,7 @@
[DEFAULT] [DEFAULT]
output_file = etc/ceilometer/ceilometer.conf output_file = etc/panko/panko.conf
wrap_width = 79 wrap_width = 79
namespace = ceilometer namespace = panko
namespace = oslo.db namespace = oslo.db
namespace = oslo.log namespace = oslo.log
namespace = oslo.middleware.cors namespace = oslo.middleware.cors

View File

@ -21,16 +21,16 @@ OPTS = [
default=8777, default=8777,
deprecated_name='metering_api_port', deprecated_name='metering_api_port',
deprecated_group='DEFAULT', deprecated_group='DEFAULT',
help='The port for the ceilometer API server.', help='The port for the Panko API server.',
), ),
cfg.StrOpt('host', cfg.StrOpt('host',
default='0.0.0.0', default='0.0.0.0',
help='The listen IP for the ceilometer API server.', help='The listen IP for the Panko API server.',
), ),
] ]
CONF = cfg.CONF CONF = cfg.CONF
opt_group = cfg.OptGroup(name='api', opt_group = cfg.OptGroup(name='api',
title='Options for the ceilometer-api service') title='Options for the panko-api service')
CONF.register_group(opt_group) CONF.register_group(opt_group)
CONF.register_opts(OPTS, opt_group) CONF.register_opts(OPTS, opt_group)

View File

@ -21,9 +21,9 @@ from paste import deploy
import pecan import pecan
from werkzeug import serving from werkzeug import serving
from ceilometer.api import hooks from panko.api import hooks
from ceilometer.api import middleware from panko.api import middleware
from ceilometer.i18n import _LI, _LW from panko.i18n import _LI, _LW
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ -66,8 +66,8 @@ def setup_app(pecan_config=None):
pecan_config = pecan_config or { pecan_config = pecan_config or {
"app": { "app": {
'root': 'ceilometer.api.controllers.root.RootController', 'root': 'panko.api.controllers.root.RootController',
'modules': ['ceilometer.api'], 'modules': ['panko.api'],
} }
} }

View File

@ -17,8 +17,8 @@
See http://pecan.readthedocs.org/en/latest/deployment.html for details. See http://pecan.readthedocs.org/en/latest/deployment.html for details.
""" """
from ceilometer import service from panko import service
from ceilometer.api import app from panko.api import app
# Initialize the oslo configuration library and logging # Initialize the oslo configuration library and logging
service.prepare_service([]) service.prepare_service([])

View File

@ -15,7 +15,7 @@
import pecan import pecan
from ceilometer.api.controllers.v2 import root as v2 from panko.api.controllers.v2 import root as v2
MEDIA_TYPE_JSON = 'application/vnd.openstack.telemetry-%s+json' MEDIA_TYPE_JSON = 'application/vnd.openstack.telemetry-%s+json'
MEDIA_TYPE_XML = 'application/vnd.openstack.telemetry-%s+xml' MEDIA_TYPE_XML = 'application/vnd.openstack.telemetry-%s+xml'

View File

@ -31,7 +31,7 @@ import six
import wsme import wsme
from wsme import types as wtypes from wsme import types as wtypes
from ceilometer.i18n import _ from panko.i18n import _
operation_kind = ('lt', 'le', 'eq', 'ne', 'ge', 'gt') operation_kind = ('lt', 'le', 'eq', 'ne', 'ge', 'gt')

View File

@ -23,8 +23,8 @@ from pecan import rest
from wsme import types as wtypes from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan import wsmeext.pecan as wsme_pecan
from ceilometer.api.controllers.v2 import base from panko.api.controllers.v2 import base
from ceilometer import utils from panko import utils
def _flatten_capabilities(capabilities): def _flatten_capabilities(capabilities):

View File

@ -28,12 +28,12 @@ import wsme
from wsme import types as wtypes from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan import wsmeext.pecan as wsme_pecan
from ceilometer.api.controllers.v2 import base from panko.api.controllers.v2 import base
from ceilometer.api.controllers.v2 import utils as v2_utils from panko.api.controllers.v2 import utils as v2_utils
from ceilometer.api import rbac from panko.api import rbac
from ceilometer.event import storage from panko.event import storage
from ceilometer.event.storage import models as event_models from panko.event.storage import models as event_models
from ceilometer.i18n import _ from panko.i18n import _
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -18,8 +18,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from ceilometer.api.controllers.v2 import capabilities from panko.api.controllers.v2 import capabilities
from ceilometer.api.controllers.v2 import events from panko.api.controllers.v2 import events
class V2Controller(object): class V2Controller(object):

View File

@ -24,12 +24,12 @@ from oslo_config import cfg
from oslo_log import log from oslo_log import log
import pecan import pecan
from ceilometer.api.controllers.v2 import base from panko.api.controllers.v2 import base
from ceilometer.api import rbac from panko.api import rbac
from ceilometer.i18n import _, _LI from panko.i18n import _, _LI
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
cfg.CONF.import_opt('default_api_return_limit', 'ceilometer.api.app', cfg.CONF.import_opt('default_api_return_limit', 'panko.api.app',
group='api') group='api')

View File

@ -17,7 +17,7 @@ from oslo_config import cfg
from pecan import hooks from pecan import hooks
from ceilometer import storage from panko import storage
class ConfigHook(hooks.PecanHook): class ConfigHook(hooks.PecanHook):

View File

@ -26,8 +26,8 @@ from oslo_log import log
import six import six
import webob import webob
from ceilometer import i18n from panko import i18n
from ceilometer.i18n import _ from panko.i18n import _
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from ceilometer.api import app from panko.api import app
from ceilometer import service from panko import service
def main(): def main():

View File

@ -17,9 +17,9 @@
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log from oslo_log import log
from ceilometer.i18n import _LI from panko.i18n import _LI
from ceilometer import service from panko import service
from ceilometer import storage from panko import storage
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -16,10 +16,10 @@
from oslo_log import log from oslo_log import log
from oslo_utils import timeutils from oslo_utils import timeutils
from ceilometer import dispatcher from panko import dispatcher
from ceilometer.event.storage import models from panko.event.storage import models
from ceilometer.i18n import _LE from panko.i18n import _LE
from ceilometer import storage from panko import storage
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ -28,10 +28,10 @@ class DatabaseDispatcher(dispatcher.EventDispatcherBase):
"""Dispatcher class for recording metering data into database. """Dispatcher class for recording metering data into database.
The dispatcher class which records each meter into a database configured The dispatcher class which records each meter into a database configured
in ceilometer configuration file. in panko configuration file.
To enable this dispatcher, the following section needs to be present in To enable this dispatcher, the following section needs to be present in
ceilometer.conf file panko.conf file
[DEFAULT] [DEFAULT]
meter_dispatchers = database meter_dispatchers = database

View File

@ -12,7 +12,7 @@
import six import six
from ceilometer import utils from panko import utils
class EventFilter(object): class EventFilter(object):

View File

@ -10,7 +10,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import ceilometer import panko
class Connection(object): class Connection(object):
@ -42,17 +42,17 @@ class Connection(object):
:param events: a list of model.Event objects. :param events: a list of model.Event objects.
""" """
raise ceilometer.NotImplementedError('Events not implemented.') raise panko.NotImplementedError('Events not implemented.')
@staticmethod @staticmethod
def get_events(event_filter, limit=None): def get_events(event_filter, limit=None):
"""Return an iterable of model.Event objects.""" """Return an iterable of model.Event objects."""
raise ceilometer.NotImplementedError('Events not implemented.') raise panko.NotImplementedError('Events not implemented.')
@staticmethod @staticmethod
def get_event_types(): def get_event_types():
"""Return all event types as an iterable of strings.""" """Return all event types as an iterable of strings."""
raise ceilometer.NotImplementedError('Events not implemented.') raise panko.NotImplementedError('Events not implemented.')
@staticmethod @staticmethod
def get_trait_types(event_type): def get_trait_types(event_type):
@ -62,7 +62,7 @@ class Connection(object):
returned. returned.
:param event_type: the type of the Event :param event_type: the type of the Event
""" """
raise ceilometer.NotImplementedError('Events not implemented.') raise panko.NotImplementedError('Events not implemented.')
@staticmethod @staticmethod
def get_traits(event_type, trait_type=None): def get_traits(event_type, trait_type=None):
@ -73,7 +73,7 @@ class Connection(object):
:param trait_type: the name of the Trait to filter by :param trait_type: the name of the Trait to filter by
""" """
raise ceilometer.NotImplementedError('Events not implemented.') raise panko.NotImplementedError('Events not implemented.')
@classmethod @classmethod
def get_capabilities(cls): def get_capabilities(cls):
@ -96,4 +96,4 @@ class Connection(object):
:param ttl: Number of seconds to keep records for. :param ttl: Number of seconds to keep records for.
""" """
raise ceilometer.NotImplementedError('Clearing events not implemented') raise panko.NotImplementedError('Clearing events not implemented')

View File

@ -21,11 +21,11 @@ from oslo_utils import netutils
from oslo_utils import timeutils from oslo_utils import timeutils
import six import six
from ceilometer.event.storage import base from panko.event.storage import base
from ceilometer.event.storage import models from panko.event.storage import models
from ceilometer.i18n import _LE, _LI from panko.i18n import _LE, _LI
from ceilometer import storage from panko import storage
from ceilometer import utils from panko import utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -15,12 +15,12 @@ import operator
from oslo_log import log from oslo_log import log
from ceilometer.event.storage import base from panko.event.storage import base
from ceilometer.event.storage import models from panko.event.storage import models
from ceilometer.i18n import _LE from panko.i18n import _LE
from ceilometer.storage.hbase import base as hbase_base from panko.storage.hbase import base as hbase_base
from ceilometer.storage.hbase import utils as hbase_utils from panko.storage.hbase import utils as hbase_utils
from ceilometer import utils from panko import utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -13,8 +13,8 @@
from oslo_log import log from oslo_log import log
from ceilometer.event.storage import base from panko.event.storage import base
from ceilometer.i18n import _LI from panko.i18n import _LI
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -16,9 +16,9 @@ from oslo_config import cfg
from oslo_log import log from oslo_log import log
import pymongo import pymongo
from ceilometer.event.storage import pymongo_base from panko.event.storage import pymongo_base
from ceilometer import storage from panko import storage
from ceilometer.storage.mongo import utils as pymongo_utils from panko.storage.mongo import utils as pymongo_utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -23,12 +23,12 @@ from oslo_log import log
from oslo_utils import timeutils from oslo_utils import timeutils
import sqlalchemy as sa import sqlalchemy as sa
from ceilometer.event.storage import base from panko.event.storage import base
from ceilometer.event.storage import models as api_models from panko.event.storage import models as api_models
from ceilometer.i18n import _LE, _LI from panko.i18n import _LE, _LI
from ceilometer import storage from panko import storage
from ceilometer.storage.sqlalchemy import models from panko.storage.sqlalchemy import models
from ceilometer import utils from panko import utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ -130,7 +130,7 @@ class Connection(base.Connection):
# in storage.__init__.get_connection_from_config function # in storage.__init__.get_connection_from_config function
options = dict(cfg.CONF.database.items()) options = dict(cfg.CONF.database.items())
options['max_retries'] = 0 options['max_retries'] = 0
# oslo.db doesn't support options defined by Ceilometer # oslo.db doesn't support options defined by Panko
for opt in storage.OPTS: for opt in storage.OPTS:
options.pop(opt.name, None) options.pop(opt.name, None)
self._engine_facade = db_session.EngineFacade(url, **options) self._engine_facade = db_session.EngineFacade(url, **options)

View File

@ -15,7 +15,7 @@
from oslo_utils import timeutils from oslo_utils import timeutils
import six import six
from ceilometer.storage import base from panko.storage import base
def serialize_dt(value): def serialize_dt(value):

View File

@ -15,11 +15,11 @@
from oslo_log import log from oslo_log import log
import pymongo import pymongo
from ceilometer.event.storage import base from panko.event.storage import base
from ceilometer.event.storage import models from panko.event.storage import models
from ceilometer.i18n import _LE, _LI from panko.i18n import _LE, _LI
from ceilometer.storage.mongo import utils as pymongo_utils from panko.storage.mongo import utils as pymongo_utils
from ceilometer import utils from panko import utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -16,7 +16,7 @@
""" """
Guidelines for writing new hacking checks Guidelines for writing new hacking checks
- Use only for Ceilometer specific tests. OpenStack general tests - Use only for Panko specific tests. OpenStack general tests
should be submitted to the common 'hacking' module. should be submitted to the common 'hacking' module.
- Pick numbers in the range X3xx. Find the current test with - Pick numbers in the range X3xx. Find the current test with
the highest allocated number and then pick the next value. the highest allocated number and then pick the next value.

View File

@ -20,7 +20,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html
import oslo_i18n import oslo_i18n
DOMAIN = 'ceilometer' DOMAIN = 'panko'
_translators = oslo_i18n.TranslatorFactory(domain=DOMAIN) _translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)

View File

@ -13,19 +13,19 @@
# under the License. # under the License.
import itertools import itertools
import ceilometer.api import panko.api
import ceilometer.api.app import panko.api.app
import ceilometer.dispatcher import panko.dispatcher
import ceilometer.storage import panko.storage
import ceilometer.utils import panko.utils
def list_opts(): def list_opts():
return [ return [
('DEFAULT', ceilometer.api.app.OPTS), ('DEFAULT', panko.api.app.OPTS),
('api', ('api',
itertools.chain(ceilometer.api.OPTS, itertools.chain(panko.api.OPTS,
ceilometer.api.app.API_OPTS)), panko.api.app.API_OPTS)),
('database', ceilometer.storage.OPTS), ('database', panko.storage.OPTS),
('storage', ceilometer.dispatcher.STORAGE_OPTS), ('storage', panko.dispatcher.STORAGE_OPTS),
] ]

View File

@ -19,8 +19,8 @@ import oslo_i18n
from oslo_log import log from oslo_log import log
from oslo_reports import guru_meditation_report as gmr from oslo_reports import guru_meditation_report as gmr
from ceilometer.conf import defaults from panko.conf import defaults
from ceilometer import version from panko import version
def prepare_service(argv=None, config_files=None): def prepare_service(argv=None, config_files=None):
@ -30,13 +30,13 @@ def prepare_service(argv=None, config_files=None):
if argv is None: if argv is None:
argv = sys.argv argv = sys.argv
cfg.CONF(argv[1:], project='ceilometer', validate_default_values=True, cfg.CONF(argv[1:], project='panko', validate_default_values=True,
version=version.version_info.version_string(), version=version.version_info.version_string(),
default_config_files=config_files) default_config_files=config_files)
log.setup(cfg.CONF, 'ceilometer') log.setup(cfg.CONF, 'panko')
# NOTE(liusheng): guru cannot run with service under apache daemon, so when # NOTE(liusheng): guru cannot run with service under apache daemon, so when
# ceilometer-api running with mod_wsgi, the argv is [], we don't start # panko-api running with mod_wsgi, the argv is [], we don't start
# guru. # guru.
if argv: if argv:
gmr.TextGuruMeditation.setup_autorun(version) gmr.TextGuruMeditation.setup_autorun(version)

View File

@ -76,7 +76,7 @@ def get_connection(url):
# 'dialect+driver'. Handle the case where driver is specified. # 'dialect+driver'. Handle the case where driver is specified.
engine_name = connection_scheme.split('+')[0] engine_name = connection_scheme.split('+')[0]
# NOTE: translation not applied bug #1446983 # NOTE: translation not applied bug #1446983
LOG.debug('looking for %(name)r driver in ceilometer.event.storage', LOG.debug('looking for %(name)r driver in panko.event.storage',
{'name': engine_name}) {'name': engine_name})
mgr = driver.DriverManager('ceilometer.event.storage', engine_name) mgr = driver.DriverManager('panko.event.storage', engine_name)
return mgr.driver(url) return mgr.driver(url)

View File

@ -18,7 +18,7 @@ from oslo_log import log
from oslo_utils import netutils from oslo_utils import netutils
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from ceilometer.storage.hbase import inmemory as hbase_inmemory from panko.storage.hbase import inmemory as hbase_inmemory
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ -33,7 +33,7 @@ class Connection(object):
opts = self._parse_connection_url(url) opts = self._parse_connection_url(url)
if opts['host'] == '__test__': if opts['host'] == '__test__':
url = os.environ.get('CEILOMETER_TEST_HBASE_URL') url = os.environ.get('PANKO_TEST_HBASE_URL')
if url: if url:
# Reparse URL, but from the env variable now # Reparse URL, but from the env variable now
opts = self._parse_connection_url(url) opts = self._parse_connection_url(url)

View File

@ -20,7 +20,7 @@ import re
from oslo_log import log from oslo_log import log
import six import six
import ceilometer import panko
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
@ -112,7 +112,7 @@ class MTable(object):
# in case of multiple filters # in case of multiple filters
rows = m(fargs, rows) rows = m(fargs, rows)
else: else:
raise ceilometer.NotImplementedError( raise panko.NotImplementedError(
"%s filter is not implemented, " "%s filter is not implemented, "
"you may want to add it!") "you may want to add it!")
for k in sorted(rows)[:limit]: for k in sorted(rows)[:limit]:
@ -197,7 +197,7 @@ class MTable(object):
if g == row: if g == row:
r[row] = data r[row] = data
else: else:
raise ceilometer.NotImplementedError( raise panko.NotImplementedError(
"In-memory " "In-memory "
"RowFilter doesn't support " "RowFilter doesn't support "
"the %s operation yet" % op) "the %s operation yet" % op)
@ -234,7 +234,7 @@ class MTable(object):
(is_regex and re.search(value, key))): (is_regex and re.search(value, key))):
r_data[key] = data[key] r_data[key] = data[key]
else: else:
raise ceilometer.NotImplementedError( raise panko.NotImplementedError(
"In-memory QualifierFilter " "In-memory QualifierFilter "
"doesn't support the %s " "doesn't support the %s "
"operation yet" % op) "operation yet" % op)

View File

@ -21,8 +21,8 @@ from happybase.hbase import ttypes
from oslo_log import log from oslo_log import log
import six import six
from ceilometer.i18n import _ from panko.i18n import _
from ceilometer import utils from panko import utils
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)

View File

@ -28,7 +28,7 @@ import pymongo
import pymongo.errors import pymongo.errors
import six import six
from ceilometer.i18n import _, _LI from panko.i18n import _, _LI
ERROR_INDEX_WITH_DIFFERENT_SPEC_ALREADY_EXISTS = 86 ERROR_INDEX_WITH_DIFFERENT_SPEC_ALREADY_EXISTS = 86

View File

@ -11,7 +11,7 @@
# under the License. # under the License.
""" """
SQLAlchemy models for Ceilometer data. SQLAlchemy models for Panko data.
""" """
import json import json
@ -24,7 +24,7 @@ from sqlalchemy.orm import deferred
from sqlalchemy.orm import relationship from sqlalchemy.orm import relationship
from sqlalchemy.types import TypeDecorator from sqlalchemy.types import TypeDecorator
from ceilometer import utils from panko import utils
class JSONEncodedDict(TypeDecorator): class JSONEncodedDict(TypeDecorator):
@ -74,8 +74,8 @@ class PreciseTimestamp(TypeDecorator):
return value return value
class CeilometerBase(object): class PankoBase(object):
"""Base class for Ceilometer Models.""" """Base class for Panko Models."""
__table_args__ = {'mysql_charset': "utf8", __table_args__ = {'mysql_charset': "utf8",
'mysql_engine': "InnoDB"} 'mysql_engine': "InnoDB"}
__table_initialized__ = False __table_initialized__ = False
@ -92,7 +92,7 @@ class CeilometerBase(object):
setattr(self, k, v) setattr(self, k, v)
Base = declarative_base(cls=CeilometerBase) Base = declarative_base(cls=PankoBase)
class EventType(Base): class EventType(Base):

View File

@ -22,7 +22,7 @@ import six
from testtools import testcase from testtools import testcase
import webtest import webtest
import ceilometer import panko
class BaseTestCase(base.BaseTestCase): class BaseTestCase(base.BaseTestCase):
@ -70,7 +70,7 @@ def _skip_decorator(func):
def skip_if_not_implemented(*args, **kwargs): def skip_if_not_implemented(*args, **kwargs):
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except ceilometer.NotImplementedError as e: except panko.NotImplementedError as e:
raise testcase.TestSkipped(six.text_type(e)) raise testcase.TestSkipped(six.text_type(e))
except webtest.app.AppError as e: except webtest.app.AppError as e:
if 'not implemented' in six.text_type(e): if 'not implemented' in six.text_type(e):

View File

@ -28,10 +28,10 @@ from six.moves.urllib import parse as urlparse
import sqlalchemy import sqlalchemy
from testtools import testcase from testtools import testcase
from ceilometer import storage from panko import storage
from ceilometer.tests import base as test_base from panko.tests import base as test_base
try: try:
from ceilometer.tests import mocks from panko.tests import mocks
except ImportError: except ImportError:
mocks = None # happybase module is not Python 3 compatible yet mocks = None # happybase module is not Python 3 compatible yet
@ -63,7 +63,7 @@ class MongoDbManager(fixtures.Fixture):
class SQLManager(fixtures.Fixture): class SQLManager(fixtures.Fixture):
def __init__(self, url): def __init__(self, url):
db_name = 'ceilometer_%s' % uuid.uuid4().hex db_name = 'panko_%s' % uuid.uuid4().hex
engine = sqlalchemy.create_engine(url) engine = sqlalchemy.create_engine(url)
conn = engine.connect() conn = engine.connect()
self._create_database(conn, db_name) self._create_database(conn, db_name)
@ -138,8 +138,8 @@ class HBaseManager(fixtures.Fixture):
def url(self): def url(self):
return '%s?table_prefix=%s&table_prefix_separator=%s' % ( return '%s?table_prefix=%s&table_prefix_separator=%s' % (
self._url, self._url,
os.getenv("CEILOMETER_TEST_HBASE_TABLE_PREFIX", "test"), os.getenv("PANKO_TEST_HBASE_TABLE_PREFIX", "test"),
os.getenv("CEILOMETER_TEST_HBASE_TABLE_PREFIX_SEPARATOR", "_") os.getenv("PANKO_TEST_HBASE_TABLE_PREFIX_SEPARATOR", "_")
) )
@ -185,7 +185,7 @@ class TestBase(test_base.BaseTestCase):
'Test is not applicable for %s' % engine) 'Test is not applicable for %s' % engine)
self.CONF = self.useFixture(fixture_config.Config()).conf self.CONF = self.useFixture(fixture_config.Config()).conf
self.CONF([], project='ceilometer', validate_default_values=True) self.CONF([], project='panko', validate_default_values=True)
manager = self.DRIVER_MANAGERS.get(engine) manager = self.DRIVER_MANAGERS.get(engine)
if not manager: if not manager:
@ -198,7 +198,7 @@ class TestBase(test_base.BaseTestCase):
self.event_conn = self.db_manager.event_connection self.event_conn = self.db_manager.event_connection
self.event_conn.upgrade() self.event_conn.upgrade()
self.useFixture(mockpatch.Patch('ceilometer.storage.get_connection', self.useFixture(mockpatch.Patch('panko.storage.get_connection',
side_effect=self._get_connection)) side_effect=self._get_connection))
def tearDown(self): def tearDown(self):

View File

@ -21,12 +21,12 @@ from oslo_policy import opts
import pecan import pecan
import pecan.testing import pecan.testing
from ceilometer.api import rbac from panko.api import rbac
from ceilometer.tests import db as db_test_base from panko.tests import db as db_test_base
OPT_GROUP_NAME = 'keystone_authtoken' OPT_GROUP_NAME = 'keystone_authtoken'
cfg.CONF.import_group(OPT_GROUP_NAME, "keystonemiddleware.auth_token") cfg.CONF.import_group(OPT_GROUP_NAME, "keystonemiddleware.auth_token")
cfg.CONF.import_group('api', 'ceilometer.api.controllers.v2.root') cfg.CONF.import_group('api', 'panko.api.controllers.v2.root')
class FunctionalTest(db_test_base.TestBase): class FunctionalTest(db_test_base.TestBase):
@ -46,7 +46,7 @@ class FunctionalTest(db_test_base.TestBase):
self.CONF.set_override("auth_version", "v2.0", self.CONF.set_override("auth_version", "v2.0",
group=OPT_GROUP_NAME) group=OPT_GROUP_NAME)
self.CONF.set_override("policy_file", self.CONF.set_override("policy_file",
self.path_get('etc/ceilometer/policy.json'), self.path_get('etc/panko/policy.json'),
group='oslo_policy') group='oslo_policy')
self.app = self._make_app() self.app = self._make_app()
@ -54,8 +54,8 @@ class FunctionalTest(db_test_base.TestBase):
def _make_app(self, enable_acl=False): def _make_app(self, enable_acl=False):
self.config = { self.config = {
'app': { 'app': {
'root': 'ceilometer.api.controllers.root.RootController', 'root': 'panko.api.controllers.root.RootController',
'modules': ['ceilometer.api'], 'modules': ['panko.api'],
'enable_acl': enable_acl, 'enable_acl': enable_acl,
}, },
'wsme': { 'wsme': {

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from ceilometer.tests.functional import api from panko.tests.functional import api
class FunctionalTest(api.FunctionalTest): class FunctionalTest(api.FunctionalTest):

View File

@ -23,9 +23,9 @@ from oslo_utils import fileutils
import six import six
import webtest import webtest
from ceilometer.api import app from panko.api import app
from ceilometer.event.storage import models as ev_model from panko.event.storage import models as ev_model
from ceilometer.tests.functional.api import v2 from panko.tests.functional.api import v2
VALID_TOKEN = uuid.uuid4().hex VALID_TOKEN = uuid.uuid4().hex
VALID_TOKEN2 = uuid.uuid4().hex VALID_TOKEN2 = uuid.uuid4().hex
@ -64,7 +64,7 @@ class TestAPIACL(v2.FunctionalTest):
**params) **params)
def _make_app(self): def _make_app(self):
file_name = self.path_get('etc/ceilometer/api_paste.ini') file_name = self.path_get('etc/panko/api_paste.ini')
self.CONF.set_override("api_paste_config", file_name) self.CONF.set_override("api_paste_config", file_name)
return webtest.TestApp(app.load_app()) return webtest.TestApp(app.load_app())

View File

@ -13,9 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""Test basic ceilometer-api app """Test basic panko-api app
""" """
from ceilometer.tests.functional.api import v2 from panko.tests.functional.api import v2
class TestApiMiddleware(v2.FunctionalTest): class TestApiMiddleware(v2.FunctionalTest):

View File

@ -14,7 +14,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from ceilometer.tests.functional.api import v2 as tests_api from panko.tests.functional.api import v2 as tests_api
class TestCapabilitiesController(tests_api.FunctionalTest): class TestCapabilitiesController(tests_api.FunctionalTest):

View File

@ -19,9 +19,9 @@ import uuid
import webtest.app import webtest.app
from ceilometer.event.storage import models from panko.event.storage import models
from ceilometer.tests import db as tests_db from panko.tests import db as tests_db
from ceilometer.tests.functional.api import v2 from panko.tests.functional.api import v2
USER_ID = uuid.uuid4().hex USER_ID = uuid.uuid4().hex
PROJ_ID = uuid.uuid4().hex PROJ_ID = uuid.uuid4().hex

View File

@ -28,8 +28,8 @@ from oslo_utils import fileutils
import six import six
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from ceilometer.event.storage import models from panko.event.storage import models
from ceilometer import storage from panko import storage
# TODO(chdent): For now only MongoDB is supported, because of easy # TODO(chdent): For now only MongoDB is supported, because of easy
# database name handling and intentional focus on the API, not the # database name handling and intentional focus on the API, not the
@ -57,9 +57,9 @@ class ConfigFixture(fixture.GabbiFixture):
conf = fixture_config.Config().conf conf = fixture_config.Config().conf
self.conf = conf self.conf = conf
self.conf([], project='ceilometer', validate_default_values=True) self.conf([], project='panko', validate_default_values=True)
opts.set_defaults(self.conf) opts.set_defaults(self.conf)
conf.import_group('api', 'ceilometer.api.controllers.v2.root') conf.import_group('api', 'panko.api.controllers.v2.root')
content = ('{"default": ""}') content = ('{"default": ""}')
if six.PY3: if six.PY3:
@ -73,7 +73,7 @@ class ConfigFixture(fixture.GabbiFixture):
conf.set_override( conf.set_override(
'api_paste_config', 'api_paste_config',
os.path.abspath( os.path.abspath(
'ceilometer/tests/functional/gabbi/gabbi_paste.ini') 'panko/tests/functional/gabbi/gabbi_paste.ini')
) )
database_name = '%s-%s' % (db_url, str(uuid.uuid4())) database_name = '%s-%s' % (db_url, str(uuid.uuid4()))

View File

@ -1,6 +1,6 @@
# Ceilometer API WSGI Pipeline # Panko API WSGI Pipeline
# Define the filters that make up the pipeline for processing WSGI requests # Define the filters that make up the pipeline for processing WSGI requests
# Note: This pipeline is PasteDeploy's term rather than Ceilometer's pipeline # Note: This pipeline is PasteDeploy's term rather than Panko's pipeline
# used for processing samples # used for processing samples
# #
# This version is specific for gabbi. It removes support for keystone while # This version is specific for gabbi. It removes support for keystone while
@ -11,7 +11,7 @@
pipeline = cors api-server pipeline = cors api-server
[app:api-server] [app:api-server]
paste.app_factory = ceilometer.api.app:app_factory paste.app_factory = panko.api.app:app_factory
[filter:authtoken] [filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory paste.filter_factory = keystonemiddleware.auth_token:filter_factory
@ -21,4 +21,4 @@ paste.filter_factory = oslo_middleware:RequestId.factory
[filter:cors] [filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = ceilometer oslo_config_project = panko

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""A test module to exercise the Ceilometer API with gabbi """A test module to exercise the Panko API with gabbi
For the sake of exploratory development. For the sake of exploratory development.
""" """
@ -22,8 +22,8 @@ import os
from gabbi import driver from gabbi import driver
from ceilometer.api import app from panko.api import app
from ceilometer.tests.functional.gabbi import fixtures as fixture_module from panko.tests.functional.gabbi import fixtures as fixture_module
TESTS_DIR = 'gabbits' TESTS_DIR = 'gabbits'

View File

@ -13,14 +13,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
"""A module to exercise the Ceilometer API with gabbi with a URL prefix""" """A module to exercise the Panko API with gabbi with a URL prefix"""
import os import os
from gabbi import driver from gabbi import driver
from ceilometer.api import app from panko.api import app
from ceilometer.tests.functional.gabbi import fixtures as fixture_module from panko.tests.functional.gabbi import fixtures as fixture_module
TESTS_DIR = 'gabbits_prefix' TESTS_DIR = 'gabbits_prefix'

Some files were not shown because too many files have changed in this diff Show More