Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intelmqctl does not handle environment parameters #2063

Closed
ghost opened this issue Aug 23, 2021 · 1 comment
Closed

intelmqctl does not handle environment parameters #2063

ghost opened this issue Aug 23, 2021 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior component: intelmqctl
Milestone

Comments

@ghost
Copy link

ghost commented Aug 23, 2021

def load_defaults_configuration(self, silent=False):
for option, value in utils.get_global_settings().items():
setattr(self.parameters, option, value)
# TODO: Rewrite variables with env. variables ( CURRENT IMPLEMENTATION NOT FINAL )
# "destination_pipeline_host": "127.0.0.1",
# "source_pipeline_host": "127.0.0.1",
if os.getenv('INTELMQ_IS_DOCKER', None):
pipeline_host = os.getenv('INTELMQ_PIPELINE_HOST')
if pipeline_host:
setattr(self.parameters, 'destination_pipeline_host', pipeline_host)
setattr(self.parameters, 'source_pipeline_host', pipeline_host)

Is missing the environment parameter handling like here:

intelmq/intelmq/lib/bot.py

Lines 770 to 783 in 16240fb

intelmq_environment = [elem for elem in os.environ if elem.startswith('INTELMQ_')]
for elem in intelmq_environment:
option = elem[8:].lower()
value = os.environ[elem]
# do some conversions:
if value == 'True':
value = True
elif value == 'False':
value = False
elif value.isnumeric():
value = int(value)
setattr(self, option, value)
self.__log_configuration_parameter("environment", option, value)

the old workaround is not needed any more and should be removed

@ghost ghost added bug Indicates an unexpected problem or unintended behavior component: intelmqctl labels Aug 23, 2021
@ghost ghost added this to the 3.0.1 milestone Aug 23, 2021
@ghost ghost self-assigned this Aug 24, 2021
@ghost
Copy link
Author

ghost commented Aug 25, 2021

fixed by #2068 / 9c73599 but was not automatically closed due to a typo

@ghost ghost closed this as completed Aug 25, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: intelmqctl
Projects
None yet
Development

No branches or pull requests

0 participants