Skip to content

Commit 2d2895d

Browse files
allenrobelclaude
andcommitted
Rename validator parameter v to value for consistency with serializers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a24ba38 commit 2d2895d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

plugins/module_utils/models/interfaces/loopback_interface.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def serialize_policy_type(self, value: Optional[str], info: FieldSerializationIn
8888

8989
@field_validator("policy_type", mode="before")
9090
@classmethod
91-
def normalize_policy_type(cls, v):
91+
def normalize_policy_type(cls, value):
9292
"""
9393
# Summary
9494
@@ -98,10 +98,10 @@ def normalize_policy_type(cls, v):
9898
9999
None
100100
"""
101-
if v is None:
102-
return v
101+
if value is None:
102+
return value
103103
reverse_mapping = {api: ansible for ansible, api in LOOPBACK_POLICY_TYPE_MAPPING.data.items() if ansible != api}
104-
return reverse_mapping.get(v, v)
104+
return reverse_mapping.get(value, value)
105105

106106

107107
class LoopbackNetworkOSModel(NDNestedModel):
@@ -166,7 +166,7 @@ class LoopbackInterfaceModel(NDBaseModel):
166166

167167
@field_validator("interface_name", mode="before")
168168
@classmethod
169-
def normalize_interface_name(cls, v):
169+
def normalize_interface_name(cls, value):
170170
"""
171171
# Summary
172172
@@ -176,9 +176,9 @@ def normalize_interface_name(cls, v):
176176
177177
None
178178
"""
179-
if isinstance(v, str):
180-
return v.lower()
181-
return v
179+
if isinstance(value, str):
180+
return value.lower()
181+
return value
182182

183183
# --- Argument Spec ---
184184

0 commit comments

Comments
 (0)