Open pengale opened 7 years ago
I suppose the full list of attributes would include some or all of the attributes Juju can be constrained on: https://jujucharms.com/docs/2.1/reference-constraints
To be clear, for every machine that hosts a unit, a randomly-chosen "application" would be specified, so that operations on units are repeatable.
Instead of our current branching path through selectors, we should have a single select function, that includes something like the following args:
To select a machine, we take a weighted sum of the args (leadership weighs less; hosted charms weighs more) of each deployed machine, and select the one with the best match, choosing randomly in the case of a tie.
actions now take a machine as the third argument (which, in the case of a selector that just acts on a model, is just a random machine), and derive stuff they need to act based on the properties of the machine.