Predictable interface names for PCI devices on non-zero PCI
domains get assigned (by systemd-udev) names like
enP<bus-number>p<port-number>s<slot-number>f<function-number>,
e.g. enP2p1s0f0, which are currently rejected by our validators.
For PCI domain 0000, the "P<bus-number>" is omitted, resulting
in all lowercase iface names.
Allow uppercase iface names by making the re.match test
case-insensitive.
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Change-Id: I2bda550c95737fba57b5916a71a3c3b9df66e22d
Name: validators
Version: %{_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Configuration validators
License: %{_platform_licence}
Source0: %{name}-%{version}.tar.gz
return self.DEFAULT_MTU
def validate_iface_name(self, context, iface):
- if not isinstance(iface, basestring) or not re.match(self.IFACE_NAME_MATCH, iface):
+ if not isinstance(iface, basestring) or not re.match(self.IFACE_NAME_MATCH, iface, re.IGNORECASE):
self.err_invalid_iface_name(context)
if len(iface) > self.MAX_IFACE_NAME_LEN:
self.err_iface_name_len(context)