Pybal was extended with support for the BGP MED (Multi-Exit Discriminator, aka metric) attribute in a6ae55449d6986d469e808d8b87d21158f59ccda. I've tested it against a Quagga instance on pybal-test2002, using a pybal instance on pybal-test2003.
It would be good to get this deployed in production, replacing the current routing policies on the core routers and allowing pybal to indicate primary/backup status itself. This could then even be driven from e.g. etcd.