From 3d4faddb5b1f6e901af0fc1943e870f26e85b77d Mon Sep 17 00:00:00 2001 From: Jaganathan Palanisamy Date: Thu, 21 Sep 2023 14:22:59 +0530 Subject: [PATCH] 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 --- os_net_config/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os_net_config/cli.py b/os_net_config/cli.py index f8b19644..85438227 100644 --- a/os_net_config/cli.py +++ b/os_net_config/cli.py @@ -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.")