1. A non-transitory machine readable medium storing a program for managing service rules in a datacenter, the program comprising sets of instructions for: presenting a service rule management user interface comprising a service rule section for displaying service rules for processing by service nodes in the datacenter; receiving a request to add service rules for data messages associated with network nodes that are deployed in the datacenter based on a deployment template; in response to the request, adding a sub-section to the service rule section to display service rules associated with the deployment template; to the sub-section, adding a service rule comprising a set of rule identifiers and a service parameter associated with a service to be performed on data messages that have attribute sets that match the rule identifier set.