SR-IOV is not configured when the provider is not set

The default provider still remains as 'ifcfg' and when
its not specified, the SR-IOV PF configuration is skipped.
Adding the changes to support the same.

Change-Id: I17a5e68c6876db720d4b1096d75920aceb749750
This commit is contained in:
Jaganathan Palanisamy 2023-09-21 14:22:59 +05:30
parent fb4138fcae
commit 3d4faddb5b
1 changed files with 2 additions and 0 deletions

View File

@ -186,9 +186,11 @@ def main(argv=sys.argv, main_logger=None):
if os.path.exists('%s/etc/sysconfig/network-scripts/' % opts.root_dir):
provider = impl_ifcfg.IfcfgNetConfig(noop=opts.noop,
root_dir=opts.root_dir)
opts.provider = "ifcfg"
elif os.path.exists('%s/etc/network/' % opts.root_dir):
provider = impl_eni.ENINetConfig(noop=opts.noop,
root_dir=opts.root_dir)
opts.provider = "eni"
else:
main_logger.error("Unable to set provider for this operating "
"system.")