Move to ricxappframe rmr, rmr3.6.3 92/3192/2 2.1.6
authorTommy Carpenter <tc677g@att.com>
Tue, 7 Apr 2020 12:36:42 +0000 (08:36 -0400)
committerTommy Carpenter <tc677g@att.com>
Tue, 7 Apr 2020 12:38:03 +0000 (08:38 -0400)
Issue-ID: RIC-228
Change-Id: I879d93e111d04e8a382fa0428e3d8b652e57f3a4
Signed-off-by: Tommy Carpenter <tc677g@att.com>
14 files changed:
Dockerfile
Dockerfile-Unit-Test
a1/a1rmr.py
container-tag.yaml
docs/developer-guide.rst
docs/release-notes.rst
integration_tests/a1mediator/Chart.yaml
integration_tests/install_rmr.sh
integration_tests/testxappcode/Dockerfile-delay-receiver
integration_tests/testxappcode/Dockerfile-query-receiver
integration_tests/testxappcode/Dockerfile-test-receiver
rmr-version.yaml
setup.py
tests/test_controller.py

index d18d7d1..d749e4f 100644 (file)
@@ -40,7 +40,7 @@ RUN mkdir -p /opt/route/
 # python copy; this basically makes the 2 stage python build work
 COPY --from=compile-image /home/a1user/.local /home/a1user/.local
 # copy rmr .so from the builder image
 # python copy; this basically makes the 2 stage python build work
 COPY --from=compile-image /home/a1user/.local /home/a1user/.local
 # copy rmr .so from the builder image
-COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
 # Switch to a non-root user for security reasons. a1 does not currently write into any dirs so no chowns are needed at this time.
 RUN addgroup -S a1user && adduser -S -G a1user a1user
 USER a1user
 # Switch to a non-root user for security reasons. a1 does not currently write into any dirs so no chowns are needed at this time.
 RUN addgroup -S a1user && adduser -S -G a1user a1user
 USER a1user
index a0a9a02..943a98e 100644 (file)
@@ -17,7 +17,7 @@
 FROM python:3.8-alpine
 
 # copy rmr .so from the builder image
 FROM python:3.8-alpine
 
 # copy rmr .so from the builder image
-COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
 
 # dir that rmr routing file temp goes into
 RUN mkdir -p /opt/route/
 
 # dir that rmr routing file temp goes into
 RUN mkdir -p /opt/route/
index 771842a..3d0ff95 100644 (file)
@@ -22,7 +22,7 @@ import queue
 import time
 import json
 from threading import Thread
 import time
 import json
 from threading import Thread
-from rmr import rmr, helpers
+from ricxappframe.rmr import rmr, helpers
 from mdclogpy import Logger
 from a1 import data, messages
 from a1.exceptions import PolicyTypeNotFound, PolicyInstanceNotFound
 from mdclogpy import Logger
 from a1 import data, messages
 from a1.exceptions import PolicyTypeNotFound, PolicyInstanceNotFound
@@ -45,6 +45,8 @@ class _RmrLoop:
     """
     class represents an rmr loop that constantly reads from rmr and performs operations based on waiting messages
     this launches a thread, it should probably only be called once; the public facing method to access these ensures this
     """
     class represents an rmr loop that constantly reads from rmr and performs operations based on waiting messages
     this launches a thread, it should probably only be called once; the public facing method to access these ensures this
+
+    TODO: the xapp frame has a version of this looping structure. See if A1 can switch to that.
     """
 
     def __init__(self, init_func_override=None, rcv_func_override=None):
     """
 
     def __init__(self, init_func_override=None, rcv_func_override=None):
index c05d3bf..094961d 100644 (file)
@@ -1,4 +1,4 @@
 # The Jenkins job uses this string for the tag in the image name
 # for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
 ---
 # The Jenkins job uses this string for the tag in the image name
 # for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
 ---
-tag: 2.1.5
+tag: 2.1.6
index 6ef21f9..63ddde3 100644 (file)
@@ -42,11 +42,6 @@ When version changes are made in that image, rebuilding those 5 containers in th
 
 However, there are two items in this repo that must be kept in sync:  ``rmr-version.yaml``, which  controls what rmr gets installed for unit testing in Jenkins, and ``integration_tests/install_rmr.sh`` which is a useful script for a variety of local testing.
 
 
 However, there are two items in this repo that must be kept in sync:  ``rmr-version.yaml``, which  controls what rmr gets installed for unit testing in Jenkins, and ``integration_tests/install_rmr.sh`` which is a useful script for a variety of local testing.
 
-Version bumping pyrmr
----------------------
-rmr-python is the python binding to rmr . Installing rmr per the above does not install it.
-Bumping the rmr python version is done via ``setup.py``
-
 Version bumping python itself
 -----------------------------
 If you want to update the version of python itself (ie just done from 37 to 38):
 Version bumping python itself
 -----------------------------
 If you want to update the version of python itself (ie just done from 37 to 38):
@@ -91,7 +86,7 @@ Then, run all the tests from the root (this requires the python packages ``tox``
    tox -c tox-integration.ini
 
 This script:
    tox -c tox-integration.ini
 
 This script:
-1. Deploys 2 helm charts (4 containers) into a local kubernetes installation
+1. Deploys 3 helm charts (5 containers) into a local kubernetes installation
 2. Port forwards a pod ClusterIP to localhost
 3. Uses “tavern” to run some tests against the server
 4. Barrages the server with apache bench
 2. Port forwards a pod ClusterIP to localhost
 3. Uses “tavern” to run some tests against the server
 4. Barrages the server with apache bench
index 439937c..c153413 100644 (file)
@@ -14,6 +14,13 @@ and this project adheres to `Semantic Versioning <http://semver.org/>`__.
    :depth: 3
    :local:
 
    :depth: 3
    :local:
 
+[2.1.6] - 4/7/2020
+-------------------
+::
+
+    * Switch to rmr 3.6.3
+    * Switch to using rmr in the ricxappframe
+
 
 [2.1.5] - 3/19/2020
 -------------------
 
 [2.1.5] - 3/19/2020
 -------------------
index 3432ee7..ed7135f 100644 (file)
@@ -1,4 +1,4 @@
 apiVersion: v1
 description: A1 Helm chart for Kubernetes
 name: a1mediator
 apiVersion: v1
 description: A1 Helm chart for Kubernetes
 name: a1mediator
-version: 2.1.5
+version: 2.1.6
index 5ddc168..1d26594 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #!/bin/sh
-git clone --branch 3.6.1 https://gerrit.oran-osc.org/r/ric-plt/lib/rmr \
+git clone --branch 3.6.3 https://gerrit.oran-osc.org/r/ric-plt/lib/rmr \
     && cd rmr \
     && mkdir .build; cd .build \
     && echo "<<<installing rmr devel headers>>>" \
     && cd rmr \
     && mkdir .build; cd .build \
     && echo "<<<installing rmr devel headers>>>" \
index 2398424..03725a1 100644 (file)
@@ -16,7 +16,7 @@
 # ==================================================================================
 
 # This Dockerfile uses a two stage Docker build
 # ==================================================================================
 
 # This Dockerfile uses a two stage Docker build
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3
 
 # go will complain if there is a go.mod at the root of the GOPATH so we can't.
 RUN mkdir myxapp
 
 # go will complain if there is a go.mod at the root of the GOPATH so we can't.
 RUN mkdir myxapp
index 9b83c9b..e45b15a 100644 (file)
@@ -16,7 +16,7 @@
 # ==================================================================================
 
 # This Dockerfile uses a two stage Docker build
 # ==================================================================================
 
 # This Dockerfile uses a two stage Docker build
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3
 
 # go will complain if there is a go.mod at the root of the GOPATH so we can't.
 RUN mkdir myxapp
 
 # go will complain if there is a go.mod at the root of the GOPATH so we can't.
 RUN mkdir myxapp
index bf9323a..3b9cc3d 100644 (file)
@@ -16,9 +16,7 @@
 # ==================================================================================
 
 # This Dockerfile uses a two stage Docker build
 # ==================================================================================
 
 # This Dockerfile uses a two stage Docker build
-
-# The first stage is defined here: https://gerrit.o-ran-sc.org/r/gitweb?p=ci-management.git;a=blob;f=docker/bldr-alpine3-go/Dockerfile;h=a1e31f07e6113d4a02202793ace6ebc780d71583;hb=3711ffcbfe06f6c872bf4a0871eb5f2a2fcd83ae
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3
 
 # go will complain if there is a go.mod at the root of the GOPATH so we can't.
 RUN mkdir myxapp
 
 # go will complain if there is a go.mod at the root of the GOPATH so we can't.
 RUN mkdir myxapp
index 07573f1..2d82c45 100644 (file)
@@ -1,3 +1,3 @@
 # CI script installs RMR from PackageCloud using this version
 ---
 # CI script installs RMR from PackageCloud using this version
 ---
-version: 3.6.1
+version: 3.6.3
index 1179239..67e2765 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -18,21 +18,13 @@ from setuptools import setup, find_packages
 
 setup(
     name="a1",
 
 setup(
     name="a1",
-    version="2.1.5",
+    version="2.1.6",
     packages=find_packages(exclude=["tests.*", "tests"]),
     author="Tommy Carpenter",
     description="RIC A1 Mediator for policy/intent changes",
     url="https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/a1",
     entry_points={"console_scripts": ["run.py=a1.run:main"]},
     # we require jsonschema, should be in that list, but connexion already requires a specific version of it
     packages=find_packages(exclude=["tests.*", "tests"]),
     author="Tommy Carpenter",
     description="RIC A1 Mediator for policy/intent changes",
     url="https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/a1",
     entry_points={"console_scripts": ["run.py=a1.run:main"]},
     # we require jsonschema, should be in that list, but connexion already requires a specific version of it
-    install_requires=[
-        "requests",
-        "Flask",
-        "connexion[swagger-ui]",
-        "gevent",
-        "rmr>=4.0.0,<5.0.0",
-        "mdclogpy",
-        "ricxappframe>=0.4.0",
-    ],
+    install_requires=["requests", "Flask", "connexion[swagger-ui]", "gevent", "mdclogpy", "ricxappframe>=1.0.0,<2.0.0"],
     package_data={"a1": ["openapi.yaml"]},
 )
     package_data={"a1": ["openapi.yaml"]},
 )
index 0601bbc..2aac5a9 100644 (file)
@@ -19,7 +19,7 @@ tests for controller
 # ==================================================================================
 import time
 import json
 # ==================================================================================
 import time
 import json
-from rmr.rmr_mocks import rmr_mocks
+from ricxappframe.rmr.rmr_mocks import rmr_mocks
 from ricxappframe.xapp_sdl import SDLWrapper
 from ricsdl.exceptions import RejectedByBackend, NotConnected, BackendError
 from a1 import a1rmr, data
 from ricxappframe.xapp_sdl import SDLWrapper
 from ricsdl.exceptions import RejectedByBackend, NotConnected, BackendError
 from a1 import a1rmr, data
@@ -89,7 +89,7 @@ def _fake_dequeue_deleted():
 def _test_put_patch(monkeypatch):
     rmr_mocks.patch_rmr(monkeypatch)
     # assert that rmr bad states don't cause problems
 def _test_put_patch(monkeypatch):
     rmr_mocks.patch_rmr(monkeypatch)
     # assert that rmr bad states don't cause problems
-    monkeypatch.setattr("rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(10))
+    monkeypatch.setattr("ricxappframe.rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(10))
 
 
 def _no_ac(client):
 
 
 def _no_ac(client):