]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat api : add register_api_opts to init.py
authorSteven Hardy <shardy@redhat.com>
Thu, 31 Jan 2013 15:41:16 +0000 (15:41 +0000)
committerSteven Hardy <shardy@redhat.com>
Thu, 31 Jan 2013 15:41:16 +0000 (15:41 +0000)
Add register_api_opts to api/__init__.py, slightly simplifying
the api executables, and also solving an issue with some tests
which were not working via nosetests -s due to the required
options not being registered in cfg.CONF

Change-Id: I70b16aae1f73f72518013dbcda37defa79fc5649
Signed-off-by: Steven Hardy <shardy@redhat.com>
bin/heat-api
bin/heat-api-cfn
bin/heat-api-cloudwatch
heat/api/__init__.py

index 854626431e9862c0e0ce35ef450fbc5a8c870474..521628762a7b2d10a8d67be7e13e069d39ff7034 100755 (executable)
@@ -46,7 +46,6 @@ if __name__ == '__main__':
     try:
         cfg.CONF(project='heat', prog='heat-api')
         config.setup_logging()
-        config.register_api_opts()
 
         app = config.load_paste_app()
 
index 58ef037182c3491051ce0e833d7302338d6c5783..81f8fa5426ca1247ce8f710a61b1d348b5085158 100755 (executable)
@@ -48,7 +48,6 @@ if __name__ == '__main__':
     try:
         cfg.CONF(project='heat', prog='heat-api-cfn')
         config.setup_logging()
-        config.register_api_opts()
 
         app = config.load_paste_app()
 
index 2437abe8313490ae35dd0c19b1ce8d47ef432bff..edb98ebe4b5b723d208186502aac69c2f6d58d32 100755 (executable)
@@ -48,7 +48,6 @@ if __name__ == '__main__':
     try:
         cfg.CONF(project='heat', prog='heat-api-cloudwatch')
         config.setup_logging()
-        config.register_api_opts()
 
         app = config.load_paste_app()
 
index e8e403594152912bed8c5a341795ba08bf925d34..de94140f3086dbea6b95d6f84ad69766177c4304 100644 (file)
@@ -12,3 +12,7 @@
 #    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 heat.common import config
+
+config.register_api_opts()