diff options
author | efiacor <fiachra.corcoran@est.tech> | 2022-03-04 12:29:46 +0000 |
---|---|---|
committer | efiacor <fiachra.corcoran@est.tech> | 2022-03-05 12:31:34 +0000 |
commit | 61b6d6920113fa0be4025a3ce0cf60ddce956b52 (patch) | |
tree | 0087cbd8ae07484679964aaa29aed75076f0de87 | |
parent | 860728b66a792d0944b482b7394d6a04b1a74404 (diff) |
[KAFKA] Fix sasl user params
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I4779298d1d59ebfee12527ce4d762f8441803a26
Issue-ID: DMAAP-1705
-rw-r--r-- | robotframework-onap/ONAPLibrary/KafkaKeywords.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/robotframework-onap/ONAPLibrary/KafkaKeywords.py b/robotframework-onap/ONAPLibrary/KafkaKeywords.py index 46e0b3b..2ebb902 100644 --- a/robotframework-onap/ONAPLibrary/KafkaKeywords.py +++ b/robotframework-onap/ONAPLibrary/KafkaKeywords.py @@ -32,12 +32,12 @@ class KafkaKeywords(object): self._cache = utils.ConnectionCache('No Kafka Environments created') @keyword - def connect(self, alias, kafka_host, sasl_user, sasl_password, sasl_mechanism="SCRAM-SHA-512"): + def connect(self, alias, kafka_host, sasl_user, sasl_password, sasl_mechanism="PLAIN"): """connect to the specified kafka server""" client = { "bootstrap_servers": kafka_host, - "sasl_username": sasl_user, - "sasl_password": sasl_password, + "sasl_plain_username": sasl_user, + "sasl_plain_password": sasl_password, "security_protocol": 'SASL_PLAINTEXT', "ssl_context": ssl.create_default_context(), "sasl_mechanism": sasl_mechanism @@ -55,8 +55,8 @@ class KafkaKeywords(object): def _get_producer(self, alias): cache = self._cache.switch(alias) prod = KafkaProducer(bootstrap_servers=cache['bootstrap_servers'], - sasl_username=cache['sasl_username'], - sasl_password=cache['sasl_password'], + sasl_plain_username=cache['sasl_username'], + sasl_plain_password=cache['sasl_password'], security_protocol=cache['security_protocol'], ssl_context=cache['ssl_context'], sasl_mechanism=cache['sasl_mechanism'], @@ -87,8 +87,8 @@ class KafkaKeywords(object): cache = self._cache.switch(alias) consumer = KafkaConsumer(bootstrap_servers=cache['bootstrap_servers'], - sasl_username=cache['sasl_username'], - sasl_password=cache['sasl_password'], + sasl_plain_username=cache['sasl_username'], + sasl_plain_password=cache['sasl_password'], security_protocol=cache['security_protocol'], ssl_context=cache['ssl_context'], sasl_mechanism=cache['sasl_mechanism'], |