Move register_opts from pci to manager module

Follow-up change on [1] that moves the configuration register_opts
directly into manager.py to prevent sysinv.manager from ending up
attempting to run register_opts twice in cases where the pci modulee is
imported several times.

[1] https://review.opendev.org/c/starlingx/config/+/872979

TEST PLAN:
PASS - Build sysinv*.deb packages
PASS - Bootstrap an AIO-SX system with new package

Story: 2010317
Task: 46389

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: Ib583f43b5cc612932c1aad9cff1f81d9f9cd294c
This commit is contained in:
Thales Elero Cervi 2023-02-22 13:47:27 -03:00
parent 7e47a0f133
commit 1e4c529e53
2 changed files with 7 additions and 8 deletions

View File

@ -96,9 +96,16 @@ audit_intervals_opts = [
cfg.IntOpt('lldp_audit', default=300)
]
dpdk_opts = [
cfg.StrOpt('dpdk_elf',
default='/usr/sbin/ovs-vswitchd',
help='DPDK ELF file used for compatibility checks'),
]
CONF = cfg.CONF
CONF.register_opts(agent_opts, 'agent')
CONF.register_opts(audit_intervals_opts, 'agent_periodic_task_intervals')
CONF.register_opts(dpdk_opts, 'dpdk')
MAXSLEEP = 600 # 10 minutes

View File

@ -24,15 +24,7 @@ from sysinv.common import constants
from sysinv.common import device as dconstants
from sysinv.common import utils
dpdk_opts = [
cfg.StrOpt('dpdk_elf',
default='/usr/sbin/ovs-vswitchd',
help='DPDK ELF file used for compatibility checks'),
]
CONF = cfg.CONF
CONF.register_opts(dpdk_opts, 'dpdk')
LOG = logging.getLogger(__name__)
# Look for PCI class 0x0200 and 0x0280 so that we get generic ethernet