From 667d158c0d3ee7b4c176ad0b27ac428c81b0ddbc Mon Sep 17 00:00:00 2001 From: tierno Date: Fri, 20 Dec 2019 12:16:46 +0000 Subject: [PATCH] change SDN types from tapi to ietfl2vpn, from arista to arista_cloudvision Change-Id: I01d61cf64521707c92f58c668f0372b5daa010c5 Signed-off-by: tierno --- Dockerfile-local | 4 ++-- {RO-SDN-arista => RO-SDN-arista_cloudvision}/Makefile | 6 +++--- .../python3-osm-rosdn-arista-cloudvision.postinst | 0 .../osm_rosdn_arista_cloudvision}/aristaConfigLet.py | 0 .../osm_rosdn_arista_cloudvision}/aristaTask.py | 0 .../osm_rosdn_arista_cloudvision}/wimconn_arista.py | 4 ++-- .../requirements.txt | 0 {RO-SDN-arista => RO-SDN-arista_cloudvision}/setup.py | 11 ++++++----- .../stdeb.cfg | 0 {RO-SDN-tapi => RO-SDN-arista_cloudvision}/tox.ini | 10 +++++----- {RO-SDN-tapi => RO-SDN-ietfl2vpn}/Makefile | 6 ++++-- .../osm_rosdn_ietfl2vpn}/wimconn_ietfl2vpn.py | 0 {RO-SDN-tapi => RO-SDN-ietfl2vpn}/requirements.txt | 0 {RO-SDN-tapi => RO-SDN-ietfl2vpn}/setup.py | 10 +++++----- {RO-SDN-tapi => RO-SDN-ietfl2vpn}/stdeb.cfg | 0 {RO-SDN-arista => RO-SDN-ietfl2vpn}/tox.ini | 4 ++-- RO-client/osm_roclient/roclient.py | 2 +- RO/osm_ro/openmanoclient.py | 4 ++-- RO/osm_ro/wim/schemas.py | 4 ++-- RO/osm_ro/wim/tests/fixtures.py | 2 +- devops-stages/stage-build.sh | 8 ++++---- 21 files changed, 39 insertions(+), 36 deletions(-) rename {RO-SDN-arista => RO-SDN-arista_cloudvision}/Makefile (69%) rename RO-SDN-arista/debian/python3-osm-rosdn-arista.postinst => RO-SDN-arista_cloudvision/debian/python3-osm-rosdn-arista-cloudvision.postinst (100%) rename {RO-SDN-arista/osm_rosdn_arista => RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision}/aristaConfigLet.py (100%) rename {RO-SDN-arista/osm_rosdn_arista => RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision}/aristaTask.py (100%) rename {RO-SDN-arista/osm_rosdn_arista => RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision}/wimconn_arista.py (99%) rename {RO-SDN-arista => RO-SDN-arista_cloudvision}/requirements.txt (100%) rename {RO-SDN-arista => RO-SDN-arista_cloudvision}/setup.py (81%) rename {RO-SDN-arista => RO-SDN-arista_cloudvision}/stdeb.cfg (100%) rename {RO-SDN-tapi => RO-SDN-arista_cloudvision}/tox.ini (82%) rename {RO-SDN-tapi => RO-SDN-ietfl2vpn}/Makefile (64%) rename {RO-SDN-tapi/osm_rosdn_tapi => RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn}/wimconn_ietfl2vpn.py (100%) rename {RO-SDN-tapi => RO-SDN-ietfl2vpn}/requirements.txt (100%) rename {RO-SDN-tapi => RO-SDN-ietfl2vpn}/setup.py (85%) rename {RO-SDN-tapi => RO-SDN-ietfl2vpn}/stdeb.cfg (100%) rename {RO-SDN-arista => RO-SDN-ietfl2vpn}/tox.ini (90%) diff --git a/Dockerfile-local b/Dockerfile-local index 1f9a117e..d8c8432a 100644 --- a/Dockerfile-local +++ b/Dockerfile-local @@ -57,12 +57,12 @@ RUN /root/RO/RO/osm_ro/scripts/install-osm-im.sh --develop && \ python3 -m pip install -e /root/RO/RO-VIM-azure && \ python3 -m pip install -e /root/RO/RO-VIM-fos && \ python3 -m pip install -e /root/RO/RO-SDN-dynpac && \ - python3 -m pip install -e /root/RO/RO-SDN-tapi && \ + python3 -m pip install -e /root/RO/RO-SDN-ietfl2vpn && \ 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 && \ + python3 -m pip install -e /root/RO/RO-SDN-arista_cloudvision && \ python3 -m pip install -e /root/RO/RO-SDN-juniper_contrail && \ rm -rf /root/.cache && \ apt-get clean && \ diff --git a/RO-SDN-arista/Makefile b/RO-SDN-arista_cloudvision/Makefile similarity index 69% rename from RO-SDN-arista/Makefile rename to RO-SDN-arista_cloudvision/Makefile index 1606bb39..4890e8e3 100644 --- a/RO-SDN-arista/Makefile +++ b/RO-SDN-arista_cloudvision/Makefile @@ -16,10 +16,10 @@ all: clean package clean: - rm -rf dist deb_dist osm_rosdn_arista-*.tar.gz osm_rosdn_arista.egg-info .eggs + rm -rf dist deb_dist osm_rosdn_arista_cloudvision-*.tar.gz osm_rosdn_arista_cloudvision.egg-info .eggs package: python3 setup.py --command-packages=stdeb.command sdist_dsc - cp debian/python3-osm-rosdn-arista.postinst deb_dist/osm-rosdn-arista*/debian/ - cd deb_dist/osm-rosdn-arista*/ && dpkg-buildpackage -rfakeroot -uc -us + cp debian/python3-osm-rosdn-arista-cloudvision.postinst deb_dist/osm-rosdn-arista-cloudvision*/debian/ + cd deb_dist/osm-rosdn-arista-cloudvision*/ && dpkg-buildpackage -rfakeroot -uc -us diff --git a/RO-SDN-arista/debian/python3-osm-rosdn-arista.postinst b/RO-SDN-arista_cloudvision/debian/python3-osm-rosdn-arista-cloudvision.postinst similarity index 100% rename from RO-SDN-arista/debian/python3-osm-rosdn-arista.postinst rename to RO-SDN-arista_cloudvision/debian/python3-osm-rosdn-arista-cloudvision.postinst diff --git a/RO-SDN-arista/osm_rosdn_arista/aristaConfigLet.py b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/aristaConfigLet.py similarity index 100% rename from RO-SDN-arista/osm_rosdn_arista/aristaConfigLet.py rename to RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/aristaConfigLet.py diff --git a/RO-SDN-arista/osm_rosdn_arista/aristaTask.py b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/aristaTask.py similarity index 100% rename from RO-SDN-arista/osm_rosdn_arista/aristaTask.py rename to RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/aristaTask.py diff --git a/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py similarity index 99% rename from RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py rename to RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py index 571add68..37f4c582 100644 --- a/RO-SDN-arista/osm_rosdn_arista/wimconn_arista.py +++ b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py @@ -45,8 +45,8 @@ from cvprac.cvp_api import CvpApi from cvprac.cvp_client_errors import CvpLoginError, CvpSessionLogOutError, CvpApiError from cvprac import __version__ as cvprac_version -from osm_rosdn_arista.aristaConfigLet import AristaSDNConfigLet -from osm_rosdn_arista.aristaTask import AristaCVPTask +from osm_rosdn_arista_cloudvision.aristaConfigLet import AristaSDNConfigLet +from osm_rosdn_arista_cloudvision.aristaTask import AristaCVPTask class SdnError(Enum): diff --git a/RO-SDN-arista/requirements.txt b/RO-SDN-arista_cloudvision/requirements.txt similarity index 100% rename from RO-SDN-arista/requirements.txt rename to RO-SDN-arista_cloudvision/requirements.txt diff --git a/RO-SDN-arista/setup.py b/RO-SDN-arista_cloudvision/setup.py similarity index 81% rename from RO-SDN-arista/setup.py rename to RO-SDN-arista_cloudvision/setup.py index d974aad9..ab8385bc 100644 --- a/RO-SDN-arista/setup.py +++ b/RO-SDN-arista_cloudvision/setup.py @@ -18,19 +18,19 @@ from setuptools import setup -_name = "osm_rosdn_arista" +_name = "osm_rosdn_arista_cloudvision" README = """ =========== -osm-rosdn_arista +osm-rosdn_arista_cloudvision =========== -osm-ro pluging for arista SDN +osm-ro pluging for arista_cloudvision SDN """ setup( name=_name, - description='OSM ro sdn plugin for arista', + description='OSM ro sdn plugin for arista with CloudVision', long_description=README, version_command=('git describe --match v* --tags --long --dirty', 'pep440-git-full'), # version=VERSION, @@ -50,6 +50,7 @@ setup( "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_arista = osm_rosdn_arista.wimconn_arista:AristaSdnConnector'] + 'osm_rosdn.plugins': ['rosdn_arista_cloudvision = osm_rosdn_arista_cloudvision.' + 'wimconn_arista:AristaSdnConnector'] }, ) diff --git a/RO-SDN-arista/stdeb.cfg b/RO-SDN-arista_cloudvision/stdeb.cfg similarity index 100% rename from RO-SDN-arista/stdeb.cfg rename to RO-SDN-arista_cloudvision/stdeb.cfg diff --git a/RO-SDN-tapi/tox.ini b/RO-SDN-arista_cloudvision/tox.ini similarity index 82% rename from RO-SDN-tapi/tox.ini rename to RO-SDN-arista_cloudvision/tox.ini index 7d643cd2..d534123c 100644 --- a/RO-SDN-tapi/tox.ini +++ b/RO-SDN-arista_cloudvision/tox.ini @@ -14,24 +14,24 @@ ## [tox] -envlist = py3 -toxworkdir={homedir}/.tox +envlist = flake8 +toxworkdir={toxinidir}/.tox [testenv] basepython = python3 install_command = python3 -m pip install -r requirements.txt -U {opts} {packages} # deps = -r{toxinidir}/test-requirements.txt -commands=python3 -m unittest discover -v +# commands=python3 -m unittest discover -v [testenv:flake8] basepython = python3 deps = flake8 -commands = flake8 osm_rosdn_tapi --max-line-length 120 \ +commands = flake8 osm_rosdn_arista_cloudvision --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_tapi.tests +commands = python3 -m unittest osm_rosdn_arista_cloudvision.tests [testenv:build] basepython = python3 diff --git a/RO-SDN-tapi/Makefile b/RO-SDN-ietfl2vpn/Makefile similarity index 64% rename from RO-SDN-tapi/Makefile rename to RO-SDN-ietfl2vpn/Makefile index 2e052802..c88b0740 100644 --- a/RO-SDN-tapi/Makefile +++ b/RO-SDN-ietfl2vpn/Makefile @@ -16,9 +16,11 @@ all: clean package clean: - rm -rf dist deb_dist osm_rosdn_tapi-*.tar.gz osm_rosdn_tapi.egg-info .eggs + rm -rf dist deb_dist osm_rosdn_ietfl2vpn-*.tar.gz osm_rosdn_ietfl2vpn.egg-info .eggs + rm -rf osm_rosdn_tapi-*.tar.gz osm_rosdn_tapi.egg-info package: python3 setup.py --command-packages=stdeb.command sdist_dsc - cd deb_dist/osm-rosdn-tapi*/ && dpkg-buildpackage -rfakeroot -uc -us + cd deb_dist/osm-rosdn-ietfl2vpn*/ && dpkg-buildpackage -rfakeroot -uc -us + for pkg in deb_dist/python3-osm-rosdn-ietfl2vpn*.deb; do cp $$pkg deb_dist/python3-osm-rosdn-tapi$${pkg#*-osm-rosdn-ietfl2vpn} ; done diff --git a/RO-SDN-tapi/osm_rosdn_tapi/wimconn_ietfl2vpn.py b/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py similarity index 100% rename from RO-SDN-tapi/osm_rosdn_tapi/wimconn_ietfl2vpn.py rename to RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py diff --git a/RO-SDN-tapi/requirements.txt b/RO-SDN-ietfl2vpn/requirements.txt similarity index 100% rename from RO-SDN-tapi/requirements.txt rename to RO-SDN-ietfl2vpn/requirements.txt diff --git a/RO-SDN-tapi/setup.py b/RO-SDN-ietfl2vpn/setup.py similarity index 85% rename from RO-SDN-tapi/setup.py rename to RO-SDN-ietfl2vpn/setup.py index 9217492a..9db91ef9 100644 --- a/RO-SDN-tapi/setup.py +++ b/RO-SDN-ietfl2vpn/setup.py @@ -18,19 +18,19 @@ from setuptools import setup -_name = "osm_rosdn_tapi" +_name = "osm_rosdn_ietfl2vpn" README = """ =========== -osm-rosdn_tapi +osm-rosdn_ietfl2vpn =========== -osm-ro pluging for tapi (ietfl2vpn) SDN +osm-ro pluging for ietfl2vpn SDN """ setup( name=_name, - description='OSM ro sdn plugin for tapi (ietfl2vpn)', + description='OSM ro sdn plugin for ietfl2vpn', long_description=README, version_command=('git describe --match v* --tags --long --dirty', 'pep440-git-full'), # version=VERSION, @@ -51,6 +51,6 @@ setup( ], setup_requires=['setuptools-version-command'], entry_points={ - 'osm_rosdn.plugins': ['rosdn_tapi = osm_rosdn_tapi.wimconn_ietfl2vpn:WimconnectorIETFL2VPN'], + 'osm_rosdn.plugins': ['rosdn_ietfl2vpn = osm_rosdn_ietfl2vpn.wimconn_ietfl2vpn:WimconnectorIETFL2VPN'], }, ) diff --git a/RO-SDN-tapi/stdeb.cfg b/RO-SDN-ietfl2vpn/stdeb.cfg similarity index 100% rename from RO-SDN-tapi/stdeb.cfg rename to RO-SDN-ietfl2vpn/stdeb.cfg diff --git a/RO-SDN-arista/tox.ini b/RO-SDN-ietfl2vpn/tox.ini similarity index 90% rename from RO-SDN-arista/tox.ini rename to RO-SDN-ietfl2vpn/tox.ini index d737d6ec..040210ce 100644 --- a/RO-SDN-arista/tox.ini +++ b/RO-SDN-ietfl2vpn/tox.ini @@ -26,12 +26,12 @@ commands=python3 -m unittest discover -v [testenv:flake8] basepython = python3 deps = flake8 -commands = flake8 osm_rosdn_arista --max-line-length 120 \ +commands = flake8 osm_rosdn_ietfl2vpn --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_arista.tests +commands = python3 -m unittest osm_rosdn_ietfl2vpn.tests [testenv:build] basepython = python3 diff --git a/RO-client/osm_roclient/roclient.py b/RO-client/osm_roclient/roclient.py index 0e6d32ce..b2eb3ffa 100755 --- a/RO-client/osm_roclient/roclient.py +++ b/RO-client/osm_roclient/roclient.py @@ -2263,7 +2263,7 @@ def main(): wim_create_parser.add_argument("url", action="store", help="url for the wim") wim_create_parser.add_argument("--type", action="store", - help="wim type: tapi, onos, dynpac or odl (default)") + help="wim type: ietfl2vpn, dynpac, ...") wim_create_parser.add_argument("--config", action="store", help="additional configuration in json/yaml format") wim_create_parser.add_argument("--description", action="store", diff --git a/RO/osm_ro/openmanoclient.py b/RO/osm_ro/openmanoclient.py index fc8bde11..a72c73e0 100644 --- a/RO/osm_ro/openmanoclient.py +++ b/RO/osm_ro/openmanoclient.py @@ -602,7 +602,7 @@ class openmanoclient(): must be a dictionary or a json/yaml text. name: the wim name. Overwrite descriptor name if any wim_url: the wim URL. Overwrite descriptor vim_url if any - wim_type: the WIM type, can be tapi, odl, onos. Overwrite descriptor type if any + wim_type: the WIM type, can be ietfl2vpn, odl, onos. Overwrite descriptor type if any public: boolean, by default not public description: wim description. Overwrite descriptor description if any config: dictionary with extra configuration for the concrete wim @@ -639,7 +639,7 @@ class openmanoclient(): parameters to change can be supplied by the descriptor or as parameters: new_name: the wim name wim_url: the wim URL - wim_type: the wim type, can be tapi, onos, odl + wim_type: the wim type, can be ietfl2vpn, onos, odl public: boolean, available to other tenants description: wim description Return: Raises an exception on error, not found or found several diff --git a/RO/osm_ro/wim/schemas.py b/RO/osm_ro/wim/schemas.py index f20d418f..6c0a8489 100644 --- a/RO/osm_ro/wim/schemas.py +++ b/RO/osm_ro/wim/schemas.py @@ -39,7 +39,7 @@ from ..openmano_schemas import ( ) # WIM ------------------------------------------------------------------------- -wim_types = ["tapi", "onos", "onos_vpls", "odl", "dynpac", "dummy"] +wim_types = ["ietfl2vpn", "dynpac", "arista_cloudvision", "floodlightof", "onosof", "onos_vpls", "odlof", "dummy"] dpid_type = { "type": "string", @@ -96,7 +96,7 @@ wim_schema_properties = { "description": description_schema, "type": { "type": "string", - # "enum": ["tapi", "onos", "odl", "dynpac", "dummy"] + # "enum": ["ietfl2vpn", "onos", "odl", "dynpac", "dummy", ...] }, "wim_url": description_schema, "config": { diff --git a/RO/osm_ro/wim/tests/fixtures.py b/RO/osm_ro/wim/tests/fixtures.py index 4280a460..6e36b55d 100644 --- a/RO/osm_ro/wim/tests/fixtures.py +++ b/RO/osm_ro/wim/tests/fixtures.py @@ -53,7 +53,7 @@ def wim(identifier=0): return {'name': 'wim%d' % identifier, 'uuid': uuid('wim%d' % identifier), 'wim_url': 'localhost', - 'type': 'tapi'} + 'type': 'ietfl2vpn'} def tenant(identifier=0): diff --git a/devops-stages/stage-build.sh b/devops-stages/stage-build.sh index 28ad87c4..aea4749d 100755 --- a/devops-stages/stage-build.sh +++ b/devops-stages/stage-build.sh @@ -24,18 +24,18 @@ cp RO/deb_dist/python3-osm-ro_*.deb deb_dist/ make -C RO-client clean package cp RO-client/deb_dist/python3-osm-roclient_*.deb deb_dist/ -# VIM plugings: vmware openstack AWS fos azure Opennebula +# VIM plugings: vmware, openstack, AWS, fos, azure, Opennebula, for vim_plugin in RO-VIM-* do make -C $vim_plugin clean package cp ${vim_plugin}/deb_dist/python3-osm-rovim*.deb deb_dist/ done -# SDN plugins - -# SDN plugins: Dynpack Tapi Onosof Floodlightof +# SDN plugins: DynPac, Ietfl2vpn, Onosof Floodlightof for sdn_plugin in RO-SDN-* do + [[ "$sdn_plugin" == RO-SDN-tapi ]] && continue # tapi folder appears at Jenkins due to container reuse + [[ "$sdn_plugin" == RO-SDN-arista ]] && continue # arista folder appears at Jenkins due to container reuse make -C $sdn_plugin clean package cp ${sdn_plugin}/deb_dist/python3-osm-rosdn*.deb deb_dist/ done -- 2.25.1