Skip to content
Snippets Groups Projects
Commit ce1c9c84 authored by Alfonso Tierno's avatar Alfonso Tierno
Browse files

adding SDN opendaylight openflow plugin


Change-Id: I457a63cf2bdd13cfa49f95ff344fa912157b5115
Signed-off-by: default avatartierno <alfonso.tiernosepulveda@telefonica.com>
parent 3fc485da
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ RUN /root/RO/RO/osm_ro/scripts/install-osm-im.sh --develop && \
python3 -m pip install -e /root/RO/RO-SDN-tapi && \
python3 -m pip install -e /root/RO/RO-SDN-onos_vpls && \
python3 -m pip install -e /root/RO/RO-SDN-onos_openflow && \
python3 -m pip install -e /root/RO/RO-SDN-odl_openflow && \
python3 -m pip install -e /root/RO/RO-SDN-floodlight_openflow && \
python3 -m pip install -e /root/RO/RO-SDN-arista && \
rm -rf /root/.cache && \
......
##
# 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.
##
all: clean package
clean:
rm -rf dist deb_dist osm_rosdn_odlof-*.tar.gz osm_rosdn_odlof.egg-info .eggs
package:
python3 setup.py --command-packages=stdeb.command sdist_dsc
cd deb_dist/osm-rosdn-odlof*/ && dpkg-buildpackage -rfakeroot -uc -us
This diff is collapsed.
##
# 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 SdnConnectorOdlOf connector is responsible for creating services using pro active operflow rules.
"""
import logging
from osm_ro.wim.openflow_conn import SdnConnectorOpenFlow
from .odl_of import OfConnOdl
class SdnConnectorOdlOf(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.odlof')
super().__init__(wim, wim_account, config, logger)
of_params = {
"of_url": wim["wim_url"],
"of_dpid": config.get("dpid") or config.get("switch_id"),
"of_user": wim_account["user"],
"of_password": wim_account["password"],
}
self.openflow_conn = OfConnOdl(of_params)
super().__init__(wim, wim_account, config, logger, self.openflow_conn)
##
# 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.
##
requests
git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##
# 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.
##
from setuptools import setup
_name = "osm_rosdn_odlof"
README = """
===========
osm-rosdn_odlof
===========
osm-ro plugin for OpenDayLight SDN using pre-computed openflow rules
"""
setup(
name=_name,
description='OSM RO plugin for SDN with odl openflow rules',
long_description=README,
version_command=('git describe --match v* --tags --long --dirty', 'pep440-git-full'),
# version=VERSION,
# python_requires='>3.5.0',
author='ETSI OSM',
author_email='alfonso.tiernosepulveda@telefonica.com',
maintainer='Alfonso Tierno',
maintainer_email='alfonso.tiernosepulveda@telefonica.com',
url='https://osm.etsi.org/gitweb/?p=osm/RO.git;a=summary',
license='Apache 2.0',
packages=[_name],
include_package_data=True,
install_requires=[
"requests",
"osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO"
],
setup_requires=['setuptools-version-command'],
entry_points={
'osm_rosdn.plugins': ['rosdn_odlof = osm_rosdn_odlof.sdnconn_odlof:SdnConnectorOdlOf'],
},
)
#
# 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.
#
[DEFAULT]
X-Python3-Version : >= 3.5
Depends3: python3-requests, python3-osm-ro
##
# 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.
##
[tox]
envlist = flake8
toxworkdir={toxinidir}/.tox
[testenv]
basepython = python3
install_command = python3 -m pip install -U {opts} {packages}
# deps = -r{toxinidir}/test-requirements.txt
commands=python3 -m unittest discover -v
[testenv:flake8]
basepython = python3
deps = flake8
-r{toxinidir}/requirements.txt
install_command = python3 -m pip install -U {opts} {packages}
commands = flake8 osm_rosdn_odlof --max-line-length 120 \
--exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp --ignore W291,W293,E226,W504
[testenv:unittest]
basepython = python3
commands = python3 -m unittest osm_rosdn_odlof.tests
[testenv:build]
basepython = python3
deps = stdeb
setuptools-version-command
commands = python3 setup.py --command-packages=stdeb.command bdist_deb
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment