Cole Walker 93778b296e Build Debian container image for notificationservice-base-v1-api
Add the required code and Dockerfile to build a Debian based container
image of notificationservice-base to support v1 API backwards
compatibility.

The notificationservice-base-v1 code added here is being ported forward
from stx.6.0. This code existed as-is in StarlingX prior to the work
done to implement the ORAN Notification API. It is being returned in
order to support user's needs for backwards compatbility. Subsequent
work will done to update the helm charts, allowing
notificationservice-base-v1-api and notificationservice-base-v2-api
(ORAN Notification) to be deployed in parallel.

Test plan:
PASS: Build container image
PASS: Manually deploy image and test with v1 client

Story: 2010538
Task: 47175

Change-Id: I2f672fe1b226cb60b62bd5fe7f8abbedc7b0c4cc
2023-01-30 15:05:15 +00:00

25 lines
928 B
Python

#coding=utf-8
#
# Copyright (c) 2021-2023 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import oslo_messaging
from oslo_config import cfg
def setup_client(rpc_endpoint_info, topic, server):
oslo_messaging.set_transport_defaults(rpc_endpoint_info.Exchange)
transport = oslo_messaging.get_rpc_transport(cfg.CONF, url=rpc_endpoint_info.TransportEndpoint)
target = oslo_messaging.Target(topic=topic,
version=rpc_endpoint_info.Version,
server=server,
namespace=rpc_endpoint_info.Namespace)
client = oslo_messaging.RPCClient(transport, target)
return client
def get_transport(rpc_endpoint_info):
oslo_messaging.set_transport_defaults(rpc_endpoint_info.Exchange)
return oslo_messaging.get_rpc_transport(cfg.CONF, url=rpc_endpoint_info.TransportEndpoint)