From 2a95ac46d3a1e1fddf47c8c2ba7796de11ed32aa Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 9 Dec 2019 22:31:41 +0100 Subject: [PATCH] ONOS VPLS SDN plugin: migrated string operator to format to be py3 compliant Change-Id: I46af69b340aa32681e76cb0e2d885189df073cbb Signed-off-by: garciadeblas --- RO-SDN-onos_vpls/osm_rosdn_onosvpls/sdn_assist_onos_vpls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RO-SDN-onos_vpls/osm_rosdn_onosvpls/sdn_assist_onos_vpls.py b/RO-SDN-onos_vpls/osm_rosdn_onosvpls/sdn_assist_onos_vpls.py index 86caa2ce..8531444e 100644 --- a/RO-SDN-onos_vpls/osm_rosdn_onosvpls/sdn_assist_onos_vpls.py +++ b/RO-SDN-onos_vpls/osm_rosdn_onosvpls/sdn_assist_onos_vpls.py @@ -70,7 +70,7 @@ class OnosVpls(SdnConnectorBase): for vpls in onos_config['apps']['org.onosproject.vpls']['vpls']['vplsList']: if vpls['name'] == service_uuid: return vpls - raise SdnConnectorError('VPLS %s not found' % service_uuid, http_code=404) + raise SdnConnectorError('VPLS {} not found'.format(service_uuid), http_code=404) def create_connectivity_service(self, service_type, connection_points): if service_type.lower() != 'elan': @@ -87,7 +87,7 @@ class OnosVpls(SdnConnectorBase): } for vpls in onos_config['apps']['org.onosproject.vpls']['vpls']['vplsList']: if vpls['name'] == service_uuid: - raise SdnConnectorError('Network %s already exists.' % service_uuid) + raise SdnConnectorError('Network {} already exists.'.format(service_uuid)) onos_config['apps']['org.onosproject.vpls']['vpls']['vplsList'].append({ 'name': service_uuid, 'interfaces': [] @@ -176,7 +176,7 @@ class OnosVpls(SdnConnectorBase): onos_config['apps']['org.onosproject.vpls']['vpls'].pop('lastUpdateTime') def _append_port_to_onos_config(self, port, onos_config): - port_name = 'of:%s/%s' % (port['service_endpoint_encapsulation_info']['switch_dpid'], + port_name = 'of:{}/{}'.format(port['service_endpoint_encapsulation_info']['switch_dpid'], port['service_endpoint_encapsulation_info']['switch_port']) interface_config = {'name': port['service_endpoint_id']} if 'vlan' in port['service_endpoint_encapsulation_info'] and port['service_endpoint_encapsulation_info'][ -- 2.25.1