You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Corerelates to code central or existential to SaltFeaturenew functionality including changes to functionality and code refactors, etc.State-Modulestale
The file.managed state has a source parameter, that can be set to an http-url. When this is used, the query-function in the utils.http package is called. Here is the code for the query-function:
Thanks for clarifying that. From what I can see this does not exist and would need to be added. I started up a pdb debugger and saw this is the stack trace from the file.managed file in the state module to the query call in salt/utils/https.py:
Just to add to the discussion: It seems like this functionality would be useful in all places where the http(s) scheme is used in the source. Another example is the pkg.installed state, and I believe there are other places as well. In fact, it would be nice if other options could be set as well, such as headers, or whether to check the server certificate.
As far as implementing this, I'm not sure what the best way would be. It seems like options that apply to the source-parameter get their own fields, like source_hash. This would become messy after a while, as more options are added. Would it be better if the concept of a "source" was fleshed out more, and could accept it's own options e.g. like this:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Corerelates to code central or existential to SaltFeaturenew functionality including changes to functionality and code refactors, etc.State-Modulestale
Activity
[-]file.managed with client certificate[/-][+]file.managed with http client certificate[/+]Ch3LL commentedon Apr 5, 2017
@LrsK i'm not quit seeing this functionality. Where are you seeing that argument? can you point me to the code?
LrsK commentedon Apr 5, 2017
The file.managed state has a source parameter, that can be set to an http-url. When this is used, the query-function in the utils.http package is called. Here is the code for the query-function:
salt/salt/utils/http.py
Line 91 in 3b81c37
In this function, the client certificate can be set in the cert-parameter, or read from the master or minion config.
My question is: how can I set the cert parameter in the file.managed state, and have it appear in the query-function?
Ch3LL commentedon Apr 6, 2017
Thanks for clarifying that. From what I can see this does not exist and would need to be added. I started up a pdb debugger and saw this is the stack trace from the file.managed file in the state module to the query call in salt/utils/https.py:
We will need to get this added. Feel free to take a stab at adding this functionality if interested
LrsK commentedon Apr 6, 2017
Just to add to the discussion: It seems like this functionality would be useful in all places where the http(s) scheme is used in the source. Another example is the pkg.installed state, and I believe there are other places as well. In fact, it would be nice if other options could be set as well, such as headers, or whether to check the server certificate.
As far as implementing this, I'm not sure what the best way would be. It seems like options that apply to the source-parameter get their own fields, like source_hash. This would become messy after a while, as more options are added. Would it be better if the concept of a "source" was fleshed out more, and could accept it's own options e.g. like this:
Please correct me if I am wrong in my assessment. as I'm not very familiar with the salt code base.
stale commentedon Sep 28, 2018
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.