Making OLTs host+port combination unique to prevent duplicates
Change-Id: I51c4c2a882d0561b4af145885c485229e200587e
diff --git a/xos/synchronizer/models/volt.xproto b/xos/synchronizer/models/volt.xproto
index 60fb08d..927006f 100644
--- a/xos/synchronizer/models/volt.xproto
+++ b/xos/synchronizer/models/volt.xproto
@@ -24,7 +24,7 @@
optional string name = 2 [help_text = "name of device", max_length = 254, db_index = False, unique = True];
required string device_type = 3 [help_text = "Device Type", default = "openolt", max_length = 254, db_index = False];
optional string host = 4 [help_text = "Device IP", max_length = 254, db_index = False];
- optional int32 port = 5 [help_text = "Device port", db_index = False];
+ optional int32 port = 5 [help_text = "Device port", db_index = False, unique_with = "host"];
optional string mac_address = 6 [help_text = "Device mac address", db_index = False];
optional string serial_number = 9 [help_text = "Serial Number", db_index = False];