Pip standerdization and tox replacement

Change-Id: Ic8e6495c9c0a4b46e876fb9f2f8376b7c210f545
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
diff --git a/RO-VIM-vmware/Makefile b/RO-VIM-vmware/Makefile
deleted file mode 100644
index 283afdf..0000000
--- a/RO-VIM-vmware/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-# Copyright VMware Inc.
-# 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_rovim_vmware-*.tar.gz osm_rovim_vmware.egg-info .eggs
-
-package:
-	python3 setup.py --command-packages=stdeb.command sdist_dsc
-	cp debian/python3-osm-rovim-vmware.postinst deb_dist/osm-rovim-vmware*/debian/
-	cd deb_dist/osm-rovim-vmware*/ && dpkg-buildpackage -rfakeroot -uc -us
-
diff --git a/RO-VIM-vmware/debian/python3-osm-rovim-vmware.postinst b/RO-VIM-vmware/debian/python3-osm-rovim-vmware.postinst
deleted file mode 100755
index e7ce877..0000000
--- a/RO-VIM-vmware/debian/python3-osm-rovim-vmware.postinst
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-##
-# Copyright VMware Inc.
-# 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.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact with: OSM_TECH@list.etsi.org
-##
-
-echo "POST INSTALL OSM-ROVIM-VMWARE"
-
-#Pip packages required for vmware connector
-python3 -m pip install --upgrade pip
-python3 -m pip install --upgrade pyvcloud==19.1.1
-python3 -m pip install --upgrade progressbar
-python3 -m pip install --upgrade pyvmomi
-# python3 -m pip install --upgrade prettytable
-# python3 -m pip install --upgrade pyang pyangbind
diff --git a/RO-VIM-vmware/requirements.txt b/RO-VIM-vmware/osm_rovim_vmware/__init__.py
similarity index 71%
rename from RO-VIM-vmware/requirements.txt
rename to RO-VIM-vmware/osm_rovim_vmware/__init__.py
index 1657367..94a6a32 100644
--- a/RO-VIM-vmware/requirements.txt
+++ b/RO-VIM-vmware/osm_rovim_vmware/__init__.py
@@ -1,5 +1,6 @@
-##
-# Copyright VMware Inc.
+#!/usr/bin/env python3
+# Copyright ETSI Contributors and Others.
+#
 # 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
@@ -13,13 +14,3 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ##
-
-PyYAML
-requests
-netaddr
-pyvcloud==19.1.1
-pyvmomi
-progressbar
-prettytable
-# TODO py3 genisoimage
-git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin
diff --git a/RO-VIM-vmware/requirements.txt b/RO-VIM-vmware/osm_rovim_vmware/tests/__init__.py
similarity index 70%
copy from RO-VIM-vmware/requirements.txt
copy to RO-VIM-vmware/osm_rovim_vmware/tests/__init__.py
index 1657367..04f7d49 100644
--- a/RO-VIM-vmware/requirements.txt
+++ b/RO-VIM-vmware/osm_rovim_vmware/tests/__init__.py
@@ -1,5 +1,6 @@
-##
-# Copyright VMware Inc.
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
 # 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
@@ -12,14 +13,4 @@
 # implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-##
-
-PyYAML
-requests
-netaddr
-pyvcloud==19.1.1
-pyvmomi
-progressbar
-prettytable
-# TODO py3 genisoimage
-git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin
+#######################################################################################
diff --git a/RO-VIM-vmware/osm_rovim_vmware/tests/test_vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/tests/test_vimconn_vmware.py
index 467531a..77f4808 100755
--- a/RO-VIM-vmware/osm_rovim_vmware/tests/test_vimconn_vmware.py
+++ b/RO-VIM-vmware/osm_rovim_vmware/tests/test_vimconn_vmware.py
@@ -36,7 +36,7 @@
 import os
 import unittest
 from unittest import mock
-import test_vimconn_vmware_xml_response as xml_resp
+import tests.test_vimconn_vmware_xml_response as xml_resp
 from os import path
 
 __author__ = "Prakash Kasar"
diff --git a/RO-VIM-vmware/setup.py b/RO-VIM-vmware/setup.py
index 10f34de..f60085d 100644
--- a/RO-VIM-vmware/setup.py
+++ b/RO-VIM-vmware/setup.py
@@ -20,8 +20,16 @@
 from setuptools import setup
 
 _name = "osm_rovim_vmware"
+_version_command = ("git describe --match v* --tags --long --dirty", "pep440-git-full")
+_description = "OSM ro vim plugin for vmware"
+_author = "OSM Support"
+_author_email = "osmsupport@etsi.org"
+_maintainer = "OSM Support"
+_maintainer_email = "osmsupport@etsi.org"
+_license = "Apache 2.0"
+_url = "https://osm.etsi.org/gitweb/?p=osm/RO.git;a=summary"
 
-README = """
+_readme = """
 ===========
 osm-rovim_vmware
 ===========
@@ -31,32 +39,17 @@
 
 setup(
     name=_name,
-    description="OSM ro vim plugin for vmware",
-    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="OSM_TECH@LIST.ETSI.ORG",
-    maintainer="ETSI OSM",
-    maintainer_email="OSM_TECH@LIST.ETSI.ORG",
-    url="https://osm.etsi.org/gitweb/?p=osm/RO.git;a=summary",
-    license="Apache 2.0",
+    description=_description,
+    long_description=_readme,
+    version_command=_version_command,
+    author=_author,
+    author_email=_author_email,
+    maintainer=_maintainer,
+    maintainer_email=_maintainer_email,
+    url=_url,
+    license=_license,
     packages=[_name],
     include_package_data=True,
-    install_requires=[
-        "pyvcloud==19.1.1",
-        "progressbar",
-        "prettytable",
-        "pyvmomi",
-        "requests",
-        "netaddr",
-        "PyYAML",
-        "osm-ro-plugin @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin",
-    ],
     setup_requires=["setuptools-version-command"],
     entry_points={
         "osm_rovim.plugins": [
diff --git a/RO-VIM-vmware/stdeb.cfg b/RO-VIM-vmware/stdeb.cfg
index 58ac4b9..53cde31 100644
--- a/RO-VIM-vmware/stdeb.cfg
+++ b/RO-VIM-vmware/stdeb.cfg
@@ -16,5 +16,4 @@
 
 [DEFAULT]
 X-Python3-Version : >= 3.5
-Depends3: python3-requests, python3-netaddr, python3-yaml, python3-osm-ro-plugin, python3-pip,
-          genisoimage, python3-progressbar, python3-prettytable, python3-pyvmomi
+Depends3: genisoimage
diff --git a/RO-VIM-vmware/tox.ini b/RO-VIM-vmware/tox.ini
deleted file mode 100644
index 038d140..0000000
--- a/RO-VIM-vmware/tox.ini
+++ /dev/null
@@ -1,42 +0,0 @@
-##
-# Copyright VMware Inc.
-# 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 -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_rovim_vmware --max-line-length 120 \
-    --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp --ignore W291,W293,W503,W605,E123,E125,E203,E226,E241
-
-[testenv:unittest]
-basepython = python3
-commands = python3 -m unittest discover -v osm_rovim_vmware/tests
-
-[testenv:build]
-basepython = python3
-deps = stdeb
-       setuptools-version-command
-commands = python3 setup.py --command-packages=stdeb.command bdist_deb
-