Define message-summary dict keys as constants
Refactor code to eliminate hardcoded strings like "message state".
Add wrapper method and test for method rmr_set_vlevel.
Unpin xappframepy version in Ping/Pong Dockerfiles.
Use constants for message-state values instead of integers.
Drop all mentions of NNG.
Bump version to 1.1.0.
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I27c0bcb4ae6d6a85b518510fd1a4c651d3445313
diff --git a/examples/pong_xapp.py b/examples/pong_xapp.py
index 5c90685..863f635 100644
--- a/examples/pong_xapp.py
+++ b/examples/pong_xapp.py
@@ -18,7 +18,7 @@
# limitations under the License.
# ==================================================================================
import json
-from ricxappframe.xapp_frame import RMRXapp
+from ricxappframe.xapp_frame import RMRXapp, rmr
def post_init(_self):
@@ -31,7 +31,7 @@
self.logger.info("registered 60000 handler called!")
# see comment in ping about this; bytes does not work with the ric mdc logger currently
print(summary)
- jpay = json.loads(summary["payload"])
+ jpay = json.loads(summary[rmr.RMR_MS_MSG_PAYLOAD])
self.rmr_rts(sbuf, new_payload=json.dumps({"ACK": jpay["test_send"]}).encode(), new_mtype=60001, retries=100)
self.rmr_free(sbuf)