Filter rules before calculating rules length
Filter rules before calculating rules length

Filter out the appropriate rules before calling len(rules) when
applying. This avoids the problem where if only inbound or outbound
rules are specified, the input is not accepted or the output is empty
respectively.

aaronkavlie-wf/go-rest,kevinsookocheff-wf/go-rest,tylerrinnan-wf/go-rest,Workiva/go-rest