From 7868a59dccaee4a23d15920c1d9b92d345299c7e Mon Sep 17 00:00:00 2001 From: jiasirui Date: Thu, 12 Sep 2019 19:28:30 +0800 Subject: [PATCH] fix the spelling mistakes Change-Id: I7731f7446b48db18eb74bb6dd382eb6e8cb62269 --- inventory/inventory/inventory/api/controllers/v1/host.py | 2 +- inventory/inventory/inventory/api/controllers/v1/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory/inventory/inventory/api/controllers/v1/host.py b/inventory/inventory/inventory/api/controllers/v1/host.py index 5db31455..611a30ce 100644 --- a/inventory/inventory/inventory/api/controllers/v1/host.py +++ b/inventory/inventory/inventory/api/controllers/v1/host.py @@ -1883,7 +1883,7 @@ class HostController(rest.RestController): def _validate_ip_in_mgmt_network(ip): network = pecan.request.systemconfig.network_get_by_type( constants.NETWORK_TYPE_MGMT) - utils.validate_address_within_nework(ip, network) + utils.validate_address_within_network(ip, network) @staticmethod def _validate_address_not_allocated(name, ip_address): diff --git a/inventory/inventory/inventory/api/controllers/v1/utils.py b/inventory/inventory/inventory/api/controllers/v1/utils.py index ab0f2c7c..c5aceb5c 100755 --- a/inventory/inventory/inventory/api/controllers/v1/utils.py +++ b/inventory/inventory/inventory/api/controllers/v1/utils.py @@ -106,7 +106,7 @@ def validate_address_within_address_pool(ip, pool): "IP address %s is not within address pool ranges") % str(ip)) -def validate_address_within_nework(ip, network): +def validate_address_within_network(ip, network): """Determine whether an IP address is within the specified IP network. :param ip netaddr.IPAddress object :param network objects.Network object