Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions infoblox_client/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import re
import urllib
import requests
import six
import urllib3
import time
from requests import exceptions as req_exc
Expand Down Expand Up @@ -725,7 +724,7 @@ def is_cloud_wapi(wapi_version):
Raises:
ValueError: if an invalid version is passed
"""
valid = wapi_version and isinstance(wapi_version, six.string_types)
valid = wapi_version and isinstance(wapi_version, str)
if not valid:
raise ValueError("Invalid argument was passed")
version_match = re.search(r'(\d+)\.(\d+)', wapi_version)
Expand Down
4 changes: 1 addition & 3 deletions infoblox_client/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.

import six

from infoblox_client import exceptions as ib_ex

FEATURE_VERSIONS = {
Expand Down Expand Up @@ -42,7 +40,7 @@ def __init__(self, version, feature_versions=None):
if feature_versions is None:
feature_versions = FEATURE_VERSIONS

if isinstance(version, six.string_types):
if isinstance(version, str):
wapi_version = version
elif hasattr(version, 'wapi_version'):
wapi_version = getattr(version, 'wapi_version')
Expand Down
7 changes: 3 additions & 4 deletions infoblox_client/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import six

try:
from oslo_log import log as logging
Expand Down Expand Up @@ -546,7 +545,7 @@ def create(cls, ip=None, mac=None, **kwargs):
return IPv4(ip=ip, mac=mac, **kwargs)

def __eq__(self, other):
if isinstance(other, six.string_types):
if isinstance(other, str):
return self.ip == other
elif isinstance(other, self.__class__):
return self.ip == other.ip
Expand Down Expand Up @@ -14341,7 +14340,7 @@ def _ip_setter(self, ipaddr_name, ipaddrs_name, ips):
ipXaddr is also filled to be able perform search on NIOS
and verify that no such host record exists yet.
"""
if isinstance(ips, six.string_types):
if isinstance(ips, str):
setattr(self, ipaddr_name, ips)
elif isinstance(ips, (list, tuple)) and isinstance(ips[0], IP):
setattr(self, ipaddr_name, ips[0].ip)
Expand Down Expand Up @@ -14496,7 +14495,7 @@ def _ip_setter(self, ipaddr_name, ipaddrs_name, ips):
ipXaddr is also filled to be able perform search on NIOS
and verify that no such host record exists yet.
"""
if isinstance(ips, six.string_types):
if isinstance(ips, str):
setattr(self, ipaddr_name, ips)
elif isinstance(ips, (list, tuple)) and isinstance(ips[0], IP):
setattr(self, ipaddr_name, ips[0].ip)
Expand Down
3 changes: 1 addition & 2 deletions infoblox_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# under the License.

import netaddr
import six
import re

try:
Expand Down Expand Up @@ -48,7 +47,7 @@ def generate_duid(mac):

0x00 + mac with last 3 hex + mac with 6 hex
"""
valid = mac and isinstance(mac, six.string_types)
valid = mac and isinstance(mac, str)
if not valid:
raise ValueError("Invalid argument was passed")
return "00:" + mac[9:] + ":" + mac
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
six>=1.11.0
requests>=2.5.2
urllib3>=1.13
oslo.serialization>=1.4.0
Expand Down
3 changes: 1 addition & 2 deletions tests/test_object_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import unittest
import mock
import six

from infoblox_client import exceptions
from infoblox_client import object_manager as om
Expand All @@ -31,7 +30,7 @@ def __init__(self, expected_values):
def __eq__(self, actual):
expected = []

for key, expected_value in six.iteritems(self.args):
for key, expected_value in self.args.items():
expected.append(self._verify_value_is_expected(actual, key,
expected_value))

Expand Down