Consolidate configuration some more
This commit is contained in:
@@ -28,6 +28,10 @@ port = 8774
|
||||
apiver = v1.1
|
||||
user = admin
|
||||
key = 24BD8F71-6AD8-439D-B722-7E2E25FD1911
|
||||
ssh_timeout = 300
|
||||
build_timeout = 300
|
||||
flavor_ref = 1
|
||||
flavor_ref_alt = 2
|
||||
|
||||
[keystone]
|
||||
host = 10.0.0.100
|
||||
|
||||
@@ -117,6 +117,10 @@ class FunctionalTest(unittest2.TestCase):
|
||||
self.nova['ver'] = self.config['nova']['apiver']
|
||||
self.nova['user'] = self.config['nova']['user']
|
||||
self.nova['key'] = self.config['nova']['key']
|
||||
self.nova['flavor_ref'] = self.config['nova']['flavor_ref']
|
||||
self.nova['flavor_ref_alt'] = self.config['nova']['flavor_ref_alt']
|
||||
self.nova['ssh_timeout'] = self.config['nova']['ssh_timeout']
|
||||
self.nova['build_timeout'] = self.config['nova']['build_timeout']
|
||||
|
||||
if 'keystone' in self.config:
|
||||
self.keystone['host'] = self.config['keystone']['host']
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
|
||||
from kong import openstack
|
||||
from kong import tests
|
||||
@@ -44,8 +45,6 @@ class FlavorsTest(tests.FunctionalTest):
|
||||
actual_links = flavor['links']
|
||||
|
||||
flavor_id = str(flavor['id'])
|
||||
host = self.os.config.nova.host
|
||||
port = self.os.config.nova.port
|
||||
mgmt_url = self.os.nova.management_url
|
||||
bmk_url = re.sub(r'v1.1\/', r'', mgmt_url)
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ class ServerActionsTest(tests.FunctionalTest):
|
||||
super(ServerActionsTest, self).setUp()
|
||||
self.os = openstack.Manager(self.nova)
|
||||
|
||||
self.image_ref = self.os.config.env.image_ref
|
||||
self.image_ref_alt = self.os.config.env.image_ref_alt
|
||||
self.flavor_ref = self.os.config.env.flavor_ref
|
||||
self.flavor_ref_alt = self.os.config.env.flavor_ref_alt
|
||||
self.ssh_timeout = self.os.config.nova.ssh_timeout
|
||||
self.build_timeout = self.os.config.nova.build_timeout
|
||||
self.image_ref = self.glance['image_id']
|
||||
# self.image_ref_alt = self.os.config.env.image_ref_alt
|
||||
self.flavor_ref = self.nova['flavor_ref']
|
||||
self.flavor_ref_alt = self.nova['flavor_ref_alt']
|
||||
self.ssh_timeout = self.nova['ssh_timeout']
|
||||
self.build_timeout = self.nova['build_timeout']
|
||||
|
||||
self.server_password = 'testpwd'
|
||||
self.server_name = 'stacktester1'
|
||||
@@ -156,6 +156,7 @@ class ServerActionsTest(tests.FunctionalTest):
|
||||
self._assert_ssh_password('test123')
|
||||
test_change_server_password.tags = ['nova']
|
||||
|
||||
@tests.skip("rebuild test needs alternate image, but we only have one")
|
||||
def test_rebuild(self):
|
||||
"""Rebuild a server"""
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ class ServersTest(tests.FunctionalTest):
|
||||
def setUp(self):
|
||||
super(ServersTest, self).setUp()
|
||||
self.os = openstack.Manager(self.nova)
|
||||
self.image_ref = self.os.config.env.image_ref
|
||||
self.flavor_ref = self.os.config.env.flavor_ref
|
||||
self.ssh_timeout = self.os.config.nova.ssh_timeout
|
||||
self.build_timeout = self.os.config.nova.build_timeout
|
||||
self.image_ref = self.glance['image_id']
|
||||
self.flavor_ref = self.nova['flavor_ref']
|
||||
self.ssh_timeout = self.nova['ssh_timeout']
|
||||
self.build_timeout = self.nova['build_timeout']
|
||||
|
||||
def _assert_server_entity(self, server):
|
||||
actual_keys = set(server.keys())
|
||||
@@ -43,16 +43,16 @@ class ServersTest(tests.FunctionalTest):
|
||||
self.assertTrue(expected_keys <= actual_keys)
|
||||
|
||||
server_id = str(server['id'])
|
||||
host = self.os.config.nova.host
|
||||
port = self.os.config.nova.port
|
||||
host = self.nova['host']
|
||||
port = self.nova['port']
|
||||
api_url = '%s:%s' % (host, port)
|
||||
base_url = os.path.join(api_url, self.os.config.nova.base_url)
|
||||
base_url = os.path.join(api_url, self.nova['apiver'])
|
||||
|
||||
self_link = 'http://' + os.path.join(base_url,
|
||||
self.os.config.nova.project_id,
|
||||
# self.os.config.nova.project_id,
|
||||
'servers', server_id)
|
||||
bookmark_link = 'http://' + os.path.join(api_url,
|
||||
self.os.config.nova.project_id,
|
||||
# self.os.config.nova.project_id,
|
||||
'servers', server_id)
|
||||
|
||||
expected_links = [
|
||||
|
||||
Reference in New Issue
Block a user