A method of converting an abstract quality of service policy into a new configuration
for one or more network devices of managed network, as routers. The abstract quality
of service policy is received and converted into a first set of one or more basic
commands. A current configuration of one of the network devices is obtained, e.g.
through device discovery. The configuration is received in the form of one or more
first command line interface (CLI) commands that represent the current configuration
of the network device. A second set of one or more basic commands that correspond
to the current configuration of the network device is determined, based on the
first CLI commands. The first and second sets of basic commands are transformed
into one or more second CLI commands which, when executed by the network device,
will create a new configuration for the network device that implements the abstract
quality of service policy. Merging and aggregation, based on state values associated
with the basic commands, is carried out to remove any duplicate commands.