projects
/
osm
/
RO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 8016: Added DataPlane Broker wimconn plugin
[osm/RO.git]
/
RO
/
osm_ro
/
wim
/
wan_link_actions.py
diff --git
a/RO/osm_ro/wim/wan_link_actions.py
b/RO/osm_ro/wim/wan_link_actions.py
index
458f3d5
..
68ebf74
100644
(file)
--- a/
RO/osm_ro/wim/wan_link_actions.py
+++ b/
RO/osm_ro/wim/wan_link_actions.py
@@
-207,9
+207,8
@@
class WanLinkCreate(RefreshMixin, CreateAction):
return merge_dicts(wan_port_mapping, service_mapping_info=mapping)
def _get_port_sdn(self, ovim, instance_net):
return merge_dicts(wan_port_mapping, service_mapping_info=mapping)
def _get_port_sdn(self, ovim, instance_net):
- criteria = {'net_id': instance_net['sdn_net_id']}
try:
try:
- local_port_mapping = ovim.get_ports(
filter=criteria
)
+ local_port_mapping = ovim.get_ports(
instance_net['sdn_net_id']
)
if local_port_mapping:
return (local_port_mapping[0]['switch_dpid'],
if local_port_mapping:
return (local_port_mapping[0]['switch_dpid'],
@@
-217,7
+216,7
@@
class WanLinkCreate(RefreshMixin, CreateAction):
except: # noqa
self.logger.exception('Problems when calling OpenVIM')
except: # noqa
self.logger.exception('Problems when calling OpenVIM')
- self.logger.debug(
'No ports found using criteria:\n%r\n.', criteria
)
+ self.logger.debug(
"No ports found for sdn_net_id='{}'", instance_net['sdn_net_id']
)
return None
def _evaluate_rules(self, rules, vim_info):
return None
def _evaluate_rules(self, rules, vim_info):
@@
-316,7
+315,9
@@
class WanLinkCreate(RefreshMixin, CreateAction):
if details.get('encapsulation_type') == 'vlan':
point['service_endpoint_encapsulation_type'] = 'dot1q'
point['service_endpoint_encapsulation_info'] = {
if details.get('encapsulation_type') == 'vlan':
point['service_endpoint_encapsulation_type'] = 'dot1q'
point['service_endpoint_encapsulation_info'] = {
- 'vlan': details['encapsulation_id']
+ 'vlan': details['encapsulation_id'],
+ 'switch_dpid': wan_info['switch_dpid'],
+ 'switch_port': wan_info['switch_port']
}
else:
point['service_endpoint_encapsulation_type'] = 'none'
}
else:
point['service_endpoint_encapsulation_type'] = 'none'
@@
-328,8
+329,8
@@
class WanLinkCreate(RefreshMixin, CreateAction):
if len(connection_points) == 2:
return 'ELINE'
else:
if len(connection_points) == 2:
return 'ELINE'
else:
- raise NotImplementedError('Multipoint connectivity is not '
- 'supported yet.')
+ # added to support DPB WIM connector
+ return 'ELAN'
def _update_persistent_data(self, persistence, service_uuid, conn_info):
"""Store plugin/connector specific information in the database"""
def _update_persistent_data(self, persistence, service_uuid, conn_info):
"""Store plugin/connector specific information in the database"""