Wenyi Gao has posted comments on this change.

Change subject: Add some base functions to vdsm-tool
......................................................................


Patch Set 6: (2 inline comments)

This is the base patch for my sequent patches for moving vdsmd.init script to 
vdsm-tool.

As you know, the vdsmd.init shell script call some shell commands and functions 
in /etc/init.d/functions, so I add two warrper function "exec_command" and 
"call_init_function" to call them. 

The vdsmd.init script is a init script, so the "print_msg" is used to print 
some messages followed by "[ OK ] or [Failed]", as do other init scripts.

The vdsmd.init shell script need to read some configuration from configuration 
file, so the function "get_config_item" is added to get them.

....................................................
File vdsm-tool/base.py
Line 26: def exec_command(argv):
The base.py is installed in the directory "site-packages/vdsm/tool". While the 
implement of "execCmd" is in /usr/share/vdsm/storage/misc",  which can't be 
accessed by base.py.

Line 52:         rc = subprocess.call([cmd], shell=True)
Yes, "shell=True" is dangerous, But I can't find a better way to call two shell 
commands in sequence.

--
To view, visit http://gerrit.ovirt.org/5264
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1be737adce28e9ca532aa454e7f0a060947589e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Wenyi Gao <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Wenyi Gao <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to