Marcin Mirecki has posted comments on this change.

Change subject: network: add ifcfg write hook
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/44552/1//COMMIT_MSG
Commit Message:

Line 7: network: add ifcfg write hook
Line 8: 
Line 9: Added a new hook point which is executed before and after
Line 10: an ifcfg file is writen on the host as a result of
Line 11: executing setupNetworks.
> ok, but why? What's the usecase for this change?
This was a customer request.
The customer has some tweaks in the cfg files which are overwritten by vdsm. 
The hook would enable to apply these settings back after vdsm updates the conf 
files.
Line 12: The hook script receives a json file containing the
Line 13: following dict:
Line 14: name: the name of the interface being configured
Line 15: ifcfg_file: full path of the interface file being written


https://gerrit.ovirt.org/#/c/44552/1/vdsm/hooks.py
File vdsm/hooks.py:

Line 395:     return _runHooksDir(hook_dict, 'before_ifcfg_write', 
raiseError=False,
Line 396:                         hookType=_JSON_HOOK)
Line 397: 
Line 398: 
Line 399: def after_ifcfg_write(hook_dict):
> can you think of a use case for this hook?
It can be used to modify the ifcfg file after vdsm has modified it, bringing 
back the custom values required by the customer.
Line 400:     return _runHooksDir(hook_dict, 'after_ifcfg_write', 
raiseError=False,
Line 401:                         hookType=_JSON_HOOK)
Line 402: 
Line 403: 


-- 
To view, visit https://gerrit.ovirt.org/44552
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2206ccf97b210bd58f03777d4ccd016785b02939
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to