Skip to content

Commit

Permalink
Merge pull request #100 from StephenSorriaux/feat/remove-mandatory-ap…
Browse files Browse the repository at this point in the history
…i-version

Remove mandatory api_version option
  • Loading branch information
ryarnyah authored Jun 29, 2021
2 parents 5575d84 + cb9137b commit 1e7ef30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
4 changes: 2 additions & 2 deletions module_utils/kafka_lib_commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
default='PLAINTEXT'
),

api_version=dict(type='str', required=True, default=None),
api_version=dict(type='str', default=None),

ssl_check_hostname=dict(
default=True,
Expand Down Expand Up @@ -236,7 +236,7 @@ def get_manager_from_params(params):

api_version = tuple(
int(p) for p in params['api_version'].strip(".").split(".")
)
) if params.get('api_version') else None

kafka_ssl_files = generate_ssl_object(
ssl_cafile, ssl_certfile, ssl_keyfile, ssl_crlfile
Expand Down
19 changes: 0 additions & 19 deletions molecule/default/tests/ansible_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ def call_kafka_stat_lag(
else:
envs = env_no_sasl
for env in envs:
protocol_version = env['protocol_version']
module_args = {
'api_version': protocol_version,
'bootstrap_servers': env['kfk_addr'],
}
module_args.update(args)
Expand All @@ -149,9 +147,7 @@ def call_kafka_info(
else:
envs = env_no_sasl
for env in envs:
protocol_version = env['protocol_version']
module_args = {
'api_version': protocol_version,
'bootstrap_servers': env['kfk_addr'],
}
module_args.update(args)
Expand All @@ -174,10 +170,7 @@ def call_kafka_lib(
else:
envs = env_no_sasl
for env in envs:
protocol_version = env['protocol_version']

module_args = {
'api_version': protocol_version,
'zookeeper': env['zk_addr'],
'bootstrap_servers': env['kfk_addr'],
}
Expand All @@ -201,10 +194,7 @@ def call_kafka_topic_with_zk(
else:
envs = env_no_sasl
for env in envs:
protocol_version = env['protocol_version']

module_args = {
'api_version': protocol_version,
'zookeeper': env['zk_addr'],
'bootstrap_servers': env['kfk_addr'],
}
Expand Down Expand Up @@ -235,7 +225,6 @@ def call_kafka_topic(
continue

module_args = {
'api_version': protocol_version,
'bootstrap_servers': env['kfk_addr'],
}
module_args.update(args)
Expand Down Expand Up @@ -265,7 +254,6 @@ def call_kafka_topics(
continue

module_args = {
'api_version': protocol_version,
'bootstrap_servers': env['kfk_addr'],
}
module_args.update(args)
Expand Down Expand Up @@ -295,7 +283,6 @@ def call_kafka_quotas(
continue

module_args = {
'api_version': protocol_version,
'zookeeper': env['zk_addr'],
'bootstrap_servers': env['kfk_addr'],
}
Expand All @@ -319,10 +306,7 @@ def call_kafka_acl(
else:
envs = env_no_sasl
for env in envs:
protocol_version = env['protocol_version']

module_args = {
'api_version': protocol_version,
'bootstrap_servers': env['kfk_addr'],
}
module_args.update(args)
Expand All @@ -345,10 +329,7 @@ def call_kafka_acls(
else:
envs = env_no_sasl
for env in envs:
protocol_version = env['protocol_version']

module_args = {
'api_version': protocol_version,
'bootstrap_servers': env['kfk_addr'],
}
module_args.update(args)
Expand Down

0 comments on commit 1e7ef30

Please sign in to comment.