congress/congress/policy_engines
Eric K a0f1c1a17d Disallow duplicated policy name in DB
Bug: DB allows two PE instances to insert two policies with the same
name (different ID), causing irrecoverable error in all following
policy sync attempts.

This patch fixes the bug by locking database table and checking for
duplicates before adding new policy.

Manually tested under SQLite and MySQL.

Change-Id: I0de1692a895fbf47703f668b44e2c9300f518f76
2016-09-29 01:17:49 -07:00
..
__init__.py Reorganize policy engines 2015-02-23 15:01:17 -08:00
agnostic.py Disallow duplicated policy name in DB 2016-09-29 01:17:49 -07:00
base_driver.py Use python3 print, division, import 2016-01-20 15:31:02 -08:00
vm_placement.py Use python3 print, division, import 2016-01-20 15:31:02 -08:00