Skip to content
Merged
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
14 changes: 7 additions & 7 deletions openshift/helper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ def objects_match(obj_a, obj_b):
match = False
diffs = []
if obj_a is None and obj_b is None:
match = True
match = True
elif not obj_a or not obj_b:
pass
pass
elif type(obj_a).__name__ != type(obj_b).__name__:
pass
pass
else:
dict_a = obj_a.to_dict()
dict_b = obj_b.to_dict()
Expand Down Expand Up @@ -395,15 +395,15 @@ def get_base_model_name_snake(self, model_name):
"""
result = self.get_base_model_name(model_name)
return string_utils.camel_case_to_snake(result)

@staticmethod
def attribute_to_snake(name):
""" Convert an object property name from camel to snake """
result = string_utils.camel_case_to_snake(name)
if result.endswith('_i_p'):
result = re.sub(r'\_i\_p$', '_ip', result)
if result.endswith('_i_p'):
result = re.sub(r'\_i\_p$', '_ip', result)
return result

@staticmethod
def get_model(api_version, kind):
"""
Expand Down