Skip to content
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

Need standard get methods for information #1

Open
jimboca opened this issue Mar 12, 2018 · 1 comment
Open

Need standard get methods for information #1

jimboca opened this issue Mar 12, 2018 · 1 comment

Comments

@jimboca
Copy link
Contributor

jimboca commented Mar 12, 2018

Just a start to open the discussion...

Currently I am grabbing controller._nodes to re-add nodes on startup. Would be nice to have standard methods to grab this info so internal data structures can change, but the interface to nodeservers isn't affected.

Get existing nodes from db
return just those with given nodedef
controller.get_nodes('nodedef': 'myNodeDef')
or get all
controller.get_nodes()
or all for a given primary
controller.get_nodes('primary': 'myPrimaryAddress')

Would be nice if it returned objects, but if not then just a standard array or hash that doesn't ever change?

@jimboca
Copy link
Contributor Author

jimboca commented Mar 23, 2018

I call getDriver in init before Super cause I need to know some info before super can be called, but getDriver fails since self.controller is not set, so I have to set it. Wondering if controller should just be a global since you can only have one?

        # Have to set this to call getDriver
        self.controller = controller
        tag_type = self.getDriver('GV1')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant