From dde21b2f84eab009a4051ae4641ec3f348ab575f Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Wed, 6 Sep 2023 10:31:22 +0200 Subject: [PATCH] Update Dockerfiles and installer to remove pyangbind patch Change-Id: I231ad9e7cda7a39a2c4a6a4afcfdfe1ad57a289e Signed-off-by: garciadeblas --- docker/NBI/Dockerfile | 3 --- docker/NBI/pyangbind.patch | 46 -------------------------------- docker/osmclient/Dockerfile | 5 +--- docker/osmclient/pyangbind.patch | 46 -------------------------------- docker/tests/Dockerfile | 3 --- docker/tests/pyangbind.patch | 46 -------------------------------- installers/full_install_osm.sh | 1 - 7 files changed, 1 insertion(+), 149 deletions(-) delete mode 100644 docker/NBI/pyangbind.patch delete mode 100644 docker/osmclient/pyangbind.patch delete mode 100644 docker/tests/pyangbind.patch diff --git a/docker/NBI/Dockerfile b/docker/NBI/Dockerfile index 9b9ccde2..8e985976 100644 --- a/docker/NBI/Dockerfile +++ b/docker/NBI/Dockerfile @@ -53,9 +53,6 @@ RUN pip3 install \ -r /usr/lib/python3/dist-packages/osm_im/requirements.txt \ -r /usr/lib/python3/dist-packages/osm_nbi/requirements.txt -COPY pyangbind.patch ./ -RUN patch /usr/local/lib/python3.10/dist-packages/pyangbind/lib/yangtypes.py < ./pyangbind.patch - ####################################################################################### FROM ubuntu:22.04 as FINAL diff --git a/docker/NBI/pyangbind.patch b/docker/NBI/pyangbind.patch deleted file mode 100644 index 30772996..00000000 --- a/docker/NBI/pyangbind.patch +++ /dev/null @@ -1,46 +0,0 @@ -####################################################################################### -# Copyright ETSI Contributors and Others. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -####################################################################################### - -*** .tox/cover/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py 2023-05-10 06:50:57.876027148 -0400 ---- .tox/cover/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py 2023-05-10 06:51:11.772022417 -0400 -*************** limitations under the License. -*** 22,27 **** ---- 22,28 ---- - from __future__ import unicode_literals - - import collections -+ from six.moves import collections_abc - import copy - import uuid - from decimal import Decimal -*************** def TypedListType(*args, **kwargs): -*** 372,378 **** - if not isinstance(allowed_type, list): - allowed_type = [allowed_type] - -! class TypedList(collections.MutableSequence): - _pybind_generated_by = "TypedListType" - _list = list() - ---- 373,379 ---- - if not isinstance(allowed_type, list): - allowed_type = [allowed_type] - -! class TypedList(collections_abc.MutableSequence): - _pybind_generated_by = "TypedListType" - _list = list() - diff --git a/docker/osmclient/Dockerfile b/docker/osmclient/Dockerfile index 932bcdc7..643ff3e7 100644 --- a/docker/osmclient/Dockerfile +++ b/docker/osmclient/Dockerfile @@ -48,9 +48,6 @@ RUN pip3 install \ -r /usr/lib/python3/dist-packages/osm_im/requirements.txt \ -r /usr/lib/python3/dist-packages/osmclient/requirements.txt -COPY pyangbind.patch ./ -RUN patch /usr/local/lib/python3.10/dist-packages/pyangbind/lib/yangtypes.py < ./pyangbind.patch - ####################################################################################### FROM ubuntu:22.04 as FINAL @@ -101,4 +98,4 @@ ENV OSM_USER admin ENV OSM_PASSWORD admin ENV OSM_PROJECT admin -ENTRYPOINT [ "/bin/bash" ] \ No newline at end of file +ENTRYPOINT [ "/bin/bash" ] diff --git a/docker/osmclient/pyangbind.patch b/docker/osmclient/pyangbind.patch deleted file mode 100644 index 30772996..00000000 --- a/docker/osmclient/pyangbind.patch +++ /dev/null @@ -1,46 +0,0 @@ -####################################################################################### -# Copyright ETSI Contributors and Others. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -####################################################################################### - -*** .tox/cover/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py 2023-05-10 06:50:57.876027148 -0400 ---- .tox/cover/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py 2023-05-10 06:51:11.772022417 -0400 -*************** limitations under the License. -*** 22,27 **** ---- 22,28 ---- - from __future__ import unicode_literals - - import collections -+ from six.moves import collections_abc - import copy - import uuid - from decimal import Decimal -*************** def TypedListType(*args, **kwargs): -*** 372,378 **** - if not isinstance(allowed_type, list): - allowed_type = [allowed_type] - -! class TypedList(collections.MutableSequence): - _pybind_generated_by = "TypedListType" - _list = list() - ---- 373,379 ---- - if not isinstance(allowed_type, list): - allowed_type = [allowed_type] - -! class TypedList(collections_abc.MutableSequence): - _pybind_generated_by = "TypedListType" - _list = list() - diff --git a/docker/tests/Dockerfile b/docker/tests/Dockerfile index 49a1e4c4..34eda458 100644 --- a/docker/tests/Dockerfile +++ b/docker/tests/Dockerfile @@ -65,9 +65,6 @@ RUN mv /usr/share/osm-tests/robot-systest /robot-systest RUN mv /usr/share/osm-tests/conformance-tests/ /robot-systest/ RUN mv /usr/share/osm-tests/charm.sh /usr/sbin/charm -COPY pyangbind.patch /robot-systest -RUN patch /usr/local/lib/python3.10/dist-packages/pyangbind/lib/yangtypes.py < /robot-systest/pyangbind.patch - ARG CACHE_DATE=not_a_date RUN git clone \ https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git \ diff --git a/docker/tests/pyangbind.patch b/docker/tests/pyangbind.patch deleted file mode 100644 index 30772996..00000000 --- a/docker/tests/pyangbind.patch +++ /dev/null @@ -1,46 +0,0 @@ -####################################################################################### -# Copyright ETSI Contributors and Others. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. -####################################################################################### - -*** .tox/cover/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py 2023-05-10 06:50:57.876027148 -0400 ---- .tox/cover/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py 2023-05-10 06:51:11.772022417 -0400 -*************** limitations under the License. -*** 22,27 **** ---- 22,28 ---- - from __future__ import unicode_literals - - import collections -+ from six.moves import collections_abc - import copy - import uuid - from decimal import Decimal -*************** def TypedListType(*args, **kwargs): -*** 372,378 **** - if not isinstance(allowed_type, list): - allowed_type = [allowed_type] - -! class TypedList(collections.MutableSequence): - _pybind_generated_by = "TypedListType" - _list = list() - ---- 373,379 ---- - if not isinstance(allowed_type, list): - allowed_type = [allowed_type] - -! class TypedList(collections_abc.MutableSequence): - _pybind_generated_by = "TypedListType" - _list = list() - diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 256b8d50..591a1361 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -186,7 +186,6 @@ function install_osmclient(){ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y python3-osm-im python3-osmclient if [ -f /usr/lib/python3/dist-packages/osm_im/requirements.txt ]; then python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt - patch $HOME/.local/lib/python3.10/site-packages/pyangbind/lib/yangtypes.py < /usr/share/osm-devops/docker/osmclient/pyangbind.patch fi if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libmagic1 -- 2.25.1