-
Notifications
You must be signed in to change notification settings - Fork 49
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
Draft: UDMI Python Library #1084
Conversation
import scapy.layers.inet | ||
import scapy.sendrecv | ||
|
||
from udmi_schema.schema.events_discovery import DiscoveryEvents |
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 way to simplify this a bit, to make it less redundant? E.g., ideally it would be something like
from udmi.schema import DiscoveryEvents
or
import udmi.schema.discovery_events
time.sleep(RUNNER_LOOP_INTERVAL) | ||
|
||
@catch_exceptions_to_status | ||
def apply_discovery_config(self, config_dict): |
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 place in here where there's an example of how this dict is created? I can guess (likely just a standard json-to-dict parsing), but I wanted to get it codified somewhere to be 100% sure. I saw the self.publish(event.to_json())
code elsewhere, so I'm looking for the inverse...
(also, as an abstraction thing I'd expect the input/output paths to be roughly similar, so that the concept of "json" is either entirely in this layer, or not... so if JSON is output here then it would also be parsed here. I.e. it produces the same kind of thing that it consumes!)
No description provided.