VOL-2943 TypeError: %d format: a number is required, not str from IPv4MulticastOperationProfile
Change-Id: Id8cc15ab5236930b8daaebce8707c3198e5ad63e
diff --git a/pyvoltha/adapters/extensions/omci/omci_entities.py b/pyvoltha/adapters/extensions/omci/omci_entities.py
index f932406..7d4be7a 100644
--- a/pyvoltha/adapters/extensions/omci/omci_entities.py
+++ b/pyvoltha/adapters/extensions/omci/omci_entities.py
@@ -537,9 +537,9 @@
def index(self):
return b'%02d' % (self.fields.get('gem_port_id',0)) + \
- b'%03d' % (self.fields.get('secondary_key',0)) + \
- b'%01d' % (self.fields.get('multicast_ip_range_start',0)) + \
- b'%03d' % (self.fields.get('multicast_ip_range_stop',0))
+ b'%02d' % (self.fields.get('secondary_key',0)) + \
+ b'%04r' % (self.fields.get('multicast_ip_range_start',0)) + \
+ b'%04r' % (self.fields.get('multicast_ip_range_stop',0))
def is_delete(self):
return self.fields.get('gem_port_id',0) == 0x1fff and \