Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
make it easy to populate NetDevices from arbitrary sources #55
I talked to @jathanism in IRC. I think it would be awesome to allow someone to write their own class, example:
This could then be imported and the populate method ran to create the list of net devices used by NetDevices. My current use case is to hit a HTTP resource that returns JSON, map the data to what netdevice expects, then return the list of netdevices.
This would be a simple change to the
I don't think that decision makes sense anymore really, especially in this context. The only people that would really be calling populate in the first place are developers.
Hmm... Something came to mind in that the NetDevices class is imported and instantiated through the trigger code. If you're working with a subclass it's not going to behave how you'd expect.
The change to
The only other thing I can think of short of that is to monkey patch