Skip to content

Commit a2d2ec6

Browse files
authored
[dev] make selected items hashable (#115)
* make selected items hashable * release-v0.41.1.dev2
1 parent ea080a2 commit a2d2ec6

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

ENDPOINTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**THIS FILE WAS AUTO-GENERATED DO NOT EDIT**
22

3-
Generated for: catalystwan-0.41.1.dev1
3+
Generated for: catalystwan-0.41.1.dev2
44

55
All URIs are relative to */dataservice*
66
HTTP request | Supported Versions | Method | Payload Type | Return Type | Tenancy Mode

catalystwan/api/configuration_groups/parcel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ def __le__(self, other: Any) -> bool:
117117
return self.value <= other
118118
return False
119119

120+
def __hash__(self) -> int:
121+
return hash(self.value)
122+
120123

121124
class Variable(BaseModel):
122125
model_config = ConfigDict(populate_by_name=True, alias_generator=to_camel)

catalystwan/models/configuration/feature_profile/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ class RefIdItem(BaseModel):
315315

316316
@classmethod
317317
def from_uuid(cls, ref_id: UUID):
318-
return cls(ref_id=as_global(str(ref_id)))
318+
return cls(ref_id=Global[str](value=str(ref_id)))
319+
320+
def __hash__(self) -> int:
321+
return hash(self.ref_id.value)
319322

320323

321324
class RefIdList(BaseModel):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "catalystwan"
3-
version = "0.41.1.dev1"
3+
version = "0.41.1.dev2"
44
description = "Cisco Catalyst WAN SDK for Python"
55
authors = ["kagorski <kagorski@cisco.com>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)