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 guess my feeling is that we can support 'space separated list of tags' as 
long as we also support tags=1,2,3 and tags:1,2,3. So valid searches would be:
 foo
 foo bar
 tags:foo,bar
 maas-tags:foo,bar
 tags=foo,bar

If possible, I would think we would want to forbid mixing styles:
 bar tags=foo

I think one of the reasons to request 'tag' is that it allows freeform to also 
search for hostname, or mac id, or whatever else, but still gives us a 
namespace for being specific about tags.

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.

-- 
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

Reply via email to