fix the config

This commit is contained in:
Craig Vyvial 2012-03-07 22:04:44 -06:00
parent 484ec68acc
commit 5141898cc0
6 changed files with 20 additions and 23 deletions

View File

@ -50,7 +50,7 @@ curl -d '{"auth":{"passwordCredentials":{"username": "reddwarf", "password": "RE
# Also note that keystone uses the tenant id now and _not_ the name
# curl -H"X-Auth-Token:$REDDWARF_TOKEN" http://0.0.0.0:8779/v0.1/$REDDWARF_TENANT/instances
# curl -H"Content-type:application/json" -H"X-Auth-Token:$REDDWARF_TOKEN" \
http://0.0.0.0:8779/v0.1/$REDDWARF_TENANT/instances -d '{"name":"my_test","flavor":"1"}'
# http://0.0.0.0:8779/v0.1/$REDDWARF_TENANT/instances -d '{"name":"my_test","flavor":"1"}'
# update the etc/reddwarf/reddwarf.conf.sample
# add this config setting
@ -73,7 +73,7 @@ curl -d '{"auth":{"passwordCredentials":{"username": "reddwarf", "password": "RE
# add the image to the reddwarf database
# get the image id from glance
# glance index -A $REDDWARF_TOKEN
# REDDWARF_IMAGE_ID=a92615d7-a8ba-45ff-b29f-ec2baf6b8348
# (sqlite)
# sqlite3 ../../reddwarf_test.sqlite
# insert into service_images values ('a92615d7-a8ba-45ff-b29f-ec2baf6b8348','database', 'a92615d7-a8ba-45ff-b29f-ec2baf6b8348');
# sqlite3 reddwarf_test.sqlite "insert into service_images values ('$REDDWARF_IMAGE_ID','database', '$REDDWARF_IMAGE_ID');"

View File

@ -44,7 +44,7 @@ reddwarf_proxy_admin_user = admin
reddwarf_proxy_admin_pass = 3de4922d8b6ac5a1aad9
reddwarf_proxy_admin_tenant_name = admin
reddwarf_auth_url = http://0.0.0.0:5000/v2.0
reddwarf_tenant_id = configfile
reddwarf_tenant_id = 60fdac4a02aa4a8e87d772c61081b16a
# ============ notifer queue kombu connection options ========================

View File

@ -44,9 +44,6 @@ class Config(object):
@classmethod
def get(cls, key, default=None):
print cls
print key
print default
return cls.instance.get(key, default)
@classmethod

View File

@ -31,16 +31,6 @@ from novaclient import exceptions as nova_exceptions
CONFIG = config.Config
LOG = logging.getLogger('reddwarf.database.models')
PROXY_ADMIN_USER = CONFIG.get('reddwarf_proxy_admin_user', 'admin')
PROXY_ADMIN_PASS = CONFIG.get('reddwarf_proxy_admin_pass',
'3de4922d8b6ac5a1aad9')
PROXY_ADMIN_TENANT_NAME = CONFIG.get('reddwarf_proxy_admin_tenant_name',
'admin')
PROXY_AUTH_URL = CONFIG.get('reddwarf_auth_url', 'http://0.0.0.0:5000/v2.0')
PROXY_TENANT_ID = CONFIG.get('reddwarf_tenant_id',
'60fdac4a02aa4a8e87d772c61081b16a')
print "PROXY_TENANT_ID : %s" % PROXY_TENANT_ID
class ModelBase(object):
@ -87,6 +77,18 @@ class RemoteModelBase(ModelBase):
@classmethod
def get_client(cls, proxy_token):
PROXY_ADMIN_USER = CONFIG.get('reddwarf_proxy_admin_user', 'admin')
PROXY_ADMIN_PASS = CONFIG.get('reddwarf_proxy_admin_pass',
'3de4922d8b6ac5a1aad9')
PROXY_ADMIN_TENANT_NAME = CONFIG.get(
'reddwarf_proxy_admin_tenant_name',
'admin')
PROXY_AUTH_URL = CONFIG.get('reddwarf_auth_url',
'http://0.0.0.0:5000/v2.0')
PROXY_TENANT_ID = CONFIG.get('reddwarf_tenant_id',
'aaaaaaaaaaaaaaaaaaaaaaa')
print "PROXY_TENANT_ID : %s" % PROXY_TENANT_ID
client = Client(PROXY_ADMIN_USER, PROXY_ADMIN_PASS,
PROXY_ADMIN_TENANT_NAME, PROXY_AUTH_URL,
proxy_tenant_id=PROXY_TENANT_ID,

View File

@ -19,13 +19,13 @@ import logging
import routes
import webob.exc
#TODO(cp16et) need to remove all novaclient references from the service
from novaclient import exceptions
from reddwarf.common import wsgi
from reddwarf import rpc
from reddwarf.common import config
from reddwarf.common import context
from reddwarf.common import exception
from reddwarf.common import wsgi
from reddwarf.database import models
from reddwarf.database import views
from reddwarf.common import exception
CONFIG = config.Config
LOG = logging.getLogger('reddwarf.database.service')

View File

@ -317,8 +317,6 @@ def load_paste_app(app_name, options, args, config_dir=None):
def get_option(options, option, **kwargs):
print __name__
print options
if option in options:
value = options[option]
type_ = kwargs.get('type', 'str')