X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-SDN-floodlight_openflow%2Fosm_rosdn_floodlightof%2Fsdnconn_floodlightof.py;fp=RO-SDN-floodlight_openflow%2Fosm_rosdn_floodlightof%2Fsdnconn_floodlightof.py;h=395b18d8b674455e435853a9c29e0b02d0b2ad32;hb=4126d05e24ada55226bb13a9d556655811cedadc;hp=0000000000000000000000000000000000000000;hpb=1d2f2609c00490a2b25ffedfc01ff97bc3ed571d;p=osm%2FRO.git diff --git a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py new file mode 100644 index 00000000..395b18d8 --- /dev/null +++ b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py @@ -0,0 +1,41 @@ +## +# Copyright 2019 Telefonica Investigacion y Desarrollo, S.A.U. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +## +"""The SdnConnectorFloodLightOf connector is responsible for creating services using pro active operflow rules. +""" + +import logging +from osm_ro.wim.openflow_conn import SdnConnectorOpenFlow +from .floodlight_of import OfConnFloodLight + + +class SdnConnectorFloodLightOf(SdnConnectorOpenFlow): + + def __init__(self, wim, wim_account, config=None, logger=None): + """Creates a connectivity based on pro-active openflow rules + """ + self.logger = logging.getLogger('openmano.sdnconn.floodlightof') + super().__init__(wim, wim_account, config, logger) + of_params = { + "of_url": wim["wim_url"], + "of_dpid": config.get("dpid"), + "of_user": wim_account["user"], + "of_password": wim_account["password"], + } + self.openflow_conn = OfConnFloodLight(of_params) + super().__init__(wim, wim_account, config, logger, self.openflow_conn)