juju-solutions / matrix

Automatic testing of big software deployments under various failure conditions
Other
8 stars 9 forks source link

Add a "non terminal unit" selector to remove_unit #88

Open pengale opened 7 years ago

pengale commented 7 years ago

Came up in a meeting w/ @abentley

The simplest way to do so, would be to rename the third argument in remove_unit to non_terminal_unit, then have special logic in the switch statement in fetch to handle non_terminal_unit. (This means that the generator could generate plans that use the non_terminal_unit selector).

A more extensive refactor would be to rename the third argument to target, and then base the switch statement in fetch on the type annotation for the parameter passed to target, rather than the argument name.

This replaces the current check inside of remove_unit.