> So the syntax that was discussed with Francis was to match exactly what Juju > accepts. While I agree that it is a little bit nicer UI to just do more 'free- > form' text, the goal of the search was to have a way for people to try > searches in the UI, and then copy and paste that into their Juju constraints > request.
I'll put up a followup branch that changes the syntax used to match (or approximately match) juju constraints. It will need to be a be stricter up front about what is accepted, so that the copy/paste idea actually works, as juju does some validation before passing through. > I would have expected a lot of unit tests around _parse_constraints that would > assert lots of different request strings, and how they get mapped into the > constraint dict. It is a 'cheap' way to make sure our search syntax matches > what we expect. Right, that was the plan from writing it as a seperate function, and have now actually written those tests and pushed. -- https://code.launchpad.net/~gz/maas/node_search_view/+merge/128296 Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gz/maas/node_search_view into lp:maas. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

