-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
507 additions
and
149 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
from typing import List | ||
from .sai_common import SaiCommon | ||
from .sai_attribute import SaiAttribute | ||
from .sai_struct_entry import SaiStructEntry | ||
|
||
|
||
class SaiStruct(SaiCommon): | ||
""" | ||
This class represents a single SAI struct. | ||
""" | ||
|
||
def __init__(self, name: str, description: str, members: List[SaiAttribute] = []): | ||
def __init__(self, name: str, description: str, members: List[SaiStructEntry] = []): | ||
super().__init__(name, description) | ||
self.members: List[SaiAttribute] = members | ||
self.members: List[SaiStructEntry] = members |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import Optional | ||
from .sai_common import SaiCommon | ||
|
||
|
||
class SaiStructEntry(SaiCommon): | ||
""" | ||
This class represents a single SAI struct entry. | ||
""" | ||
|
||
def __init__( | ||
self, | ||
name: str, | ||
description: str, | ||
type: str, | ||
objects: Optional[str] = None, | ||
valid_only: Optional[str] = None, | ||
): | ||
super().__init__(name, description) | ||
self.type = type | ||
self.objects = objects | ||
self.valid_only = valid_only |