Skip to content

Command line tool to access REST API #18

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

Open
alinefm opened this issue Jan 11, 2016 · 0 comments
Open

Command line tool to access REST API #18

alinefm opened this issue Jan 11, 2016 · 0 comments
Labels
Milestone

Comments

@alinefm
Copy link
Member

alinefm commented Jan 11, 2016

Provide a command line tool to access REST API.
Keep in mind it must be extensible by the plugins.

@alinefm alinefm added this to the Backlog milestone Jan 11, 2016
alinefm pushed a commit that referenced this issue Jan 13, 2016
This requirement started in a fixed Gingerbase bug (#18) that
reported lscpu problems when running in a French environment.
The output was being translated to french and breaking the
parsing made by the backend.

This is such a powder keg for all the plug-ins that I believe
this patch is justified. Instead of forcing en_US language
by using subprocess.Popen and setting the env, this is how
run_command will behave now:

- A new optional attribute, env_vars, was added. As the name
suggests, it allows the setup of the environment variables
to run the command.

- If env_vars is not set, run_command will copy the current
environment variables and set the language to the default
(en_US) by setting LC_ALL='C' variable. As of now, this is
the case of all the existing run_command calls in the code
for all WoK plug-ins. No behavior change will happen.

- If env_vars is set, but the LC_ALL var isn't, run_command
will set it to 'C' and force the default language.

- If env_vars is set and LC_ALL is also set, run_command
will not touch it and will run with env_vars as is. This
allows the caller to set the language at will.

Signed-off-by: Daniel Henrique Barboza <[email protected]>
patchew-importer pushed a commit to patchew-project/kimchi-wok that referenced this issue May 25, 2018
This requirement started in a fixed Gingerbase bug (kimchi-project#18) that
reported lscpu problems when running in a French environment.
The output was being translated to french and breaking the
parsing made by the backend.

This is such a powder keg for all the plug-ins that I believe
this patch is justified. Instead of forcing en_US language
by using subprocess.Popen and setting the env, this is how
run_command will behave now:

- A new optional attribute, env_vars, was added. As the name
suggests, it allows the setup of the environment variables
to run the command.

- If env_vars is not set, run_command will copy the current
environment variables and set the language to the default
(en_US) by setting LC_ALL='C' variable. As of now, this is
the case of all the existing run_command calls in the code
for all WoK plug-ins. No behavior change will happen.

- If env_vars is set, but the LC_ALL var isn't, run_command
will set it to 'C' and force the default language.

- If env_vars is set and LC_ALL is also set, run_command
will not touch it and will run with env_vars as is. This
allows the caller to set the language at will.

Signed-off-by: Daniel Henrique Barboza <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant