Merge "Fixed incorrect string type checking"
This commit is contained in:
commit
76bf095d2d
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
|
import six
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from ironicclient import exceptions
|
from ironicclient import exceptions
|
||||||
@ -292,7 +293,7 @@ class NodeInfo(object):
|
|||||||
"""
|
"""
|
||||||
ironic = ironic or self.ironic
|
ironic = ironic or self.ironic
|
||||||
ports = self.ports()
|
ports = self.ports()
|
||||||
if isinstance(port, str):
|
if isinstance(port, six.string_types):
|
||||||
port = ports[port]
|
port = ports[port]
|
||||||
|
|
||||||
LOG.debug('Updating port %(mac)s with patches %(patches)s',
|
LOG.debug('Updating port %(mac)s with patches %(patches)s',
|
||||||
@ -333,7 +334,7 @@ class NodeInfo(object):
|
|||||||
"""
|
"""
|
||||||
ironic = ironic or self.ironic
|
ironic = ironic or self.ironic
|
||||||
ports = self.ports()
|
ports = self.ports()
|
||||||
if isinstance(port, str):
|
if isinstance(port, six.string_types):
|
||||||
port = ports[port]
|
port = ports[port]
|
||||||
|
|
||||||
ironic.port.delete(port.uuid)
|
ironic.port.delete(port.uuid)
|
||||||
|
Loading…
Reference in New Issue
Block a user