-
Notifications
You must be signed in to change notification settings - Fork 44
Add Templates feature to foreman-proxy #519
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,13 @@ variables: | |
| parameter: --bmc-redfish-verify-ssl | ||
| help: Verify SSL certificates for Redfish BMC connections. | ||
| type: Boolean | ||
| foreman_proxy_templates_listen_on: | ||
| parameter: --templates-listen-on | ||
| help: Templates proxy to listen on https, http, or both. | ||
| choices: | ||
| - http | ||
| - https | ||
| - both | ||
|
Comment on lines
+13
to
+19
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is it needed to expose this? In the old installer we exposed it because it was the way we did, but it was an advanced option. In foremanctl I think shouldn't expose this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed this in #706 |
||
| foreman_proxy_templates_url: | ||
| parameter: --templates-url | ||
| help: URL that hosts will use to contact the proxy for provisioning templates (e.g. http://<proxy-fqdn>:8000). Required when templates feature is enabled. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a default which implies it isn't required to specify.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated in #706 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| :enabled: {% if foreman_proxy_templates_listen_on | default('both') == 'both' %}true{% else %}{{ foreman_proxy_templates_listen_on }}{% endif %} | ||
|
|
||
| :template_url: {{ foreman_proxy_templates_url }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,10 @@ def test_foreman_proxy_features(curl_request, proxy_base_url, enabled_features): | |
| assert "bmc" in features | ||
| else: | ||
| assert "bmc" not in features | ||
| if 'templates' in enabled_features: | ||
| assert "templates" in features | ||
| else: | ||
| assert "templates" not in features | ||
|
|
||
|
|
||
| def test_foreman_proxy_service(server): | ||
|
|
@@ -65,3 +69,9 @@ def test_bmc_capabilities(proxy_v2_features): | |
| def test_bmc_default_provider(proxy_v2_features): | ||
| settings = proxy_v2_features['bmc'].get('settings', {}) | ||
| assert settings.get('bmc_default_provider') == 'ipmitool' | ||
|
|
||
|
|
||
| @pytest.mark.feature('templates') | ||
| def test_templates_template_url(obsah_params, server_fqdn): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we'll need #703 (or similar) to make this test work
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tests is currently passing
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, because you changed it to read the params, not talk to the API to fetch the set value. |
||
| template_url = obsah_params.get('foreman_proxy_templates_url') | ||
| assert template_url == f'http://{server_fqdn}:8000' | ||
Uh oh!
There was an error while loading. Please reload this page.