2 # Copyright 2019 Telefonica Investigacion y Desarrollo, S.A.U.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
19 """The SdnConnectorFloodLightOf connector is responsible for creating services using pro active operflow rules.
24 from osm_ro_plugin
.openflow_conn
import SdnConnectorOpenFlow
26 from .floodlight_of
import OfConnFloodLight
29 class SdnConnectorFloodLightOf(SdnConnectorOpenFlow
):
30 def __init__(self
, wim
, wim_account
, config
=None, logger
=None):
31 """Creates a connectivity based on pro-active openflow rules"""
32 self
.logger
= logging
.getLogger("ro.sdn.floodlightof")
33 super().__init
__(wim
, wim_account
, config
, logger
)
35 "of_url": wim
["wim_url"],
36 "of_dpid": config
.get("dpid") or config
.get("switch_id"),
37 "of_user": wim_account
["user"],
38 "of_password": wim_account
["password"],
40 self
.openflow_conn
= OfConnFloodLight(of_params
)
41 super().__init
__(wim
, wim_account
, config
, logger
, self
.openflow_conn
)