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

planner signature change #1905

Open
manishtomar opened this issue Jun 30, 2016 · 0 comments
Open

planner signature change #1905

manishtomar opened this issue Jun 30, 2016 · 0 comments

Comments

@manishtomar
Copy link
Contributor

There have been occasions where a new config was required by convergence planner. This was added as new argument to planner requiring changes everywhere it is called including tests. Now, it looks like planner needs CLB health info and node OFFLINE timeout as arguments #1870. To avoid changing signature again I think planner should be:

def planner(desired_group_state, resources, config, now):
     pass

where resources is simple object containing servers, lb_nodes, lbs or any other future resources and config is another object containing configuration like build_timeout, steps_limit, node_timeout or any other future values.

@attr.s
class Resources(object):
    servers = attr.ib()
    lb_nodes = attr.ib()
    lbs = attr.ib()

@attr.s
class Config(object):
    build_timeout = attr.ib()
    steps_limit = attr.ib()
    node_timeout = attr.ib()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant