diff --git a/lib/ansible/modules/storage/netapp/na_ontap_license.py b/lib/ansible/modules/storage/netapp/na_ontap_license.py index cb022f55ac7..cddcc842e08 100644 --- a/lib/ansible/modules/storage/netapp/na_ontap_license.py +++ b/lib/ansible/modules/storage/netapp/na_ontap_license.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# (c) 2018, NetApp, Inc +# (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function @@ -137,7 +137,14 @@ HAS_NETAPP_LIB = netapp_utils.has_netapp_lib() def local_cmp(a, b): - return (a > b) - (a < b) + """ + compares with only values and not keys, keys should be the same for both dicts + :param a: dict 1 + :param b: dict 2 + :return: difference of values in both dicts + """ + diff = [key for key in a if a[key] != b[key]] + return len(diff) class NetAppOntapLicense(object):