Update API, polling_switch and db model

Support filter ports in machines query API
Update polling_switch and db model
Add one more state for switch in model

Change-Id: I0c581ebbfb3c83a84e8af25a02fce2f1c76aff11
Merge "Update API, polling_switch and db model"