Skip to content

Commit

Permalink
Merge pull request #105 from mpeuster/master
Browse files Browse the repository at this point in the history
Feature: Python3 support for vim-emu server
  • Loading branch information
Manuel Peuster authored Dec 19, 2019
2 parents 29bb6f6 + a54a903 commit 995c54e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
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

0 comments on commit 995c54e

Please sign in to comment.