Move constants to glance_utils

This commit is contained in:
Andres Rodriguez 2013-07-10 13:42:31 -04:00
parent 999904f47e
commit 0aaf0853b6
2 changed files with 22 additions and 16 deletions

View File

@ -9,11 +9,15 @@ from glance_utils import (
migrate_database,
register_configs,
restart_map,
set_ceph_env_variables)
set_ceph_env_variables,
CLUSTER_RES,
PACKAGES,
SERVICES,
CHARM,
SERVICE_NAME, )
from charmhelpers.core.hookenv import (
log as juju_log,
service_name,
relation_set,
relation_ids,
unit_get)
@ -46,21 +50,8 @@ from subprocess import (
from commands import getstatusoutput
CLUSTER_RES = "res_glance_vip"
CONFIGS = register_configs()
PACKAGES = [
"apache2", "glance", "python-mysqldb", "python-swift",
"python-keystone", "uuid", "haproxy", ]
SERVICES = [
"glance-api", "glance-registry", ]
CHARM = "glance"
SERVICE_NAME = service_name()
config = json.loads(check_output(['config-get', '--format=json']))

View File

@ -12,7 +12,8 @@ from collections import OrderedDict
from charmhelpers.core.hookenv import (
relation_get,
relation_ids,
related_units, )
related_units,
service_name, )
from charmhelpers.contrib.openstack import (
templating,
@ -32,6 +33,20 @@ from charmhelpers.contrib.openstack.openstack_utils import (
get_os_codename_package,
configure_installation_source, )
CONFIGS = register_configs()
CLUSTER_RES = "res_glance_vip"
PACKAGES = [
"apache2", "glance", "python-mysqldb", "python-swift",
"python-keystone", "uuid", "haproxy", ]
SERVICES = [
"glance-api", "glance-registry", ]
CHARM = "glance"
SERVICE_NAME = service_name()
GLANCE_REGISTRY_CONF = "/etc/glance/glance-registry.conf"
GLANCE_REGISTRY_PASTE_INI = "/etc/glance/glance-registry-paste.ini"
GLANCE_API_CONF = "/etc/glance/glance-api.conf"