Rename api directory to rest

Change-Id: I91773fda0f937e4f1c1f01a7545f77e9f64993c0
This commit is contained in:
liyingjun 2014-06-05 12:05:26 +08:00
parent e973ced371
commit e1c555c7cf
10 changed files with 55 additions and 30 deletions

View File

@ -123,19 +123,6 @@
# Path to CA server cetrificate for SSL
#https_cacert=<None>
[api]
#
# Options defined in rally.api
#
# The port for the Rally API server (integer value)
#port=8877
# The listen IP for the Rally API server (string value)
#host=0.0.0.0
[benchmark]
#
@ -188,6 +175,31 @@
#glance_image_delete_poll_interval=1.0
#
# Options defined in rally.benchmark.scenarios.heat.utils
#
# Time to sleep after creating a resource before polling for
# it status (floating point value)
#heat_stack_create_prepoll_delay=2.0
# Time to wait for heat stack to be created. (floating point
# value)
#heat_stack_create_timeout=3600.0
# Interval between checks when waiting for stack creation.
# (floating point value)
#heat_stack_create_poll_interval=1.0
# Time to wait for heat stack to be deleted. (floating point
# value)
#heat_stack_delete_timeout=3600.0
# Interval between checks when waiting for stack deletion.
# (floating point value)
#heat_stack_delete_poll_interval=1.0
#
# Options defined in rally.benchmark.scenarios.nova.utils
#
@ -401,13 +413,26 @@
# Options defined in rally.verification.verifiers.tempest.config
#
# Version of cirros image
# Version of cirros image (string value)
#cirros_version=0.3.2
# Cirros image name
# Cirros image name (string value)
#cirros_image=cirros-0.3.2-x86_64-disk.img
[rest]
#
# Options defined in rally.aas.rest
#
# The port for the Rally API server (integer value)
#port=8877
# The listen IP for the Rally API server (string value)
#host=0.0.0.0
[users_context]
#

View File

@ -16,7 +16,7 @@
from oslo.config import cfg
API_SERVICE_OPTS = [
REST_SERVICE_OPTS = [
cfg.IntOpt('port',
default=8877,
help='The port for the Rally API server',
@ -26,10 +26,10 @@ API_SERVICE_OPTS = [
help='The listen IP for the Rally API server',
),
]
API_OPT_GROUP = cfg.OptGroup(name='api',
REST_OPT_GROUP = cfg.OptGroup(name='rest',
title='Options for the openstack-rally-api '
'service')
CONF = cfg.CONF
CONF.register_group(API_OPT_GROUP)
CONF.register_opts(API_SERVICE_OPTS, API_OPT_GROUP)
CONF.register_group(REST_OPT_GROUP)
CONF.register_opts(REST_SERVICE_OPTS, REST_OPT_GROUP)

View File

@ -36,8 +36,8 @@ def setup_app(config):
def make_app():
config = {
'app': {
'root': 'rally.api.controllers.root.RootController',
'modules': ['rally.api'],
'root': 'rally.aas.rest.controllers.root.RootController',
'modules': ['rally.aas.rest'],
'debug': CONF.debug,
},
'wsme': {

View File

View File

@ -17,8 +17,8 @@ from pecan import rest
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from rally.api.controllers import v1
from rally.api import types
from rally.aas.rest.controllers import v1
from rally.aas.rest import types
class Root(wtypes.Base):

View File

@ -13,4 +13,4 @@
# License for the specific language governing permissions and limitations
# under the License.
from rally.api.controllers.v1.root import Controller # noqa
from rally.aas.rest.controllers.v1.root import Controller # noqa

View File

@ -16,7 +16,7 @@
from pecan import rest
import wsmeext.pecan as wsme_pecan
from rally.api import types
from rally.aas.rest import types
class Version(types.Version):

View File

@ -22,7 +22,7 @@ from wsgiref import simple_server
from oslo.config import cfg
from rally.api import app as rally_app
from rally.aas.rest import app as rally_app
from rally.openstack.common.gettextutils import _ # noqa
from rally.openstack.common import log
@ -36,8 +36,8 @@ def main():
CONF(sys.argv[1:], project='rally')
log.setup('rally')
# Prepare application and bind to the service socket.
host = CONF.api.host
port = CONF.api.port
host = CONF.rest.host
port = CONF.rest.port
app = rally_app.make_app()
server = simple_server.make_server(host, port, app)
# Start application.