Design for importing hook config file in PTL

#1

Hi All,

Please review the design document to support importing hoook config file in PTL
https://pbspro.atlassian.net/wiki/spaces/PD/pages/1223950391/Design+for+importing+hook+config+file+in+PTL

Please let me know if any comments or suggestions.

Thanks,
Shilpa Kodli

0 Likes

#2

Thanks for writing this @shilpakodli. The design doc talks only about modify_hook_config(). But I guess there is no function to import the hook configuration file in first place. import_hook() accepts content_type as ‘application/x-python’ only. Shouldn’t we also add import_hook_config() ?

Also, I don’t quite understand “When “overwrite” attribute is set to True, then .CF file will be replaced by user requested file. If “overwrite” is set to False then only user requested values will be modified in existing config file.”. Could you please elaborate? What is the user requested file here ? There is no argument in modify_hook_config() that can take a user requested file .

How to we deal with mom hook config files under mom_priv dir ?

0 Likes

#3

I also have same question for overwrite.
And please rename ‘id’ argument name with ‘hook_name’ as ‘id’ is build in method in python

0 Likes

#4

@lsubramanian and @hirenvadalia Thanks for the inputs. When overwrite is set to ‘True’, entire .CF file will be replaced with user given attributes. User input should be in dict format.
I will change “file” with proper input format in EDD.

0 Likes

#5

@shilpakodli Please add the link to forum in design doc. Please provide an example when overwrite is True and False.
What are the valid values for hook_type ? is it (site, PBS hook) or (site, pbshook), Values like hook for sitehook and pbshook for PBS hook falls inline with PBS implementation.
Please specify an example on how to do only import of an hook config.
Thanks,
Vishesh

0 Likes