From 8897842fc4052c92f6b62a8c52a9360121900613 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 26 Jul 2019 13:50:59 -0400 Subject: [PATCH] Fix SMM handler when None bmc This fixes a common scenario for using fe80 collection --- confluent_server/confluent/discovery/handlers/smm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/handlers/smm.py b/confluent_server/confluent/discovery/handlers/smm.py index 82149588..e6e2bdad 100644 --- a/confluent_server/confluent/discovery/handlers/smm.py +++ b/confluent_server/confluent/discovery/handlers/smm.py @@ -81,7 +81,7 @@ class NodeHandler(bmchandler.NodeHandler): if smmip and ':' not in smmip: smmip = getaddrinfo(smmip, 0)[0] smmip = smmip[-1][0] - if ':' in smmip: + if smmip and ':' in smmip: raise exc.NotImplementedException('IPv6 not supported') netconfig = netutil.get_nic_config(cfg, nodename, ip=smmip) netmask = netutil.cidr_to_mask(netconfig['prefix']) @@ -95,7 +95,7 @@ class NodeHandler(bmchandler.NodeHandler): if '0' not in rspdata: raise Exception("Error configuring SMM Network") return - if ':' in smmip and not smmip.startswith('fe80::'): + if smmip and ':' in smmip and not smmip.startswith('fe80::'): raise exc.NotImplementedException('IPv6 configuration TODO') if self.ipaddr.startswith('fe80::'): cfg.set_node_attributes(