VOL-2241: Python 3 migration
- rename adapter class file and remove unneeded __init__ to make imports work without major rearrange
- venv and Dockerfile fixups needed for new pyvoltha (cannot install old first)
- clean up yaml config file as it contained empty entries that failed to parse
- clean up imports
- remove itervalues iter*
- convert to list() as needed
- test with python 3.6
- skip non-dict items in tcont loop
- update to voltha-protos 2.1.0
- migrate socketserver and simplehttpserver to python3 import
Change-Id: Id8efa72b6796a3055b1927716503a33544bb6548
diff --git a/python/docker/Dockerfile.openonu_adapter b/python/docker/Dockerfile.openonu_adapter
index 9c42a59..f21cc9f 100644
--- a/python/docker/Dockerfile.openonu_adapter
+++ b/python/docker/Dockerfile.openonu_adapter
@@ -11,26 +11,24 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM voltha/voltha-python-base:1.0.0
+FROM voltha/voltha-python-base:2.0.0
# Install adapter requirements.
COPY requirements.txt /tmp/requirements.txt
-RUN pip install -r /tmp/requirements.txt
+RUN pip install --no-cache-dir -r /tmp/requirements.txt
ARG LOCAL_PYVOLTHA
ARG LOCAL_PROTOS
COPY local_imports/ /local_imports/
RUN if [ -n "$LOCAL_PYVOLTHA" ] ; then \
- pip install /local_imports/pyvoltha/dist/*.tar.gz ; \
+ pip install --no-cache-dir /local_imports/pyvoltha/dist/*.tar.gz ; \
fi
RUN if [ -n "$LOCAL_PROTOS" ] ; then \
- pip install /local_imports/voltha-protos/dist/*.tar.gz ; \
+ pip install --no-cache-dir /local_imports/voltha-protos/dist/*.tar.gz ; \
fi
# Bundle app source
-RUN mkdir /voltha && touch /voltha/__init__.py
-RUN mkdir /voltha/adapters && touch /voltha/adapters/__init__.py
ENV PYTHONPATH=/voltha
COPY adapters/brcm_openomci_onu /voltha/adapters/brcm_openomci_onu