1. An apparatus for allocating network resources comprising one or more network interfaces; a memory operative to store a partition pattern and a policy action, wherein the partition pattern defines a partition hierarchy comprising at least one variable entry at one or more levels of the partition hierarchy; a processor; a partition module, physically stored in a storage medium, comprising instructions operative to cause the processor and the apparatus to: allocate bandwidth to data flows traversing the apparatus according to a partition hierarchy; apply at least one policy action to a data flow to identify a partition name, wherein the partition name comprises a plurality of partition identifiers arranged in a hierarchy; apply the partition pattern against the partition name to create one or more partitions in the partition hierarchy by, in part, accessing a database against one or more attributes of the data flow to resolve the at least one variable entry at the one or more levels of the partition hierarchy and identify node names corresponding to the at least one variable entry, and substituting the identified node names for the variable entries in the partition pattern.