-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user parameters and find_parameter/find_parent_parameter methods.
- Loading branch information
1 parent
f9bb896
commit c17489f
Showing
2 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
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,7 +1,24 @@ | ||
from typing import Union, Optional | ||
|
||
# Bunch level | ||
TAKLER_HOST = "TAKLER_HOST" | ||
TAKLER_PORT = "TAKLER_PORT" | ||
TAKLER_HOME = "TAKLER_HOME" | ||
|
||
# Flow level | ||
FLOW = "FLOW" | ||
TAKLER_DATE = "TAKLER_DATE" | ||
TAKLER_TIME = "TAKLER_TIME" | ||
|
||
# Task level | ||
TASK = "TASK" | ||
TAKLER_NAME = "TAKLER_NAME" | ||
|
||
|
||
class Parameter(object): | ||
def __init__(self, name: str, value: Optional[Union[str, int, float]] = None): | ||
self.name = name | ||
self.value = value | ||
def __init__(self, name: str, value: Optional[Union[str, int, float, bool]] = None): | ||
self.name = name # type: str | ||
self.value = value # type: Optional[Union[str, int, float, bool]] | ||
|
||
def __eq__(self, other): | ||
return type(other) == type(self) and other.name == self.name and other.value == self.value |