From: tierno Date: Mon, 4 May 2020 11:44:15 +0000 (+0000) Subject: create base package 'osm_ro_plugin' for plugin X-Git-Tag: release-v8.0-start~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=7277486065c905f91477bb064da86855a8fa269a;p=osm%2FRO.git create base package 'osm_ro_plugin' for plugin contains base packabe, dummy and failing connectors All plugins will require this package instead of osm_ro In that way plugin development is more independent from main project, and it can be re-used in other projects. For example openvim can use these SDN plugins without importing osm_ro Change-Id: I9b598fdca269f04391e731cd07bb244f3918635d Signed-off-by: tierno --- diff --git a/Dockerfile-local b/Dockerfile-local index d8c8432a..97d804a1 100644 --- a/Dockerfile-local +++ b/Dockerfile-local @@ -48,6 +48,7 @@ COPY . /root/RO RUN /root/RO/RO/osm_ro/scripts/install-osm-im.sh --develop && \ mkdir -p /var/log/osm && \ + python3 -m pip install -e /root/RO/RO-plugin && \ python3 -m pip install -e /root/RO/RO && \ python3 -m pip install -e /root/RO/RO-client && \ python3 -m pip install -e /root/RO/RO-VIM-vmware && \ diff --git a/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py index 37f4c582..ca8e58f2 100644 --- a/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py +++ b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py @@ -26,7 +26,7 @@ # # This work has been performed in the context of Arista Telefonica OSM PoC. ## -from osm_ro.wim.sdnconn import SdnConnectorBase, SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError import re import socket # Required by compare function diff --git a/RO-SDN-arista_cloudvision/requirements.txt b/RO-SDN-arista_cloudvision/requirements.txt index cd1edfe0..a4ac97e9 100644 --- a/RO-SDN-arista_cloudvision/requirements.txt +++ b/RO-SDN-arista_cloudvision/requirements.txt @@ -16,5 +16,4 @@ requests uuid cvprac -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-arista_cloudvision/setup.py b/RO-SDN-arista_cloudvision/setup.py index ab8385bc..33bd29fd 100644 --- a/RO-SDN-arista_cloudvision/setup.py +++ b/RO-SDN-arista_cloudvision/setup.py @@ -36,18 +36,20 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='oscarluis.peral@atos.net', # TODO py3 - # TODO py3 maintainer_email='', + author_email='OSM_TECH@LIST.ETSI.ORG', + maintainer='Oscar Luis Peral', + maintainer_email='oscarluis.peral@atos.net', 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", - "uuid", - "cvprac", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO"], + install_requires=[ + "requests", + "uuid", + "cvprac", + "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_rosdn.plugins': ['rosdn_arista_cloudvision = osm_rosdn_arista_cloudvision.' diff --git a/RO-SDN-arista_cloudvision/stdeb.cfg b/RO-SDN-arista_cloudvision/stdeb.cfg index 0c718e4f..d1ff8c69 100644 --- a/RO-SDN-arista_cloudvision/stdeb.cfg +++ b/RO-SDN-arista_cloudvision/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro +Depends3: python3-requests, python3-osm-ro-plugin, python3-pip diff --git a/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py b/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py index 31072c36..27f739f3 100755 --- a/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py +++ b/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py @@ -31,7 +31,7 @@ import paramiko import requests import struct import sys -from osm_ro.wim.sdnconn import SdnConnectorBase, SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError class DpbSshInterface(): diff --git a/RO-SDN-dpb/requirements.txt b/RO-SDN-dpb/requirements.txt index 16035fcb..354756f6 100644 --- a/RO-SDN-dpb/requirements.txt +++ b/RO-SDN-dpb/requirements.txt @@ -15,5 +15,6 @@ paramiko requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin + diff --git a/RO-SDN-dpb/setup.py b/RO-SDN-dpb/setup.py index 6e1f9a7d..2d869f9b 100644 --- a/RO-SDN-dpb/setup.py +++ b/RO-SDN-dpb/setup.py @@ -36,16 +36,20 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', packages=[_name], include_package_data=True, dependency_links=["git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro"], - install_requires=["paramiko", "requests", "osm-ro"], + install_requires=[ + "paramiko", + "requests", + "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_rosdn.plugins': ['rosdn_dpb = osm_rosdn_dpb.wimconn_dpb:DpbConnector'], diff --git a/RO-SDN-dpb/stdeb.cfg b/RO-SDN-dpb/stdeb.cfg index 8c821647..c2228dff 100644 --- a/RO-SDN-dpb/stdeb.cfg +++ b/RO-SDN-dpb/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-paramiko, python3-requests, python3-osm-ro +Depends3: python3-paramiko, python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py b/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py index b32856b4..c99627c3 100644 --- a/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py +++ b/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py @@ -26,7 +26,7 @@ import json import logging from enum import Enum -from osm_ro.wim.sdnconn import SdnConnectorBase, SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError class SdnError(Enum): diff --git a/RO-SDN-dynpac/requirements.txt b/RO-SDN-dynpac/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-dynpac/requirements.txt +++ b/RO-SDN-dynpac/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-dynpac/setup.py b/RO-SDN-dynpac/setup.py index af69a0dc..a1c7c718 100644 --- a/RO-SDN-dynpac/setup.py +++ b/RO-SDN-dynpac/setup.py @@ -36,9 +36,9 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', @@ -46,7 +46,7 @@ setup( include_package_data=True, install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-dynpac/stdeb.cfg b/RO-SDN-dynpac/stdeb.cfg index 0c718e4f..dea4d923 100644 --- a/RO-SDN-dynpac/stdeb.cfg +++ b/RO-SDN-dynpac/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py index a2740006..d4c7e3f4 100644 --- a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py +++ b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py @@ -34,7 +34,7 @@ __date__ = "$28-oct-2014 12:07:15$" import json import requests import logging -from osm_ro.wim.openflow_conn import OpenflowConn, OpenflowConnUnexpectedResponse, OpenflowConnConnectionException +from osm_ro_plugin.openflow_conn import OpenflowConn, OpenflowConnUnexpectedResponse, OpenflowConnConnectionException class OfConnFloodLight(OpenflowConn): diff --git a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py index 6d90fe93..3303a4d0 100644 --- a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py +++ b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py @@ -20,7 +20,7 @@ """ import logging -from osm_ro.wim.openflow_conn import SdnConnectorOpenFlow +from osm_ro_plugin.openflow_conn import SdnConnectorOpenFlow from .floodlight_of import OfConnFloodLight diff --git a/RO-SDN-floodlight_openflow/requirements.txt b/RO-SDN-floodlight_openflow/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-floodlight_openflow/requirements.txt +++ b/RO-SDN-floodlight_openflow/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-floodlight_openflow/setup.py b/RO-SDN-floodlight_openflow/setup.py index d5b9848c..faf1ce7b 100644 --- a/RO-SDN-floodlight_openflow/setup.py +++ b/RO-SDN-floodlight_openflow/setup.py @@ -46,7 +46,7 @@ setup( include_package_data=True, install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-floodlight_openflow/stdeb.cfg b/RO-SDN-floodlight_openflow/stdeb.cfg index 0c718e4f..f5f8e839 100644 --- a/RO-SDN-floodlight_openflow/stdeb.cfg +++ b/RO-SDN-floodlight_openflow/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro - +Maintainer: Alfonso Tierno +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py b/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py index 26680b5a..9b67fc17 100644 --- a/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py +++ b/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py @@ -33,7 +33,7 @@ the Layer 2 service. import requests import uuid import logging -from osm_ro.wim.sdnconn import SdnConnectorBase, SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError """CHeck layer where we move it""" diff --git a/RO-SDN-ietfl2vpn/requirements.txt b/RO-SDN-ietfl2vpn/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-ietfl2vpn/requirements.txt +++ b/RO-SDN-ietfl2vpn/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-ietfl2vpn/setup.py b/RO-SDN-ietfl2vpn/setup.py index 9db91ef9..70be60b3 100644 --- a/RO-SDN-ietfl2vpn/setup.py +++ b/RO-SDN-ietfl2vpn/setup.py @@ -36,9 +36,9 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', @@ -47,7 +47,7 @@ setup( dependency_links=["git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro"], install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-ietfl2vpn/stdeb.cfg b/RO-SDN-ietfl2vpn/stdeb.cfg index 0c718e4f..dea4d923 100644 --- a/RO-SDN-ietfl2vpn/stdeb.cfg +++ b/RO-SDN-ietfl2vpn/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py index c99452bb..c8cca228 100644 --- a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py +++ b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py @@ -17,7 +17,7 @@ import logging import json -from osm_ro.wim.sdnconn import SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorError from osm_rosdn_juniper_contrail.rest_lib import ContrailHttp from osm_rosdn_juniper_contrail.rest_lib import NotFound # from osm_rosdn_juniper_contrail.rest_lib import DuplicateFound diff --git a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py index 0bbe7341..43bfb870 100644 --- a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py +++ b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py @@ -21,7 +21,7 @@ import logging import yaml import random -from osm_ro.wim.sdnconn import SdnConnectorBase, SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError # from osm_rosdn_juniper_contrail.rest_lib import ContrailHttp # from osm_rosdn_juniper_contrail.rest_lib import NotFound from osm_rosdn_juniper_contrail.rest_lib import DuplicateFound diff --git a/RO-SDN-juniper_contrail/requirements.txt b/RO-SDN-juniper_contrail/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-juniper_contrail/requirements.txt +++ b/RO-SDN-juniper_contrail/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-juniper_contrail/setup.py b/RO-SDN-juniper_contrail/setup.py index 40f04d16..fef59051 100644 --- a/RO-SDN-juniper_contrail/setup.py +++ b/RO-SDN-juniper_contrail/setup.py @@ -47,7 +47,7 @@ setup( #dependency_links=["git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro"], install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-juniper_contrail/stdeb.cfg b/RO-SDN-juniper_contrail/stdeb.cfg index 0c718e4f..dea4d923 100644 --- a/RO-SDN-juniper_contrail/stdeb.cfg +++ b/RO-SDN-juniper_contrail/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py b/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py index 1cfd0a40..329cb662 100644 --- a/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py +++ b/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py @@ -32,7 +32,7 @@ import json import requests import base64 import logging -from osm_ro.wim.openflow_conn import OpenflowConn, OpenflowConnException, OpenflowConnConnectionException, \ +from osm_ro_plugin.openflow_conn import OpenflowConn, OpenflowConnException, OpenflowConnConnectionException, \ OpenflowConnUnexpectedResponse, OpenflowConnAuthException, OpenflowConnNotFoundException, \ OpenflowConnConflictException, OpenflowConnNotSupportedException, OpenflowConnNotImplemented diff --git a/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py b/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py index 2850be41..190372a8 100644 --- a/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py +++ b/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py @@ -20,7 +20,7 @@ """ import logging -from osm_ro.wim.openflow_conn import SdnConnectorOpenFlow +from osm_ro_plugin.openflow_conn import SdnConnectorOpenFlow from .odl_of import OfConnOdl diff --git a/RO-SDN-odl_openflow/requirements.txt b/RO-SDN-odl_openflow/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-odl_openflow/requirements.txt +++ b/RO-SDN-odl_openflow/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-odl_openflow/setup.py b/RO-SDN-odl_openflow/setup.py index cdebc414..32ebde10 100644 --- a/RO-SDN-odl_openflow/setup.py +++ b/RO-SDN-odl_openflow/setup.py @@ -46,7 +46,7 @@ setup( include_package_data=True, install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-odl_openflow/stdeb.cfg b/RO-SDN-odl_openflow/stdeb.cfg index 0c718e4f..f5f8e839 100644 --- a/RO-SDN-odl_openflow/stdeb.cfg +++ b/RO-SDN-odl_openflow/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro - +Maintainer: Alfonso Tierno +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py b/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py index 139f7a01..fb09327c 100644 --- a/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py +++ b/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py @@ -36,7 +36,7 @@ import json import requests import base64 import logging -from osm_ro.wim.openflow_conn import OpenflowConn, OpenflowConnException, OpenflowConnConnectionException, \ +from osm_ro_plugin.openflow_conn import OpenflowConn, OpenflowConnException, OpenflowConnConnectionException, \ OpenflowConnUnexpectedResponse, OpenflowConnAuthException, OpenflowConnNotFoundException, \ OpenflowConnConflictException, OpenflowConnNotSupportedException, OpenflowConnNotImplemented diff --git a/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py b/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py index e33994a3..c5e081a5 100644 --- a/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py +++ b/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py @@ -20,7 +20,7 @@ """ import logging -from osm_ro.wim.openflow_conn import SdnConnectorOpenFlow +from osm_ro_plugin.openflow_conn import SdnConnectorOpenFlow from .onos_of import OfConnOnos diff --git a/RO-SDN-onos_openflow/requirements.txt b/RO-SDN-onos_openflow/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-onos_openflow/requirements.txt +++ b/RO-SDN-onos_openflow/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-onos_openflow/setup.py b/RO-SDN-onos_openflow/setup.py index 96e6b627..66427b2b 100644 --- a/RO-SDN-onos_openflow/setup.py +++ b/RO-SDN-onos_openflow/setup.py @@ -46,7 +46,7 @@ setup( include_package_data=True, install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-onos_openflow/stdeb.cfg b/RO-SDN-onos_openflow/stdeb.cfg index 0c718e4f..f5f8e839 100644 --- a/RO-SDN-onos_openflow/stdeb.cfg +++ b/RO-SDN-onos_openflow/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro - +Maintainer: Alfonso Tierno +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py b/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py index eb14f557..200e4b08 100644 --- a/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py +++ b/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py @@ -27,7 +27,7 @@ import copy import requests from requests.auth import HTTPBasicAuth -from osm_ro.wim.sdnconn import SdnConnectorBase, SdnConnectorError +from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError class OnosVpls(SdnConnectorBase): diff --git a/RO-SDN-onos_vpls/requirements.txt b/RO-SDN-onos_vpls/requirements.txt index a6f6d655..37366789 100644 --- a/RO-SDN-onos_vpls/requirements.txt +++ b/RO-SDN-onos_vpls/requirements.txt @@ -14,5 +14,4 @@ ## requests -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO - +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-SDN-onos_vpls/setup.py b/RO-SDN-onos_vpls/setup.py index b015e670..562954b7 100644 --- a/RO-SDN-onos_vpls/setup.py +++ b/RO-SDN-onos_vpls/setup.py @@ -36,9 +36,9 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', @@ -46,7 +46,7 @@ setup( include_package_data=True, install_requires=[ "requests", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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={ diff --git a/RO-SDN-onos_vpls/stdeb.cfg b/RO-SDN-onos_vpls/stdeb.cfg index 0c718e4f..dea4d923 100644 --- a/RO-SDN-onos_vpls/stdeb.cfg +++ b/RO-SDN-onos_vpls/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-osm-ro +Depends3: python3-requests, python3-osm-ro-plugin diff --git a/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py b/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py index 28dc4e99..fa245684 100644 --- a/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py +++ b/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py @@ -28,7 +28,7 @@ AWS-connector implements all the methods to interact with AWS using the BOTO cli __author__ = "Saboor Ahmad" __date__ = "10-Apr-2017" -from osm_ro import vimconn +from osm_ro_plugin import vimconn import yaml import logging import netaddr @@ -39,7 +39,7 @@ import boto.ec2 import boto.vpc -class vimconnector(vimconn.vimconnector): +class vimconnector(vimconn.VimConnector): def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level=None, config={}, persistent_info={}): """ Params: uuid - id asigned to this VIM @@ -59,7 +59,7 @@ class vimconnector(vimconn.vimconnector): empty dict. Useful to store login/tokens information for speed up communication """ - vimconn.vimconnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, + vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, config, persistent_info) self.persistent_info = persistent_info @@ -67,15 +67,15 @@ class vimconnector(vimconn.vimconnector): if user: self.a_creds['aws_access_key_id'] = user else: - raise vimconn.vimconnAuthException("Username is not specified") + raise vimconn.VimConnAuthException("Username is not specified") if passwd: self.a_creds['aws_secret_access_key'] = passwd else: - raise vimconn.vimconnAuthException("Password is not specified") + raise vimconn.VimConnAuthException("Password is not specified") if 'region_name' in config: self.region = config.get('region_name') else: - raise vimconn.vimconnException("AWS region_name is not specified at config") + raise vimconn.VimConnException("AWS region_name is not specified at config") self.vpc_data = {} self.subnet_data = {} @@ -113,9 +113,9 @@ class vimconnector(vimconn.vimconnector): self.flavor_info = yaml.load(flavor_data, Loader=yaml.Loader) except yaml.YAMLError as e: self.flavor_info = None - raise vimconn.vimconnException("Bad format at file '{}': {}".format(flavor_data[1:], e)) + raise vimconn.VimConnException("Bad format at file '{}': {}".format(flavor_data[1:], e)) except IOError as e: - raise vimconn.vimconnException("Error reading file '{}': {}".format(flavor_data[1:], e)) + raise vimconn.VimConnException("Error reading file '{}': {}".format(flavor_data[1:], e)) elif isinstance(flavor_data, dict): self.flavor_info = flavor_data @@ -134,7 +134,7 @@ class vimconnector(vimconn.vimconnector): elif index == 'region': self.region = value else: - vimconn.vimconnector.__setitem__(self, index, value) + vimconn.VimConnector.__setitem__(self, index, value) def _reload_connection(self): """Returns: sets boto.EC2 and boto.VPC connection to work with AWS services @@ -157,7 +157,7 @@ class vimconnector(vimconn.vimconnector): self.conn = None self.conn_vpc = None - raise vimconn.vimconnConnectionException(type(e).__name__ + ": " + str(e)) + raise vimconn.VimConnConnectionException(type(e).__name__ + ": " + str(e)) def get_availability_zones_list(self): """Obtain AvailabilityZones from AWS @@ -251,7 +251,7 @@ class vimconnector(vimconn.vimconnector): if availability_zones != 2 and availability_zones != 3: self.logger.debug("Number of AZs should be 2 or 3") - raise vimconn.vimconnNotSupportedException("Number of AZs should be 2 or 3") + raise vimconn.VimConnNotSupportedException("Number of AZs should be 2 or 3") netmasks = ('255.255.252.0', '255.255.254.0', '255.255.255.0', '255.255.255.128') ip = netaddr.IPNetwork(cidr) @@ -259,7 +259,7 @@ class vimconnector(vimconn.vimconnector): if str(mask) not in netmasks: self.logger.debug("Netmask " + str(mask) + " not found") - raise vimconn.vimconnNotFoundException("Netmask " + str(mask) + " not found") + raise vimconn.VimConnNotFoundException("Netmask " + str(mask) + " not found") if availability_zones == 2: for n, netmask in enumerate(netmasks): @@ -459,7 +459,7 @@ class vimconnector(vimconn.vimconnector): if flavor_id in self.flavor_info: return self.flavor_info[flavor_id] else: - raise vimconn.vimconnNotFoundException("Cannot find flavor with this flavor ID/Name") + raise vimconn.VimConnNotFoundException("Cannot find flavor with this flavor ID/Name") except Exception as e: self.format_vimconn_exception(e) @@ -492,7 +492,7 @@ class vimconnector(vimconn.vimconnector): flavor = (key, values) if flavor: return flavor[0] - raise vimconn.vimconnNotFoundException("Cannot find flavor with this flavor ID/Name") + raise vimconn.VimConnNotFoundException("Cannot find flavor with this flavor ID/Name") except Exception as e: self.format_vimconn_exception(e) diff --git a/RO-VIM-aws/requirements.txt b/RO-VIM-aws/requirements.txt index 3cbc8514..689089e9 100644 --- a/RO-VIM-aws/requirements.txt +++ b/RO-VIM-aws/requirements.txt @@ -17,4 +17,4 @@ PyYAML requests netaddr boto -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-VIM-aws/setup.py b/RO-VIM-aws/setup.py index b8f37039..12de7053 100644 --- a/RO-VIM-aws/setup.py +++ b/RO-VIM-aws/setup.py @@ -36,9 +36,9 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', @@ -46,10 +46,10 @@ setup( include_package_data=True, install_requires=[ "requests", "netaddr", "PyYAML", "boto", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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': ['rovim_aws = osm_rovim_aws.vimconn_aws'], + 'osm_rovim.plugins': ['rovim_aws = osm_rovim_aws.vimconn_aws:vimconnector'], }, ) diff --git a/RO-VIM-aws/stdeb.cfg b/RO-VIM-aws/stdeb.cfg index 2193709e..eece4e18 100644 --- a/RO-VIM-aws/stdeb.cfg +++ b/RO-VIM-aws/stdeb.cfg @@ -15,4 +15,4 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-boto, python3-requests, python3-netaddr, python3-yaml, python3-osm-ro +Depends3: python3-boto, python3-requests, python3-netaddr, python3-yaml, python3-osm-ro-plugin diff --git a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py index fc366384..dc408173 100755 --- a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py +++ b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py @@ -14,7 +14,7 @@ ## import base64 -from osm_ro import vimconn +from osm_ro_plugin import vimconn import logging import netaddr import re @@ -41,7 +41,7 @@ if getenv('OSMRO_PDB_DEBUG'): pdb.set_trace() -class vimconnector(vimconn.vimconnector): +class vimconnector(vimconn.VimConnector): # Translate azure provisioning state to OSM provision state # The first three ones are the transitional status once a user initiated action has been requested @@ -85,7 +85,7 @@ class vimconnector(vimconn.vimconnector): "^Standard_B" will select a serie B maybe for test environment """ - vimconn.vimconnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, + vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, config, persistent_info) # Variable that indicates if client must be reloaded or initialized @@ -112,19 +112,19 @@ class vimconnector(vimconn.vimconnector): self._config["subscription_id"] = config.get('subscription_id') # self.logger.debug('Setting subscription to: %s', self.config["subscription_id"]) else: - raise vimconn.vimconnException('Subscription not specified') + raise vimconn.VimConnException('Subscription not specified') # REGION if 'region_name' in config: self.region = config.get('region_name') else: - raise vimconn.vimconnException('Azure region_name is not specified at config') + raise vimconn.VimConnException('Azure region_name is not specified at config') # RESOURCE_GROUP if 'resource_group' in config: self.resource_group = config.get('resource_group') else: - raise vimconn.vimconnException('Azure resource_group is not specified at config') + raise vimconn.VimConnException('Azure resource_group is not specified at config') # VNET_NAME if 'vnet_name' in config: @@ -168,7 +168,7 @@ class vimconnector(vimconn.vimconnector): resource = str(resource_id.split('/')[-1]) return resource except Exception as e: - raise vimconn.vimconnException("Unable to get resource name from resource_id '{}' Error: '{}'". + raise vimconn.VimConnException("Unable to get resource name from resource_id '{}' Error: '{}'". format(resource_id, e)) def _get_location_from_resource_group(self, resource_group_name): @@ -176,7 +176,7 @@ class vimconnector(vimconn.vimconnector): location = self.conn.resource_groups.get(resource_group_name).location return location except Exception as e: - raise vimconn.vimconnNotFoundException("Location '{}' not found".format(resource_group_name)) + raise vimconn.VimConnNotFoundException("Location '{}' not found".format(resource_group_name)) def _get_resource_group_name_from_resource_id(self, resource_id): @@ -184,7 +184,7 @@ class vimconnector(vimconn.vimconnector): rg = str(resource_id.split('/')[4]) return rg except Exception as e: - raise vimconn.vimconnException("Unable to get resource group from invalid resource_id format '{}'". + raise vimconn.VimConnException("Unable to get resource group from invalid resource_id format '{}'". format(resource_id)) def _get_net_name_from_resource_id(self, resource_id): @@ -193,7 +193,7 @@ class vimconnector(vimconn.vimconnector): net_name = str(resource_id.split('/')[8]) return net_name except Exception as e: - raise vimconn.vimconnException("Unable to get azure net_name from invalid resource_id format '{}'". + raise vimconn.VimConnException("Unable to get azure net_name from invalid resource_id format '{}'". format(resource_id)) def _check_subnets_for_vm(self, net_list): @@ -208,16 +208,16 @@ class vimconnector(vimconn.vimconnector): """ Transforms a generic or azure exception to a vimcommException """ - if isinstance(e, vimconn.vimconnException): + if isinstance(e, vimconn.VimConnException): raise elif isinstance(e, AuthenticationError): - raise vimconn.vimconnAuthException(type(e).__name__ + ': ' + str(e)) + raise vimconn.VimConnAuthException(type(e).__name__ + ': ' + str(e)) elif isinstance(e, ConnectionError): - raise vimconn.vimconnConnectionException(type(e).__name__ + ': ' + str(e)) + raise vimconn.VimConnConnectionException(type(e).__name__ + ': ' + str(e)) else: # In case of generic error recreate client self.reload_client = True - raise vimconn.vimconnException(type(e).__name__ + ': ' + str(e)) + raise vimconn.VimConnException(type(e).__name__ + ': ' + str(e)) def _check_or_create_resource_group(self): """ @@ -314,7 +314,7 @@ class vimconnector(vimconn.vimconnector): self.logger.debug('dinamically obtained ip_profile: %s', ip_range) break else: - raise vimconn.vimconnException("Cannot find a non-used subnet range in {}". + raise vimconn.VimConnException("Cannot find a non-used subnet range in {}". format(self.vnet_address_space)) else: ip_profile = {"subnet_address": ip_profile['subnet_address']} @@ -416,25 +416,25 @@ class vimconnector(vimconn.vimconnector): """ It is not allowed to create new flavors in Azure, must always use an existing one """ - raise vimconn.vimconnAuthException("It is not possible to create new flavors in AZURE") + raise vimconn.VimConnAuthException("It is not possible to create new flavors in AZURE") def new_tenant(self, tenant_name, tenant_description): """ It is not allowed to create new tenants in azure """ - raise vimconn.vimconnAuthException("It is not possible to create a TENANT in AZURE") + raise vimconn.VimConnAuthException("It is not possible to create a TENANT in AZURE") def new_image(self, image_dict): """ It is not allowed to create new images in Azure, must always use an existing one """ - raise vimconn.vimconnAuthException("It is not possible to create new images in AZURE") + raise vimconn.VimConnAuthException("It is not possible to create new images in AZURE") def get_image_id_from_path(self, path): """Get the image id from image path in the VIM database. Returns the image_id or raises a vimconnNotFoundException """ - raise vimconn.vimconnAuthException("It is not possible to obtain image from path in AZURE") + raise vimconn.VimConnAuthException("It is not possible to obtain image from path in AZURE") def get_image_list(self, filter_dict={}): """Obtain tenant images from VIM @@ -472,10 +472,10 @@ class vimconnector(vimconn.vimconnector): else: image_list = self._get_sku_image_list(publisher, offer, sku) else: - raise vimconn.vimconnAuthException( + raise vimconn.VimConnAuthException( "List images in Azure must include name param with at least publisher") else: - raise vimconn.vimconnAuthException("List images in Azure must include name param with at" + raise vimconn.VimConnAuthException("List images in Azure must include name param with at" " least publisher") return image_list @@ -608,7 +608,7 @@ class vimconnector(vimconn.vimconnector): # At least one network must be provided if not net_list: - raise vimconn.vimconnException("At least one net must be provided to create a new VM") + raise vimconn.VimConnException("At least one net must be provided to create a new VM") # image_id are several fields of the image_id image_reference = self._get_image_reference(image_id) @@ -778,7 +778,7 @@ class vimconnector(vimconn.vimconnector): else: return availability_zone_list[availability_zone_index] else: - raise vimconn.vimconnConflictException("No enough availability zones at VIM for this deployment") + raise vimconn.VimConnConflictException("No enough availability zones at VIM for this deployment") def _get_azure_availability_zones(self): return self.AZURE_ZONES @@ -838,9 +838,9 @@ class vimconnector(vimconn.vimconnector): created_items[data_disk.id] = True else: - raise vimconn.vimconnNotFoundException("Invalid image_id: %s ", image_id) + raise vimconn.VimConnNotFoundException("Invalid image_id: %s ", image_id) else: - raise vimconn.vimconnNotFoundException("Invalid image_id: %s ", image_id) + raise vimconn.VimConnNotFoundException("Invalid image_id: %s ", image_id) # Attach the disk created virtual_machine.storage_profile.data_disks.append({ @@ -887,7 +887,7 @@ class vimconnector(vimconn.vimconnector): 'version': version } except Exception as e: - raise vimconn.vimconnException( + raise vimconn.VimConnException( "Unable to get image_reference from invalid image_id format: '{}'".format(image_id)) # Azure VM names can not have some special characters @@ -938,7 +938,7 @@ class vimconnector(vimconn.vimconnector): if listedFilteredSizes: return listedFilteredSizes[0]['name'] - raise vimconn.vimconnNotFoundException("Cannot find any flavor matching '{}'".format(str(flavor_dict))) + raise vimconn.VimConnNotFoundException("Cannot find any flavor matching '{}'".format(str(flavor_dict))) except Exception as e: self._format_vimconn_exception(e) @@ -967,7 +967,7 @@ class vimconnector(vimconn.vimconnector): self._reload_connection() return True except Exception as e: - raise vimconn.vimconnException("Connectivity issue with Azure API: {}".format(e)) + raise vimconn.VimConnException("Connectivity issue with Azure API: {}".format(e)) def get_network(self, net_id): @@ -979,7 +979,7 @@ class vimconnector(vimconn.vimconnector): network_list = self.get_network_list(filter_dict) if not network_list: - raise vimconn.vimconnNotFoundException("network '{}' not found".format(net_id)) + raise vimconn.VimConnNotFoundException("network '{}' not found".format(net_id)) else: return network_list[0] @@ -992,7 +992,7 @@ class vimconnector(vimconn.vimconnector): filter_dict = {'name': res_name} network_list = self.get_network_list(filter_dict) if not network_list: - raise vimconn.vimconnNotFoundException("network '{}' not found".format(net_id)) + raise vimconn.VimConnNotFoundException("network '{}' not found".format(net_id)) try: # Subnet API fails (CloudError: Azure Error: ResourceNotFound) @@ -1003,7 +1003,7 @@ class vimconnector(vimconn.vimconnector): except CloudError as e: if e.error.error and "notfound" in e.error.error.lower(): - raise vimconn.vimconnNotFoundException("network '{}' not found".format(net_id)) + raise vimconn.VimConnNotFoundException("network '{}' not found".format(net_id)) else: self._format_vimconn_exception(e) except Exception as e: @@ -1084,7 +1084,7 @@ class vimconnector(vimconn.vimconnector): except CloudError as e: if e.error.error and "notfound" in e.error.error.lower(): - raise vimconn.vimconnNotFoundException("No vm instance found '{}'".format(vm_id)) + raise vimconn.VimConnNotFoundException("No vm instance found '{}'".format(vm_id)) else: self._format_vimconn_exception(e) except Exception as e: @@ -1171,20 +1171,20 @@ class vimconnector(vimconn.vimconnector): return None except CloudError as e: if e.error.error and "notfound" in e.error.error.lower(): - raise vimconn.vimconnNotFoundException("No vm found '{}'".format(vm_id)) + raise vimconn.VimConnNotFoundException("No vm found '{}'".format(vm_id)) else: self._format_vimconn_exception(e) except Exception as e: self._format_vimconn_exception(e) def delete_flavor(self, flavor_id): - raise vimconn.vimconnAuthException("It is not possible to delete a FLAVOR in AZURE") + raise vimconn.VimConnAuthException("It is not possible to delete a FLAVOR in AZURE") def delete_tenant(self, tenant_id,): - raise vimconn.vimconnAuthException("It is not possible to delete a TENANT in AZURE") + raise vimconn.VimConnAuthException("It is not possible to delete a TENANT in AZURE") def delete_image(self, image_id): - raise vimconn.vimconnAuthException("It is not possible to delete a IMAGE in AZURE") + raise vimconn.VimConnAuthException("It is not possible to delete a IMAGE in AZURE") def get_vminstance(self, vm_id): """ @@ -1197,7 +1197,7 @@ class vimconnector(vimconn.vimconnector): vm = self.conn_compute.virtual_machines.get(self.resource_group, resName) except CloudError as e: if e.error.error and "notfound" in e.error.error.lower(): - raise vimconn.vimconnNotFoundException("No vminstance found '{}'".format(vm_id)) + raise vimconn.VimConnNotFoundException("No vminstance found '{}'".format(vm_id)) else: self._format_vimconn_exception(e) except Exception as e: @@ -1222,7 +1222,7 @@ class vimconnector(vimconn.vimconnector): } return flavor else: - raise vimconn.vimconnNotFoundException("flavor '{}' not found".format(flavor_id)) + raise vimconn.VimConnNotFoundException("flavor '{}' not found".format(flavor_id)) def get_tenant_list(self, filter_dict={}): """ Obtains the list of tenants @@ -1290,7 +1290,7 @@ class vimconnector(vimconn.vimconnector): "status": "VIM_ERROR", "error_msg": str(e) } - except vimconn.vimconnNotFoundException as e: + except vimconn.VimConnNotFoundException as e: self.logger.error("VimConnNotFoundException %s when searching subnet", e) out_nets[net_id] = { "status": "DELETED", diff --git a/RO-VIM-azure/requirements.txt b/RO-VIM-azure/requirements.txt index d025c964..88e2fcae 100644 --- a/RO-VIM-azure/requirements.txt +++ b/RO-VIM-azure/requirements.txt @@ -17,4 +17,4 @@ PyYAML requests netaddr azure==4.0.0 -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-VIM-azure/setup.py b/RO-VIM-azure/setup.py index 95483576..9debdd07 100644 --- a/RO-VIM-azure/setup.py +++ b/RO-VIM-azure/setup.py @@ -49,10 +49,10 @@ setup( "netaddr", "PyYAML", "azure==4.0.0", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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': ['rovim_azure = osm_rovim_azure.vimconn_azure'], + 'osm_rovim.plugins': ['rovim_azure = osm_rovim_azure.vimconn_azure:vimconnector'], }, ) diff --git a/RO-VIM-azure/stdeb.cfg b/RO-VIM-azure/stdeb.cfg index 968c55e1..04cf304d 100644 --- a/RO-VIM-azure/stdeb.cfg +++ b/RO-VIM-azure/stdeb.cfg @@ -15,5 +15,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-netaddr, python3-yaml, python3-osm-ro, python3-pip +Depends3: python3-requests, python3-netaddr, python3-yaml, python3-osm-ro-plugin, python3-pip diff --git a/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py b/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py index 903fa78c..a7018f36 100644 --- a/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py +++ b/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py @@ -37,7 +37,7 @@ __date__ ="$2-june-2020 10:35:12$" import uuid import socket import struct -from osm_ro import vimconn +from osm_ro_plugin import vimconn import json from functools import partial from fog05 import FIMAPI @@ -45,7 +45,7 @@ from fog05 import fimapi from fog05_sdk.interfaces.FDU import FDU -class vimconnector(vimconn.vimconnector): +class vimconnector(vimconn.VimConnector): def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level=None, config={}, persistent_info={}): """Constructor of VIM @@ -66,7 +66,7 @@ class vimconnector(vimconn.vimconnector): check against the VIM """ - vimconn.vimconnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, + vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, config, persistent_info) self.logger.debug('vimconn_fos init with config: {}'.format(config)) @@ -99,15 +99,15 @@ class vimconnector(vimconn.vimconnector): def check_vim_connectivity(self): """Checks VIM can be reached and user credentials are ok. - Returns None if success or raised vimconnConnectionException, vimconnAuthException, ... + Returns None if success or raised VimConnConnectionException, VimConnAuthException, ... """ try: self.fos_api.node.list() return None except fimapi.FIMAuthExcetpion as fae: - raise vimconn.vimconnAuthException("Unable to authenticate to the VIM. Error {}".format(fae)) + raise vimconn.VimConnAuthException("Unable to authenticate to the VIM. Error {}".format(fae)) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) def new_network(self, net_name, net_type, ip_profile=None, shared=False, provider_network_profile=None): """Adds a tenant network to VIM @@ -130,7 +130,7 @@ class vimconnector(vimconn.vimconnector): """ self.logger.debug('new_network: {}'.format(locals())) if net_type in ['data','ptp']: - raise vimconn.vimconnNotImplemented('{} type of network not supported'.format(net_type)) + raise vimconn.VimConnNotImplemented('{} type of network not supported'.format(net_type)) net_uuid = '{}'.format(uuid.uuid4()) desc = { @@ -153,15 +153,15 @@ class vimconnector(vimconn.vimconnector): ip.update({'gateway':ip_profile.get('gateway_address', None)}) desc.update({'ip_configuration':ip_info}) else: - raise vimconn.vimconnNotImplemented('IPV6 network is not implemented at VIM') + raise vimconn.VimConnNotImplemented('IPV6 network is not implemented at VIM') desc.update({'ip_configuration':ip}) self.logger.debug('VIM new_network args: {} - Generated Eclipse fog05 Descriptor {}'.format(locals(), desc)) try: self.fos_api.network.add_network(desc) except fimapi.FIMAResouceExistingException as free: - raise vimconn.vimconnConflictException("Network already exists at VIM. Error {}".format(free)) + raise vimconn.VimConnConflictException("Network already exists at VIM. Error {}".format(free)) except Exception as e: - raise vimconn.vimconnException("Unable to create network {}. Error {}".format(net_name, e)) + raise vimconn.VimConnException("Unable to create network {}. Error {}".format(net_name, e)) # No way from the current rest service to get the actual error, most likely it will be an already existing error return net_uuid,{} @@ -191,7 +191,7 @@ class vimconnector(vimconn.vimconnector): try: nets = self.fos_api.network.list() except Exception as e: - raise vimconn.vimconnConnectionException("Cannot get network list from VIM, connection error. Error {}".format(e)) + raise vimconn.VimConnConnectionException("Cannot get network list from VIM, connection error. Error {}".format(e)) filters = [ partial(self.__name_filter, filter_name=filter_dict.get('name')), @@ -229,7 +229,7 @@ class vimconnector(vimconn.vimconnector): self.logger.debug('get_network: {}'.format(net_id)) res = self.get_network_list(filter_dict={'id':net_id}) if len(res) == 0: - raise vimconn.vimconnNotFoundException("Network {} not found at VIM".format(net_id)) + raise vimconn.VimConnNotFoundException("Network {} not found at VIM".format(net_id)) return res[0] def delete_network(self, net_id, created_items=None): @@ -240,9 +240,9 @@ class vimconnector(vimconn.vimconnector): try: self.fos_api.network.remove_network(net_id) except fimapi.FIMNotFoundException as fnfe: - raise vimconn.vimconnNotFoundException("Network {} not found at VIM (already deleted?). Error {}".format(net_id, fnfe)) + raise vimconn.VimConnNotFoundException("Network {} not found at VIM (already deleted?). Error {}".format(net_id, fnfe)) except Exception as e: - raise vimconn.vimconnException("Cannot delete network {} from VIM. Error {}".format(net_id, e)) + raise vimconn.VimConnException("Cannot delete network {} from VIM. Error {}".format(net_id, e)) return net_id def refresh_nets_status(self, net_list): @@ -270,7 +270,7 @@ class vimconnector(vimconn.vimconnector): r.update({ osm_n.get('id'):{'status':osm_n.get('status')} }) - except vimconn.vimconnNotFoundException: + except vimconn.VimConnNotFoundException: r.update({ n:{'status':'VIM_ERROR'} }) @@ -285,9 +285,9 @@ class vimconnector(vimconn.vimconnector): try: r = self.fos_api.flavor.get(flavor_id) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) if r is None: - raise vimconn.vimconnNotFoundException("Flavor not found at VIM") + raise vimconn.VimConnNotFoundException("Flavor not found at VIM") return {'id':r.get('uuid'), 'name':r.get('name'), 'fos':r} def get_flavor_id_from_data(self, flavor_dict): @@ -305,10 +305,10 @@ class vimconnector(vimconn.vimconnector): try: flvs = self.fos_api.flavor.list() except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) r = [x.get('uuid') for x in flvs if (x.get('cpu_min_count') == flavor_dict.get('vcpus') and x.get('ram_size_mb') == flavor_dict.get('ram') and x.get('storage_size_gb') == flavor_dict.get('disk'))] if len(r) == 0: - raise vimconn.vimconnNotFoundException ( "No flavor found" ) + raise vimconn.VimConnNotFoundException ( "No flavor found" ) return r[0] def new_flavor(self, flavor_data): @@ -344,9 +344,9 @@ class vimconnector(vimconn.vimconnector): try: self.fos_api.flavor.add(desc) except fimapi.FIMAResouceExistingException as free: - raise vimconn.vimconnConflictException("Flavor {} already exist at VIM. Error {}".format(flv_id, free)) + raise vimconn.VimConnConflictException("Flavor {} already exist at VIM. Error {}".format(flv_id, free)) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) return flv_id def delete_flavor(self, flavor_id): @@ -355,9 +355,9 @@ class vimconnector(vimconn.vimconnector): try: self.fos_api.flavor.remove(flavor_id) except fimapi.FIMNotFoundException as fnfe: - raise vimconn.vimconnNotFoundException("Flavor {} not found at VIM (already deleted?). Error {}".format(flavor_id, fnfe)) + raise vimconn.VimConnNotFoundException("Flavor {} not found at VIM (already deleted?). Error {}".format(flavor_id, fnfe)) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) return flavor_id def new_image(self, image_dict): @@ -380,9 +380,9 @@ class vimconnector(vimconn.vimconnector): try: self.fos_api.image.add(desc) except fimapi.FIMAResouceExistingException as free: - raise vimconn.vimconnConflictException("Image {} already exist at VIM. Error {}".format(img_id, free)) + raise vimconn.VimConnConflictException("Image {} already exist at VIM. Error {}".format(img_id, free)) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) return img_id def get_image_id_from_path(self, path): @@ -394,10 +394,10 @@ class vimconnector(vimconn.vimconnector): try: imgs = self.fos_api.image.list() except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) res = [x.get('uuid') for x in imgs if x.get('uri')==path] if len(res) == 0: - raise vimconn.vimconnNotFoundException("Image with this path was not found") + raise vimconn.VimConnNotFoundException("Image with this path was not found") return res[0] def get_image_list(self, filter_dict={}): @@ -416,7 +416,7 @@ class vimconnector(vimconn.vimconnector): try: fimgs = self.fos_api.image.list() except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) filters = [ partial(self.__name_filter, filter_name=filter_dict.get('name')), @@ -443,7 +443,7 @@ class vimconnector(vimconn.vimconnector): } r.append(img_info) return r - #raise vimconnNotImplemented( "Should have implemented this" ) + #raise VimConnNotImplemented( "Should have implemented this" ) def new_vminstance(self, name, description, start, image_id, flavor_id, net_list, cloud_config=None, disk_list=None, availability_zone_index=None, availability_zone_list=None): @@ -507,9 +507,9 @@ class vimconnector(vimconn.vimconnector): img = self.fos_api.image.get(image_id) if flv is None: - raise vimconn.vimconnNotFoundException("Flavor {} not found at VIM".format(flavor_id)) + raise vimconn.VimConnNotFoundException("Flavor {} not found at VIM".format(flavor_id)) if img is None: - raise vimconn.vimconnNotFoundException("Image {} not found at VIM".format(image_id)) + raise vimconn.VimConnNotFoundException("Image {} not found at VIM".format(image_id)) created_items = { 'fdu_id':'', @@ -579,6 +579,7 @@ class vimconnector(vimconn.vimconnector): self.logger.debug('Eclipse fog05 FDU Descriptor: {}'.format(fdu_desc)) + fdu = FDU(fdu_desc) try: @@ -613,9 +614,9 @@ class vimconnector(vimconn.vimconnector): self.logger.debug('new_vminstance returns: {} {}'.format( instance.uuid, created_items)) return str(instance.uuid), created_items except fimapi.FIMAResouceExistingException as free: - raise vimconn.vimconnConflictException("VM already exists at VIM. Error {}".format(free)) + raise vimconn.VimConnConflictException("VM already exists at VIM. Error {}".format(free)) except Exception as e: - raise vimconn.vimconnException("Error while instantiating VM {}. Error {}".format(name, e)) + raise vimconn.VimConnException("Error while instantiating VM {}. Error {}".format(name, e)) def get_vminstance(self,vm_id): """Returns the VM instance information from VIM""" @@ -624,9 +625,9 @@ class vimconnector(vimconn.vimconnector): try: instance = self.fos_api.fdu.instance_info(vm_id) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) if instance is None: - raise vimconn.vimconnNotFoundException('VM with id {} not found!'.format(vm_id)) + raise vimconn.VimConnNotFoundException('VM with id {} not found!'.format(vm_id)) return instance.to_json() def delete_vminstance(self, vm_id, created_items=None): @@ -663,10 +664,10 @@ class vimconnector(vimconn.vimconnector): self.fos_api.fdu.offload(fduid) except Exception as e: - raise vimconn.vimconnException("Error on deletting VM with id {}. Error {}".format(vm_id,e)) + raise vimconn.VimConnException("Error on deletting VM with id {}. Error {}".format(vm_id,e)) return vm_id - #raise vimconnNotImplemented( "Should have implemented this" ) + #raise VimConnNotImplemented( "Should have implemented this" ) def refresh_vms_status(self, vm_list): """Get the status of the virtual machines and their interfaces/ports @@ -803,7 +804,7 @@ class vimconnector(vimconn.vimconnector): self.logger.debug('VIM action_vminstance with args: {}'.format(locals())) nid = self.fdu_node_map.get(vm_id) if nid is None: - raise vimconn.vimconnNotFoundException('No node for this VM') + raise vimconn.VimConnNotFoundException('No node for this VM') try: instance = self.fos_api.fdu.instance_info(vm_id) if "start" in action_dict: @@ -812,22 +813,22 @@ class vimconnector(vimconn.vimconnector): elif instance.get('status') == 'PAUSE': self.fos_api.fdu.resume(vm_id) else: - raise vimconn.vimconnConflictException('Cannot start from current state: {}'.format(instance.get('status'))) + raise vimconn.VimConnConflictException('Cannot start from current state: {}'.format(instance.get('status'))) elif "pause" in action_dict: if instance.get('status') == 'RUN': self.fos_api.fdu.pause(vm_id) else: - raise vimconn.vimconnConflictException('Cannot pause from current state: {}'.format(instance.get('status'))) + raise vimconn.VimConnConflictException('Cannot pause from current state: {}'.format(instance.get('status'))) elif "resume" in action_dict: if instance.get('status') == 'PAUSE': self.fos_api.fdu.resume(vm_id) else: - raise vimconn.vimconnConflictException('Cannot resume from current state: {}'.format(instance.get('status'))) + raise vimconn.VimConnConflictException('Cannot resume from current state: {}'.format(instance.get('status'))) elif "shutoff" in action_dict or "shutdown" or "forceOff" in action_dict: if instance.get('status') == 'RUN': self.fos_api.fdu.stop(vm_id) else: - raise vimconn.vimconnConflictException('Cannot shutoff from current state: {}'.format(instance.get('status'))) + raise vimconn.VimConnConflictException('Cannot shutoff from current state: {}'.format(instance.get('status'))) elif "terminate" in action_dict: if instance.get('status') == 'RUN': self.fos_api.fdu.stop(vm_id) @@ -845,14 +846,14 @@ class vimconnector(vimconn.vimconnector): self.fos_api.fdu.undefine(vm_id) # self.fos_api.fdu.offload(vm_id) else: - raise vimconn.vimconnConflictException('Cannot terminate from current state: {}'.format(instance.get('status'))) + raise vimconn.VimConnConflictException('Cannot terminate from current state: {}'.format(instance.get('status'))) elif "rebuild" in action_dict: - raise vimconn.vimconnNotImplemented("Rebuild not implememnted") + raise vimconn.VimConnNotImplemented("Rebuild not implemented") elif "reboot" in action_dict: if instance.get('status') == 'RUN': self.fos_api.fdu.stop(vm_id) self.fos_api.fdu.start(vm_id) else: - raise vimconn.vimconnConflictException('Cannot reboot from current state: {}'.format(instance.get('status'))) + raise vimconn.VimConnConflictException('Cannot reboot from current state: {}'.format(instance.get('status'))) except Exception as e: - raise vimconn.vimconnConnectionException("VIM not reachable. Error {}".format(e)) + raise vimconn.VimConnConnectionException("VIM not reachable. Error {}".format(e)) diff --git a/RO-VIM-fos/requirements.txt b/RO-VIM-fos/requirements.txt index 7adec693..2bded1b9 100644 --- a/RO-VIM-fos/requirements.txt +++ b/RO-VIM-fos/requirements.txt @@ -22,4 +22,4 @@ zenoh==0.3.0 yaks==0.3.0.post1 pyangbind sphinx -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-VIM-fos/setup.py b/RO-VIM-fos/setup.py index a3beee9f..93935664 100644 --- a/RO-VIM-fos/setup.py +++ b/RO-VIM-fos/setup.py @@ -36,9 +36,9 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', @@ -54,10 +54,10 @@ setup( "fog05==0.2.0", "pyangbind", "sphinx", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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': ['rovim_fos = osm_rovim_fos.vimconn_fos'], + 'osm_rovim.plugins': ['rovim_fos = osm_rovim_fos.vimconn_fos:vimconnector'], }, ) diff --git a/RO-VIM-fos/stdeb.cfg b/RO-VIM-fos/stdeb.cfg index cf4b3539..bea34ad0 100644 --- a/RO-VIM-fos/stdeb.cfg +++ b/RO-VIM-fos/stdeb.cfg @@ -15,4 +15,4 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-pip, python3-requests, python3-netaddr, python3-yaml, python3-osm-ro +Depends3: python3-pip, python3-requests, python3-netaddr, python3-yaml, python3-osm-ro-plugin diff --git a/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py b/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py index d788dcbb..00c9b025 100644 --- a/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py +++ b/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py @@ -28,7 +28,7 @@ vimconnector implements all the methods to interact with OpenNebula using the XM __author__ = "Jose Maria Carmona Perez,Juan Antonio Hernando Labajo, Emilio Abraham Garrido Garcia,Alberto Florez " \ "Pages, Andres Pozo Munoz, Santiago Perez Marin, Onlife Networks Telefonica I+D Product Innovation " __date__ = "$13-dec-2017 11:09:29$" -from osm_ro import vimconn +from osm_ro_plugin import vimconn import requests import logging import oca @@ -37,7 +37,7 @@ import math import random import pyone -class vimconnector(vimconn.vimconnector): +class vimconnector(vimconn.VimConnector): def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level="DEBUG", config={}, persistent_info={}): @@ -59,7 +59,7 @@ class vimconnector(vimconn.vimconnector): check against the VIM """ - vimconn.vimconnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, + vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, config) def _new_one_connection(self): @@ -95,7 +95,7 @@ class vimconnector(vimconn.vimconnector): return str(group.id) except Exception as e: self.logger.error("Create new tenant error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def delete_tenant(self, tenant_id): """Delete a tenant from VIM. Returns the old tenant identifier""" @@ -112,10 +112,10 @@ class vimconnector(vimconn.vimconnector): self._delete_secondarygroup(user.id, group.id) group.delete(client) return None - raise vimconn.vimconnNotFoundException("Group {} not found".format(tenant_id)) + raise vimconn.VimConnNotFoundException("Group {} not found".format(tenant_id)) except Exception as e: self.logger.error("Delete tenant " + str(tenant_id) + " error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def _add_secondarygroup(self, id_user, id_group): # change secondary_group to primary_group @@ -229,7 +229,7 @@ class vimconnector(vimconn.vimconnector): return net_id, created_items except Exception as e: self.logger.error("Create new network error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def get_network_list(self, filter_dict={}): """Obtain tenant networks of VIM @@ -272,7 +272,7 @@ class vimconnector(vimconn.vimconnector): return response except Exception as e: self.logger.error("Get network list error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def get_network(self, net_id): """Obtain network details from the 'net_id' VIM network @@ -297,10 +297,10 @@ class vimconnector(vimconn.vimconnector): if net: return net else: - raise vimconn.vimconnNotFoundException("Network {} not found".format(net_id)) + raise vimconn.VimConnNotFoundException("Network {} not found".format(net_id)) except Exception as e: self.logger.error("Get network " + str(net_id) + " error): " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def delete_network(self, net_id, created_items=None): """ @@ -316,7 +316,7 @@ class vimconnector(vimconn.vimconnector): return net_id except Exception as e: self.logger.error("Delete network " + str(net_id) + "error: network not found" + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def refresh_nets_status(self, net_list): """Get the status of the networks @@ -343,17 +343,17 @@ class vimconnector(vimconn.vimconnector): net_vim = self.get_network(net_id) net["status"] = net_vim["status"] net["vim_info"] = None - except vimconn.vimconnNotFoundException as e: + except vimconn.VimConnNotFoundException as e: self.logger.error("Exception getting net status: {}".format(str(e))) net['status'] = "DELETED" net['error_msg'] = str(e) - except vimconn.vimconnException as e: + except vimconn.VimConnException as e: self.logger.error(e) net["status"] = "VIM_ERROR" net["error_msg"] = str(e) net_dict[net_id] = net return net_dict - except vimconn.vimconnException as e: + except vimconn.VimConnException as e: self.logger.error(e) for k in net_dict: net_dict[k]["status"] = "VIM_ERROR" @@ -371,10 +371,10 @@ class vimconnector(vimconn.vimconnector): template = one.template.info(int(flavor_id)) if template is not None: return {'id': template.ID, 'name': template.NAME} - raise vimconn.vimconnNotFoundException("Flavor {} not found".format(flavor_id)) + raise vimconn.VimConnNotFoundException("Flavor {} not found".format(flavor_id)) except Exception as e: self.logger.error("get flavor " + str(flavor_id) + " error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def new_flavor(self, flavor_data): """Adds a tenant flavor to VIM @@ -424,7 +424,7 @@ class vimconnector(vimconn.vimconnector): except Exception as e: self.logger.error("Create new flavor error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def delete_flavor(self, flavor_id): """ Deletes a tenant flavor from VIM @@ -436,7 +436,7 @@ class vimconnector(vimconn.vimconnector): return flavor_id except Exception as e: self.logger.error("Error deleting flavor " + str(flavor_id) + ". Flavor not found") - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def get_image_list(self, filter_dict={}): """Obtain tenant images from VIM @@ -468,7 +468,7 @@ class vimconnector(vimconn.vimconnector): return images except Exception as e: self.logger.error("Get image list error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def new_vminstance(self, name, description, start, image_id, flavor_id, net_list, cloud_config=None, disk_list=None, availability_zone_index=None, availability_zone_list=None): @@ -560,10 +560,10 @@ class vimconnector(vimconn.vimconnector): return str(vm_instance_id), None except pyone.OneNoExistsException as e: self.logger.error("Network with id " + str(e) + " not found: " + str(e)) - raise vimconn.vimconnNotFoundException(e) + raise vimconn.VimConnNotFoundException(e) except Exception as e: self.logger.error("Create new vm instance error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def get_vminstance(self, vm_id): """Returns the VM instance information from VIM""" @@ -573,7 +573,7 @@ class vimconnector(vimconn.vimconnector): return vm except Exception as e: self.logger.error("Getting vm instance error: " + str(e) + ": VM Instance not found") - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def delete_vminstance(self, vm_id, created_items=None): """ @@ -595,10 +595,10 @@ class vimconnector(vimconn.vimconnector): except pyone.OneNoExistsException as e: self.logger.info("The vm " + str(vm_id) + " does not exist or is already deleted") - raise vimconn.vimconnNotFoundException("The vm {} does not exist or is already deleted".format(vm_id)) + raise vimconn.VimConnNotFoundException("The vm {} does not exist or is already deleted".format(vm_id)) except Exception as e: self.logger.error("Delete vm instance " + str(vm_id) + " error: " + str(e)) - raise vimconn.vimconnException(e) + raise vimconn.VimConnException(e) def refresh_vms_status(self, vm_list): """Get the status of the virtual machines and their interfaces/ports diff --git a/RO-VIM-opennebula/requirements.txt b/RO-VIM-opennebula/requirements.txt index 71b09d85..d3420cf9 100644 --- a/RO-VIM-opennebula/requirements.txt +++ b/RO-VIM-opennebula/requirements.txt @@ -20,4 +20,4 @@ netaddr untangle pyone git+https://github.com/python-oca/python-oca#egg=oca -git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO +git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro-plugin&subdirectory=RO-plugin diff --git a/RO-VIM-opennebula/setup.py b/RO-VIM-opennebula/setup.py index 7819282a..4b3ec179 100644 --- a/RO-VIM-opennebula/setup.py +++ b/RO-VIM-opennebula/setup.py @@ -37,9 +37,9 @@ setup( # version=VERSION, # python_requires='>3.5.0', author='ETSI OSM', - # TODO py3 author_email='', - maintainer='OSM_TECH@LIST.ETSI.ORG', # TODO py3 - # TODO py3 maintainer_email='', + 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', @@ -49,10 +49,10 @@ setup( "requests", "netaddr", "PyYAML", - "osm-ro @ git+https://osm.etsi.org/gerrit/osm/RO.git#egg=osm-ro&subdirectory=RO" + "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': ['rovim_opennebula = osm_rovim_opennebula.vimconn_opennebula'], + 'osm_rovim.plugins': ['rovim_opennebula = osm_rovim_opennebula.vimconn_opennebula:vimconnector'], }, ) diff --git a/RO-VIM-opennebula/stdeb.cfg b/RO-VIM-opennebula/stdeb.cfg index 00071bd6..5392c30a 100644 --- a/RO-VIM-opennebula/stdeb.cfg +++ b/RO-VIM-opennebula/stdeb.cfg @@ -16,5 +16,5 @@ [DEFAULT] X-Python3-Version : >= 3.5 -Depends3: python3-requests, python3-netaddr, python3-yaml, python3-osm-ro, python3-pip +Depends3: python3-requests, python3-netaddr, python3-yaml, python3-osm-ro-plugin, python3-pip diff --git a/RO-VIM-openstack/osm_rovim_openstack/tests/test_vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/tests/test_vimconn_openstack.py index 5eb23f07..6bfc1252 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/tests/test_vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/tests/test_vimconn_openstack.py @@ -30,8 +30,8 @@ import unittest import mock from neutronclient.v2_0.client import Client -from osm_ro import vimconn -from osm_ro.vimconn_openstack import vimconnector +from osm_ro_plugin import vimconn +from osm_rovim_openstack.vimconn_openstack import vimconnector __author__ = "Igor D.C." @@ -238,7 +238,7 @@ class TestSfcOperations(unittest.TestCase): @mock.patch.object(Client, 'create_sfc_flow_classifier') def test_new_classification_unsupported_type(self, create_sfc_flow_classifier): - self.assertRaises(vimconn.vimconnNotSupportedException, + self.assertRaises(vimconn.VimConnNotSupportedException, self._test_new_classification, create_sfc_flow_classifier, 'h265') @@ -258,11 +258,11 @@ class TestSfcOperations(unittest.TestCase): def test_new_sfi_bad_ingress_ports(self, create_sfc_port_pair): ingress_ports = ['5311c75d-d718-4369-bbda-cdcc6da60fcc', 'a0273f64-82c9-11e7-b08f-6328e53f0fa7'] - self.assertRaises(vimconn.vimconnNotSupportedException, + self.assertRaises(vimconn.VimConnNotSupportedException, self._test_new_sfi, create_sfc_port_pair, True, ingress_ports=ingress_ports) ingress_ports = [] - self.assertRaises(vimconn.vimconnNotSupportedException, + self.assertRaises(vimconn.VimConnNotSupportedException, self._test_new_sfi, create_sfc_port_pair, True, ingress_ports=ingress_ports) @@ -270,11 +270,11 @@ class TestSfcOperations(unittest.TestCase): def test_new_sfi_bad_egress_ports(self, create_sfc_port_pair): egress_ports = ['230cdf1b-de37-4891-bc07-f9010cf1f967', 'b41228fe-82c9-11e7-9b44-17504174320b'] - self.assertRaises(vimconn.vimconnNotSupportedException, + self.assertRaises(vimconn.VimConnNotSupportedException, self._test_new_sfi, create_sfc_port_pair, True, egress_ports=egress_ports) egress_ports = [] - self.assertRaises(vimconn.vimconnNotSupportedException, + self.assertRaises(vimconn.VimConnNotSupportedException, self._test_new_sfi, create_sfc_port_pair, True, egress_ports=egress_ports) @@ -289,7 +289,7 @@ class TestSfcOperations(unittest.TestCase): def test_new_sf_inconsistent_sfc_encap(self, create_sfc_port_pair_group, get_sfi): get_sfi.return_value = {'sfc_encap': 'nsh'} - self.assertRaises(vimconn.vimconnNotSupportedException, + self.assertRaises(vimconn.VimConnNotSupportedException, self._test_new_sf, create_sfc_port_pair_group) @mock.patch.object(Client, 'create_sfc_port_chain') @@ -566,7 +566,7 @@ class TestSfcOperations(unittest.TestCase): ]} # call the VIM connector - self.assertRaises(vimconn.vimconnConflictException, + self.assertRaises(vimconn.VimConnConflictException, self.vimconn.get_classification, '3196bafc-82dd-11e7-a205-9bf6c14b0721') @@ -580,7 +580,7 @@ class TestSfcOperations(unittest.TestCase): list_sfc_flow_classifiers.return_value = {'flow_classifiers': []} # call the VIM connector - self.assertRaises(vimconn.vimconnNotFoundException, + self.assertRaises(vimconn.VimConnNotFoundException, self.vimconn.get_classification, '3196bafc-82dd-11e7-a205-9bf6c14b0721') @@ -644,7 +644,7 @@ class TestSfcOperations(unittest.TestCase): ]} # call the VIM connector - self.assertRaises(vimconn.vimconnConflictException, + self.assertRaises(vimconn.VimConnConflictException, self.vimconn.get_sfi, 'c0436d92-82db-11e7-8f9c-5fa535f1261f') @@ -658,7 +658,7 @@ class TestSfcOperations(unittest.TestCase): list_sfc_port_pairs.return_value = {'port_pairs': []} # call the VIM connector - self.assertRaises(vimconn.vimconnNotFoundException, + self.assertRaises(vimconn.VimConnNotFoundException, self.vimconn.get_sfi, 'b22892fc-82d9-11e7-ae85-0fea6a3b3757') @@ -715,7 +715,7 @@ class TestSfcOperations(unittest.TestCase): ]} # call the VIM connector - self.assertRaises(vimconn.vimconnConflictException, + self.assertRaises(vimconn.VimConnConflictException, self.vimconn.get_sf, 'b22892fc-82d9-11e7-ae85-0fea6a3b3757') @@ -729,7 +729,7 @@ class TestSfcOperations(unittest.TestCase): list_sfc_port_pair_groups.return_value = {'port_pair_groups': []} # call the VIM connector - self.assertRaises(vimconn.vimconnNotFoundException, + self.assertRaises(vimconn.VimConnNotFoundException, self.vimconn.get_sf, 'b22892fc-82d9-11e7-ae85-0fea6a3b3757') @@ -796,7 +796,7 @@ class TestSfcOperations(unittest.TestCase): ]} # call the VIM connector - self.assertRaises(vimconn.vimconnConflictException, + self.assertRaises(vimconn.VimConnConflictException, self.vimconn.get_sfp, '5d002f38-82de-11e7-a770-f303f11ce66a') @@ -810,7 +810,7 @@ class TestSfcOperations(unittest.TestCase): list_sfc_port_chains.return_value = {'port_chains': []} # call the VIM connector - self.assertRaises(vimconn.vimconnNotFoundException, + self.assertRaises(vimconn.VimConnNotFoundException, self.vimconn.get_sfp, '5d002f38-82de-11e7-a770-f303f11ce66a') diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py index e392ca7a..61231411 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py @@ -32,7 +32,7 @@ to the VIM connector's SFC resources as follows: __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes, xFlow Research, Igor D.C., Eduardo Sousa" __date__ = "$22-sep-2017 23:59:59$" -from osm_ro import vimconn +from osm_ro_plugin import vimconn # import json import logging import netaddr @@ -87,7 +87,7 @@ class SafeDumper(yaml.SafeDumper): return super(SafeDumper, self).represent_data(data) -class vimconnector(vimconn.vimconnector): +class vimconnector(vimconn.VimConnector): def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None, log_level=None, config={}, persistent_info={}): '''using common constructor parameters. In this case @@ -96,11 +96,11 @@ class vimconnector(vimconn.vimconnector): ''' api_version = config.get('APIversion') if api_version and api_version not in ('v3.3', 'v2.0', '2', '3'): - raise vimconn.vimconnException("Invalid value '{}' for config:APIversion. " + raise vimconn.VimConnException("Invalid value '{}' for config:APIversion. " "Allowed values are 'v3.3', 'v2.0', '2' or '3'".format(api_version)) vim_type = config.get('vim_type') if vim_type and vim_type not in ('vio', 'VIO'): - raise vimconn.vimconnException("Invalid value '{}' for config:vim_type." + raise vimconn.VimConnException("Invalid value '{}' for config:vim_type." "Allowed values are 'vio' or 'VIO'".format(vim_type)) if config.get('dataplane_net_vlan_range') is not None: @@ -111,11 +111,11 @@ class vimconnector(vimconn.vimconnector): #validate vlan ranges provided by user self._validate_vlan_ranges(config.get('multisegment_vlan_range'), 'multisegment_vlan_range') - vimconn.vimconnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, + vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, config) if self.config.get("insecure") and self.config.get("ca_cert"): - raise vimconn.vimconnException("options insecure and ca_cert are mutually exclusive") + raise vimconn.VimConnException("options insecure and ca_cert are mutually exclusive") self.verify = True if self.config.get("insecure"): self.verify = False @@ -168,7 +168,7 @@ class vimconnector(vimconn.vimconnector): elif index == 'user_domain_id': return self.config.get("user_domain_id") else: - return vimconn.vimconnector.__getitem__(self, index) + return vimconn.VimConnector.__getitem__(self, index) def __setitem__(self, index, value): """Set individuals parameters and it is marked as dirty so to force connection reload. @@ -178,7 +178,7 @@ class vimconnector(vimconn.vimconnector): elif index == 'user_domain_id': self.config["user_domain_id"] = value else: - vimconn.vimconnector.__setitem__(self, index, value) + vimconn.VimConnector.__setitem__(self, index, value) self.session['reload_client'] = True def serialize(self, value): @@ -401,22 +401,22 @@ class vimconnector(vimconn.vimconnector): if isinstance(exception, (neExceptions.NetworkNotFoundClient, nvExceptions.NotFound, ksExceptions.NotFound, gl1Exceptions.HTTPNotFound)): - raise vimconn.vimconnNotFoundException(type(exception).__name__ + ": " + message_error) + raise vimconn.VimConnNotFoundException(type(exception).__name__ + ": " + message_error) elif isinstance(exception, (HTTPException, gl1Exceptions.HTTPException, gl1Exceptions.CommunicationError, ConnectionError, ksExceptions.ConnectionError, neExceptions.ConnectionFailed)): - raise vimconn.vimconnConnectionException(type(exception).__name__ + ": " + message_error) + raise vimconn.VimConnConnectionException(type(exception).__name__ + ": " + message_error) elif isinstance(exception, (KeyError, nvExceptions.BadRequest, ksExceptions.BadRequest)): - raise vimconn.vimconnException(type(exception).__name__ + ": " + message_error) + raise vimconn.VimConnException(type(exception).__name__ + ": " + message_error) elif isinstance(exception, (nvExceptions.ClientException, ksExceptions.ClientException, neExceptions.NeutronException)): - raise vimconn.vimconnUnexpectedResponse(type(exception).__name__ + ": " + message_error) + raise vimconn.VimConnUnexpectedResponse(type(exception).__name__ + ": " + message_error) elif isinstance(exception, nvExceptions.Conflict): - raise vimconn.vimconnConflictException(type(exception).__name__ + ": " + message_error) - elif isinstance(exception, vimconn.vimconnException): + raise vimconn.VimConnConflictException(type(exception).__name__ + ": " + message_error) + elif isinstance(exception, vimconn.VimConnException): raise exception else: # () self.logger.error("General Exception " + message_error, exc_info=True) - raise vimconn.vimconnConnectionException(type(exception).__name__ + ": " + message_error) + raise vimconn.VimConnConnectionException(type(exception).__name__ + ": " + message_error) def _get_ids_from_name(self): """ @@ -426,7 +426,7 @@ class vimconnector(vimconn.vimconnector): # get tenant_id if only tenant_name is supplied self._reload_connection() if not self.my_tenant_id: - raise vimconn.vimconnConnectionException("Error getting tenant information from name={} id={}". + raise vimconn.VimConnConnectionException("Error getting tenant information from name={} id={}". format(self.tenant_name, self.tenant_id)) if self.config.get('security_groups') and not self.security_groups_id: # convert from name to id @@ -440,7 +440,7 @@ class vimconnector(vimconn.vimconnector): break else: self.security_groups_id = None - raise vimconn.vimconnConnectionException("Not found security group {} for this tenant".format(sg)) + raise vimconn.VimConnConnectionException("Not found security group {} for this tenant".format(sg)) def check_vim_connectivity(self): # just get network list to check connectivity and credentials @@ -541,7 +541,7 @@ class vimconnector(vimconn.vimconnector): # or not declared, just ignore the checking if isinstance(self.config.get('dataplane_physical_net'), (tuple, list)) and \ provider_physical_network not in self.config['dataplane_physical_net']: - raise vimconn.vimconnConflictException( + raise vimconn.VimConnConflictException( "Invalid parameter 'provider-network:physical-network' for network creation. '{}' is not " "one of the declared list at VIM_config:dataplane_physical_net".format( provider_physical_network)) @@ -552,7 +552,7 @@ class vimconnector(vimconn.vimconnector): provider_physical_network = provider_physical_network[0] if not provider_physical_network: - raise vimconn.vimconnConflictException("You must provide a 'dataplane_physical_net' at VIM_config " + raise vimconn.VimConnConflictException("You must provide a 'dataplane_physical_net' at VIM_config " "for creating underlay networks. or use the NS instantiation" " parameter provider-network:physical-network for the VLD") @@ -582,7 +582,7 @@ class vimconnector(vimconn.vimconnector): vlanID = self._generate_multisegment_vlanID() segment2_dict["provider:segmentation_id"] = vlanID # else - # raise vimconn.vimconnConflictException( + # raise vimconn.VimConnConflictException( # "You must provide 'multisegment_vlan_range' at config dict before creating a multisegment network") segment_list.append(segment2_dict) network_dict["segments"] = segment_list @@ -590,7 +590,7 @@ class vimconnector(vimconn.vimconnector): # VIO Specific Changes. It needs a concrete VLAN if self.vim_type == "VIO" and vlan is None: if self.config.get('dataplane_net_vlan_range') is None: - raise vimconn.vimconnConflictException( + raise vimconn.VimConnConflictException( "You must provide 'dataplane_net_vlan_range' in format [start_ID - end_ID] at VIM_config " "for creating underlay networks") network_dict["provider:segmentation_id"] = self._generate_vlanID() @@ -695,9 +695,9 @@ class vimconnector(vimconn.vimconnector): filter_dict={"id": net_id} net_list = self.get_network_list(filter_dict) if len(net_list)==0: - raise vimconn.vimconnNotFoundException("Network '{}' not found".format(net_id)) + raise vimconn.VimConnNotFoundException("Network '{}' not found".format(net_id)) elif len(net_list)>1: - raise vimconn.vimconnConflictException("Found more than one network with this criteria") + raise vimconn.VimConnConflictException("Found more than one network with this criteria") net = net_list[0] subnets=[] for subnet_id in net.get("subnets", () ): @@ -784,11 +784,11 @@ class vimconnector(vimconn.vimconnector): if net_vim.get('fault'): #TODO net['error_msg'] = str(net_vim['fault']) - except vimconn.vimconnNotFoundException as e: + except vimconn.VimConnNotFoundException as e: self.logger.error("Exception getting net status: %s", str(e)) net['status'] = "DELETED" net['error_msg'] = str(e) - except vimconn.vimconnException as e: + except vimconn.VimConnException as e: self.logger.error("Exception getting net status: %s", str(e)) net['status'] = "VIM_ERROR" net['error_msg'] = str(e) @@ -824,9 +824,9 @@ class vimconnector(vimconn.vimconnector): extended = flavor_dict.get("extended", {}) if extended: #TODO - raise vimconn.vimconnNotFoundException("Flavor with EPA still not implemented") + raise vimconn.VimConnNotFoundException("Flavor with EPA still not implemented") # if len(numas) > 1: - # raise vimconn.vimconnNotFoundException("Cannot find any flavor with more than one numa") + # raise vimconn.VimConnNotFoundException("Cannot find any flavor with more than one numa") # numa=numas[0] # numas = extended.get("numas") for flavor in self.nova.flavors.list(): @@ -842,7 +842,7 @@ class vimconnector(vimconn.vimconnector): flavor_candidate_data = flavor_data if not exact_match and flavor_candidate_id: return flavor_candidate_id - raise vimconn.vimconnNotFoundException("Cannot find any flavor matching '{}'".format(str(flavor_dict))) + raise vimconn.VimConnNotFoundException("Cannot find any flavor matching '{}'".format(str(flavor_dict))) except (nvExceptions.NotFound, nvExceptions.ClientException, ksExceptions.ClientException, ConnectionError) as e: self._format_exception(e) @@ -927,7 +927,7 @@ class vimconnector(vimconn.vimconnector): extra_specs["hw:cpu_policy"] = "dedicated" # for interface in numa.get("interfaces",() ): # if interface["dedicated"]=="yes": - # raise vimconn.vimconnException("Passthrough interfaces are not supported for the openstack connector", http_code=vimconn.HTTP_Service_Unavailable) + # raise vimconn.VimConnException("Passthrough interfaces are not supported for the openstack connector", http_code=vimconn.HTTP_Service_Unavailable) # #TODO, add the key 'pci_passthrough:alias"="