Adding in of component options and using in glance to stop image loading.
Fixing license for pkglist.py.
This commit is contained in:
parent
a957bead5b
commit
ef4a3c5497
@ -5,8 +5,6 @@ supports:
|
|||||||
- ubuntu-oneiric
|
- ubuntu-oneiric
|
||||||
- fedora-16
|
- fedora-16
|
||||||
options:
|
options:
|
||||||
glance:
|
|
||||||
- load-images
|
|
||||||
components:
|
components:
|
||||||
- db
|
- db
|
||||||
- rabbit-mq
|
- rabbit-mq
|
||||||
|
@ -187,6 +187,7 @@ class GlanceRuntime(comp.PythonRuntime):
|
|||||||
comp.PythonRuntime.__init__(self, *args, **kargs)
|
comp.PythonRuntime.__init__(self, *args, **kargs)
|
||||||
self.cfg_dir = sh.joinpths(self.app_dir, CONFIG_DIR)
|
self.cfg_dir = sh.joinpths(self.app_dir, CONFIG_DIR)
|
||||||
self.bin_dir = sh.joinpths(self.app_dir, BIN_DIR)
|
self.bin_dir = sh.joinpths(self.app_dir, BIN_DIR)
|
||||||
|
self.options = kargs.get('options', set())
|
||||||
|
|
||||||
def known_subsystems(self):
|
def known_subsystems(self):
|
||||||
return SUB_TO_APP.keys()
|
return SUB_TO_APP.keys()
|
||||||
@ -205,8 +206,11 @@ class GlanceRuntime(comp.PythonRuntime):
|
|||||||
|
|
||||||
def post_start(self):
|
def post_start(self):
|
||||||
comp.PythonRuntime.post_start(self)
|
comp.PythonRuntime.post_start(self)
|
||||||
# Install any images that need activating...
|
if 'no-load-images' in self.options:
|
||||||
# TODO: make this less cheesy - need to wait till glance goes online
|
pass
|
||||||
LOG.info("Waiting %s seconds so that glance can start up before image install." % (WAIT_ONLINE_TO))
|
else:
|
||||||
sh.sleep(WAIT_ONLINE_TO)
|
# Install any images that need activating...
|
||||||
creator.ImageCreationService(self.cfg, self.pw_gen).install()
|
# TODO: make this less cheesy - need to wait till glance goes online
|
||||||
|
LOG.info("Waiting %s seconds so that glance can start up before image install." % (WAIT_ONLINE_TO))
|
||||||
|
sh.sleep(WAIT_ONLINE_TO)
|
||||||
|
creator.ImageCreationService(self.cfg, self.pw_gen).install()
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
|
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
|
||||||
|
# Copyright (C) 2012 New Dream Network, LLC (DreamHost) All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
from devstack import component
|
from devstack import component
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ class ActionRunner(object):
|
|||||||
def _construct_instances(self, persona, action, root_dir):
|
def _construct_instances(self, persona, action, root_dir):
|
||||||
components = persona.wanted_components
|
components = persona.wanted_components
|
||||||
desired_subsystems = persona.wanted_subsystems or dict()
|
desired_subsystems = persona.wanted_subsystems or dict()
|
||||||
|
component_opts = persona.component_options or dict()
|
||||||
instances = dict()
|
instances = dict()
|
||||||
for c in components:
|
for c in components:
|
||||||
(cls, my_info) = self.distro.extract_component(c, action)
|
(cls, my_info) = self.distro.extract_component(c, action)
|
||||||
@ -167,6 +168,7 @@ class ActionRunner(object):
|
|||||||
cls_kvs['name'] = c
|
cls_kvs['name'] = c
|
||||||
cls_kvs['keep_old'] = self.keep_old
|
cls_kvs['keep_old'] = self.keep_old
|
||||||
cls_kvs['desired_subsystems'] = set(desired_subsystems.get(c, list()))
|
cls_kvs['desired_subsystems'] = set(desired_subsystems.get(c, list()))
|
||||||
|
cls_kvs['options'] = set(component_opts.get(c, list()))
|
||||||
# The above is not overrideable...
|
# The above is not overrideable...
|
||||||
for (k, v) in my_info.items():
|
for (k, v) in my_info.items():
|
||||||
if k not in cls_kvs:
|
if k not in cls_kvs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user