Merge "Fix broken jobs in V1 API gates"
This commit is contained in:
commit
1aac788c81
27
.zuul.yaml
27
.zuul.yaml
@ -234,8 +234,26 @@
|
||||
Multinodes job for SOL devstack-based functional tests for vnflcm
|
||||
host-vars:
|
||||
controller-tacker:
|
||||
devstack_local_conf:
|
||||
post-config:
|
||||
$TACKER_CONF:
|
||||
database:
|
||||
max_pool_size: 0
|
||||
tox_envlist: dsvm-functional-sol-vnflcm
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: tacker-functional-devstack-multinode-sol-vnflcm-userdata
|
||||
parent: tacker-functional-devstack-multinode-sol-parent
|
||||
description: |
|
||||
Multinodes job for SOL devstack-based functional tests for vnflcm with userdata
|
||||
host-vars:
|
||||
controller-tacker:
|
||||
devstack_local_conf:
|
||||
post-config:
|
||||
$TACKER_CONF:
|
||||
database:
|
||||
max_pool_size: 0
|
||||
tox_envlist: dsvm-functional-sol-vnflcm-userdata
|
||||
|
||||
- job:
|
||||
name: tacker-functional-devstack-multinode-sol-vnfpkgm
|
||||
@ -599,8 +617,12 @@
|
||||
Multinodes job for SOL Kubernetes Multi tenant devstack-based functional tests
|
||||
host-vars:
|
||||
controller-tacker:
|
||||
devstack_local_conf:
|
||||
post-config:
|
||||
$TACKER_CONF:
|
||||
database:
|
||||
max_pool_size: 0
|
||||
tox_envlist: dsvm-functional-sol-kubernetes
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: tacker-functional-devstack-multinode-sol-kubernetes-multi-tenant
|
||||
@ -832,6 +854,7 @@
|
||||
jobs:
|
||||
- tacker-functional-devstack-multinode-sol-legacy-nfvo
|
||||
- tacker-functional-devstack-multinode-sol-vnflcm
|
||||
- tacker-functional-devstack-multinode-sol-vnflcm-userdata
|
||||
- tacker-functional-devstack-multinode-sol-vnfpkgm
|
||||
- tacker-functional-devstack-multinode-sol-separated-nfvo
|
||||
- tacker-functional-devstack-multinode-sol-kubernetes
|
||||
|
@ -204,10 +204,7 @@ class ViewBuilder(base.BaseViewBuilder):
|
||||
|
||||
def _basic_subscription_info(self, vnf_lcm_subscription, filter=None):
|
||||
def key_exists(obj, key):
|
||||
# NOTE(ueha): Check `row.LegacyRow` type for back compatibility
|
||||
# of oslo.db<15.0.0 environment.
|
||||
if (isinstance(obj, LccnSubscriptionRequest) or
|
||||
isinstance(obj, row.LegacyRow)):
|
||||
if isinstance(obj, LccnSubscriptionRequest):
|
||||
return key in vnf_lcm_subscription
|
||||
elif isinstance(obj, row.Row):
|
||||
return key in vnf_lcm_subscription._mapping
|
||||
|
@ -89,13 +89,8 @@ oslo_messaging.set_transport_defaults(control_exchange='tacker')
|
||||
|
||||
|
||||
def set_db_defaults():
|
||||
# Update the default QueuePool parameters. These can be tweaked by the
|
||||
# conf variables - max_pool_size, max_overflow and pool_timeout
|
||||
db_options.set_defaults(
|
||||
cfg.CONF,
|
||||
connection='sqlite://',
|
||||
max_pool_size=10,
|
||||
max_overflow=20, pool_timeout=10)
|
||||
# Call to register `database` option to cfg.CONF
|
||||
db_options.set_defaults(cfg.CONF)
|
||||
|
||||
|
||||
set_db_defaults()
|
||||
|
@ -384,11 +384,11 @@ class BaseVnfLcmTest(base.BaseTackerTest):
|
||||
return image
|
||||
|
||||
@classmethod
|
||||
def _create_glance_image(cls, image_data, file_url, glance_client=None):
|
||||
def _create_glance_image(cls, image_props, image_data, glance_client=None):
|
||||
if glance_client is None:
|
||||
glance_client = cls.glance_client
|
||||
image = glance_client.images.create(**image_data)
|
||||
glance_client.images.upload(image.id, file_url)
|
||||
image = glance_client.images.create(**image_props)
|
||||
glance_client.images.upload(image.id, image_data)
|
||||
|
||||
return image.id
|
||||
|
||||
|
@ -32,7 +32,7 @@ VNF_TERMINATE_TIMEOUT = 600
|
||||
VNF_HEAL_TIMEOUT = 600
|
||||
VNF_CHANGE_EXT_CONN_TIMEOUT = 600
|
||||
RETRY_WAIT_TIME = 5
|
||||
WAIT_HEAL = 20 # Time to wait until heal op is completed in sec.
|
||||
WAIT_HEAL = 60 # Time to wait until heal op is completed in sec.
|
||||
|
||||
|
||||
def get_ext_managed_virtual_link(id, vl_desc_id, resource_id):
|
||||
@ -942,8 +942,7 @@ class VnfLcmTest(base.BaseTackerTest):
|
||||
# vnfcResourceInfo after the stack status becomes UPDATE_COMPLETE.
|
||||
# There is no intermediate status set to VNF which can be used here
|
||||
# to confirm healing action is completed successfully.
|
||||
# NOTE(yasufum): add extra 20 sec to avoid timeout.
|
||||
time.sleep(WAIT_HEAL + 25)
|
||||
time.sleep(WAIT_HEAL)
|
||||
|
||||
vnf_instance_current = self._show_vnf_instance(vnf_instance['id'])
|
||||
self._verify_vnfc_resource_info(vnf_instance, vnf_instance_current, 3)
|
||||
|
@ -36,7 +36,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
||||
# ModifyVNF specific image create.
|
||||
for image in images:
|
||||
specific_image_name = image.name + '2'
|
||||
image_data = {
|
||||
image_props = {
|
||||
"min_disk": image.min_disk,
|
||||
"min_ram": image.min_ram,
|
||||
"disk_format": image.disk_format,
|
||||
@ -55,7 +55,8 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
||||
with tempfile.TemporaryFile('w+b') as f:
|
||||
for content in body:
|
||||
f.write(content)
|
||||
cls._create_glance_image(image_data, f.read())
|
||||
f.seek(0)
|
||||
cls._create_glance_image(image_props, f)
|
||||
except Exception as e:
|
||||
print("Fail, Modify-VNF specific image create.", e, flush=True)
|
||||
cls.is_setup_error = True
|
@ -56,7 +56,7 @@ class VnfLcmWithMultiTenant(base.BaseVnfLcmMultiTenantTest):
|
||||
|
||||
for image in images:
|
||||
specific_image_name = f'{image.name}{2}'
|
||||
image_data = {
|
||||
image_props = {
|
||||
"min_disk": image.min_disk,
|
||||
"min_ram": image.min_ram,
|
||||
"disk_format": image.disk_format,
|
||||
@ -75,7 +75,8 @@ class VnfLcmWithMultiTenant(base.BaseVnfLcmMultiTenantTest):
|
||||
with tempfile.TemporaryFile('w+b') as f:
|
||||
for content in body:
|
||||
f.write(content)
|
||||
cls._create_glance_image(image_data, f.read())
|
||||
f.seek(0)
|
||||
cls._create_glance_image(image_props, f)
|
||||
except Exception as e:
|
||||
print("Fail, Modify-VNF specific image create.", e, flush=True)
|
||||
is_setup_error = True
|
||||
|
@ -15,12 +15,18 @@
|
||||
|
||||
import fixtures
|
||||
|
||||
from tacker.common import config
|
||||
from oslo_db import options as db_options
|
||||
|
||||
import tacker.conf
|
||||
from tacker.db import api as db_api
|
||||
from tacker.db import model_base
|
||||
from tacker.tests.unit import base
|
||||
|
||||
|
||||
CONF = tacker.conf.CONF
|
||||
db_options.set_defaults(CONF, connection='sqlite://')
|
||||
|
||||
|
||||
class SqlFixture(fixtures.Fixture):
|
||||
|
||||
# flag to indicate that the models have been loaded
|
||||
@ -46,6 +52,5 @@ class SqlFixture(fixtures.Fixture):
|
||||
class SqlTestCase(base.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
config.set_db_defaults()
|
||||
super(SqlTestCase, self).setUp()
|
||||
self.useFixture(SqlFixture())
|
||||
|
6
tox.ini
6
tox.ini
@ -45,6 +45,12 @@ setenv = {[testenv]setenv}
|
||||
commands =
|
||||
stestr --test-path=./tacker/tests/functional/sol/vnflcm run --slowest --concurrency 1 {posargs}
|
||||
|
||||
[testenv:dsvm-functional-sol-vnflcm-userdata]
|
||||
setenv = {[testenv]setenv}
|
||||
|
||||
commands =
|
||||
stestr --test-path=./tacker/tests/functional/sol/vnflcm_userdata run --slowest --concurrency 1 {posargs}
|
||||
|
||||
[testenv:dsvm-functional-sol-vnfpkgm]
|
||||
setenv = {[testenv]setenv}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user