-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[uniconfig] add device discovery task #23
Conversation
1b5f4b9
to
65a385c
Compare
66f6c58
to
e0e10c4
Compare
e0e10c4
to
7094d2d
Compare
1: move tests to python folder. should not be a part of package |
7094d2d
to
bb6aab3
Compare
|
bb6aab3
to
be02ee7
Compare
Check this PR. Mypy pass with removed classmethod |
8b43df9
to
6c2afe1
Compare
44bc86e
to
1a8f91a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just few small comments
class WorkerInput(TaskInput): | ||
ip: list[Address] | ||
tcp_port: list[TcpPortItem] | None = None | ||
udp_port: list[UdpPortItem] | None = Field(None, max_length=500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason why udp list has max_length but tcp list doesn't have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is because UDP port scanning is very slow. If I didn't have it restricted, the task crashed after 120 seconds on timeout error. Maros gave me a tip that I can limit the maximum number of ports - number 500 I set "randomly" as the maximum value when the task is not yet crashing...
def get_list_of_ip_addresses(ip_addresses: str) -> list[str]: | ||
""" | ||
Creates list of IP addresses. | ||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is better if you use standard python tags in doc
…suleiman/device_discovery
No description provided.