change SDN types from tapi to ietfl2vpn, from arista to arista_cloudvision

Change-Id: I01d61cf64521707c92f58c668f0372b5daa010c5
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/Dockerfile-local b/Dockerfile-local
index 1f9a117..d8c8432 100644
--- a/Dockerfile-local
+++ b/Dockerfile-local
@@ -57,12 +57,12 @@
     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/Makefile
deleted file mode 100644
index 1606bb3..0000000
--- a/RO-SDN-arista/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-# 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_arista-*.tar.gz osm_rosdn_arista.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
-
diff --git a/RO-SDN-arista/tox.ini b/RO-SDN-arista/tox.ini
deleted file mode 100644
index d737d6e..0000000
--- a/RO-SDN-arista/tox.ini
+++ /dev/null
@@ -1,41 +0,0 @@
-##
-# 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 = py3
-toxworkdir={homedir}/.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
-
-[testenv:flake8]
-basepython = python3
-deps = flake8
-commands = flake8 osm_rosdn_arista --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
-
-[testenv:build]
-basepython = python3
-deps = stdeb
-       setuptools-version-command
-commands = python3 setup.py --command-packages=stdeb.command bdist_deb
-
diff --git a/RO-SDN-tapi/Makefile b/RO-SDN-arista_cloudvision/Makefile
similarity index 68%
rename from RO-SDN-tapi/Makefile
rename to RO-SDN-arista_cloudvision/Makefile
index 2e05280..4890e8e 100644
--- a/RO-SDN-tapi/Makefile
+++ b/RO-SDN-arista_cloudvision/Makefile
@@ -16,9 +16,10 @@
 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_arista_cloudvision-*.tar.gz osm_rosdn_arista_cloudvision.egg-info .eggs
 
 package:
 	python3 setup.py --command-packages=stdeb.command sdist_dsc
-	cd deb_dist/osm-rosdn-tapi*/ && 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 571add6..37f4c58 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_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 d974aad..ab8385b 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 @@
                       "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%
copy from RO-SDN-tapi/tox.ini
copy to RO-SDN-arista_cloudvision/tox.ini
index 7d643cd..d534123 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%
copy from RO-SDN-tapi/Makefile
copy to RO-SDN-ietfl2vpn/Makefile
index 2e05280..c88b074 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 9217492..9db91ef 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_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-arista/stdeb.cfg b/RO-SDN-ietfl2vpn/stdeb.cfg
similarity index 100%
copy from RO-SDN-arista/stdeb.cfg
copy to RO-SDN-ietfl2vpn/stdeb.cfg
diff --git a/RO-SDN-tapi/tox.ini b/RO-SDN-ietfl2vpn/tox.ini
similarity index 90%
rename from RO-SDN-tapi/tox.ini
rename to RO-SDN-ietfl2vpn/tox.ini
index 7d643cd..040210c 100644
--- a/RO-SDN-tapi/tox.ini
+++ b/RO-SDN-ietfl2vpn/tox.ini
@@ -26,12 +26,12 @@
 [testenv:flake8]
 basepython = python3
 deps = flake8
-commands = flake8 osm_rosdn_tapi --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_tapi.tests
+commands = python3 -m unittest osm_rosdn_ietfl2vpn.tests
 
 [testenv:build]
 basepython = python3
diff --git a/RO-SDN-tapi/stdeb.cfg b/RO-SDN-tapi/stdeb.cfg
deleted file mode 100644
index 0c718e4..0000000
--- a/RO-SDN-tapi/stdeb.cfg
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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
-
diff --git a/RO-client/osm_roclient/roclient.py b/RO-client/osm_roclient/roclient.py
index 0e6d32c..b2eb3ff 100755
--- a/RO-client/osm_roclient/roclient.py
+++ b/RO-client/osm_roclient/roclient.py
@@ -2263,7 +2263,7 @@
     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 fc8bde1..a72c73e 100644
--- a/RO/osm_ro/openmanoclient.py
+++ b/RO/osm_ro/openmanoclient.py
@@ -602,7 +602,7 @@
                 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 @@
             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 f20d418..6c0a848 100644
--- a/RO/osm_ro/wim/schemas.py
+++ b/RO/osm_ro/wim/schemas.py
@@ -39,7 +39,7 @@
 )
 
 # 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 @@
     "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 4280a46..6e36b55 100644
--- a/RO/osm_ro/wim/tests/fixtures.py
+++ b/RO/osm_ro/wim/tests/fixtures.py
@@ -53,7 +53,7 @@
     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 28ad87c..aea4749 100755
--- a/devops-stages/stage-build.sh
+++ b/devops-stages/stage-build.sh
@@ -24,18 +24,18 @@
 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