Fix issues with tests
Some fixes were needed to make sure the ipa client code was accessing the right config parameters for connect_retries and keytab. Also, more attributes needed to be added to the flavors to make the enrollment tests successful. This prevents nova returning No Valid Host available errors. Change-Id: I018a2dd8f3de9598e19394ea2b3f0a0bfdf4c669
This commit is contained in:
parent
025f6d7d83
commit
67b6aa37a8
|
@ -27,6 +27,9 @@ novajoin_group = cfg.OptGroup(
|
||||||
title="Novajoin test plugin settings")
|
title="Novajoin test plugin settings")
|
||||||
|
|
||||||
NovajoinGroup = [
|
NovajoinGroup = [
|
||||||
|
cfg.IntOpt('connect_retries',
|
||||||
|
default=1,
|
||||||
|
help='Number of connection attempts to IPA'),
|
||||||
cfg.StrOpt('flavor_tag',
|
cfg.StrOpt('flavor_tag',
|
||||||
default='vm',
|
default='vm',
|
||||||
help='Flavor tag to use in novajoin enrollment tests'),
|
help='Flavor tag to use in novajoin enrollment tests'),
|
||||||
|
|
|
@ -40,18 +40,11 @@ LOG = logging.getLogger(__name__)
|
||||||
class IPABase(object):
|
class IPABase(object):
|
||||||
|
|
||||||
def __init__(self, backoff=0):
|
def __init__(self, backoff=0):
|
||||||
try:
|
|
||||||
self.ntries = CONF.connect_retries
|
|
||||||
except cfg.NoSuchOptError:
|
|
||||||
self.ntries = 1
|
|
||||||
if not ipalib_imported:
|
if not ipalib_imported:
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
self.ntries = CONF.novajoin.connect_retries
|
||||||
self.keytab = CONF.keytab
|
self.keytab = CONF.novajoin.keytab
|
||||||
except cfg.NoSuchOptError:
|
|
||||||
self.keytab = '/etc/novajoin/krb5.keytab'
|
|
||||||
|
|
||||||
with open(self.keytab):
|
with open(self.keytab):
|
||||||
pass # Throw a nicer exception if krb5.keytab does not exist
|
pass # Throw a nicer exception if krb5.keytab does not exist
|
||||||
|
|
||||||
|
|
|
@ -29,17 +29,24 @@ NETWORK = 'ctlplane'
|
||||||
FLAVORS = {
|
FLAVORS = {
|
||||||
'baremetal': {'ram': 4096,
|
'baremetal': {'ram': 4096,
|
||||||
'vcpus': 3,
|
'vcpus': 3,
|
||||||
'disk': 30,
|
'disk': 38,
|
||||||
'specs': {
|
'specs': {
|
||||||
"capabilities:boot_option": "local",
|
"capabilities:boot_option": "local",
|
||||||
|
"cpu_arch": "x86_64",
|
||||||
"capabilities:profile": "ironic",
|
"capabilities:profile": "ironic",
|
||||||
"resources:CUSTOM_IRONIC": '1'}},
|
"resources:CUSTOM_IRONIC": '1',
|
||||||
|
"resources:DISK_GB": '0',
|
||||||
|
"resources:MEMORY_MB": '0',
|
||||||
|
"resources:VCPU": '0'}},
|
||||||
'vm': {'ram': 4096,
|
'vm': {'ram': 4096,
|
||||||
'vcpus': 1,
|
'vcpus': 1,
|
||||||
'disk': 40,
|
'disk': 40,
|
||||||
'specs': {
|
'specs': {
|
||||||
"capabilities:boot_option": "local",
|
"capabilities:boot_option": "local",
|
||||||
"capabilities:profile": "compute"}}
|
"capabilities:profile": "compute",
|
||||||
|
"resources:DISK_GB": '0',
|
||||||
|
"resources:MEMORY_MB": '0',
|
||||||
|
"resources:VCPU": '0'}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue