Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Python3 support for vim-emu server #105

Merged
merged 2 commits into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ FROM python:3.6-slim
RUN apt-get update && apt-get install -y git build-essential
RUN pip install flake8
RUN pip install tavern # fix (try to remove once the tavern installation is not broken anymore)
RUN pip install tngsdk.project
RUN pip install tngsdk.package
ADD . /tng-sdk-benchmark
WORKDIR /tng-sdk-benchmark
RUN python setup.py install
RUN python setup.py develop

#
# Runtime
Expand Down
11 changes: 8 additions & 3 deletions node-installers/node-vim-emu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,25 @@
creates: "/usr/local/bin/vim-emu" # skip if vim-emu is there
- name: "Install: vim-emu setup.py"
become: yes
shell: "python setup.py install"
shell: "python3 setup.py install"
args:
chdir: "{{ install_base_path }}/vim-emu"
creates: "/usr/local/bin/vim-emu" # skip if vim-emu is there
- name: "Install: tng-sdk-project (using pip3)"
become: yes
shell: "pip3 install tngsdk.project"
- name: "Install: tng-sdk-package (using pip3)"
become: yes
shell: "pip3 install tngsdk.package"
- name: "Install: Git clone tng-sdk-benchmark (for emusrv component)"
git:
repo: "https://github.com/sonata-nfv/tng-sdk-benchmark.git"
dest: "{{ install_base_path }}/tng-sdk-benchmark"
- name: "Install: tng-sdk-benchmark setup.py"
become: yes
shell: "python setup.py install"
shell: "python3 setup.py install"
args:
chdir: "{{ install_base_path }}/tng-sdk-benchmark"
# creates: "/usr/local/bin/tng-bench-emusrv" # deatctivated: always use latest code from master
- name: "Install: Pulling example Docker images"
become: yes
shell: |
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
setuptools
Flask
flask-restplus
pytest==4.3
pyyaml>=5.1
pyaml
jsonschema
coloredlogs
requests
flask-restplus
gevent==1.4.0
docker
numpy==1.16
pandas==0.24
flatten-dict
pyangbind
tngsdk.project
tngsdk.package
pyangbind
13 changes: 5 additions & 8 deletions src/tngsdk/benchmark/pdriver/vimemu/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,16 @@
import time
import signal
import datetime
import platform
from ctypes import c_bool
from flask import Flask, Blueprint
from flask_restplus import Resource, Api, Namespace
from werkzeug.contrib.fixers import ProxyFix
from gevent.pywsgi import WSGIServer
# Hotfix:
if "2.7" in str(platform.python_version()):
# pylint: disable=E0402
from emuvim.dcemulator.net import DCNetwork
from mininet.log import setLogLevel
from emuvim.api.rest.rest_api_endpoint import RestApiEndpoint
from emuvim.api.tango import TangoLLCMEndpoint
# pylint: disable=E0402
from emuvim.dcemulator.net import DCNetwork
from mininet.log import setLogLevel
from emuvim.api.rest.rest_api_endpoint import RestApiEndpoint
from emuvim.api.tango import TangoLLCMEndpoint


LOG = logging.getLogger(__name__)
Expand Down