Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ jobs:
--add-feature google \
--add-feature remote-execution \
--add-feature bmc \
--add-feature registration \
--registration-url https://quadlet.example.com:8443 \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should set this in our tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — removed it. The parameter is optional and the test just verifies the feature is present and running.

${{ matrix.iop == 'enabled' && '--add-feature iop' || '' }}
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions docs/user/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ There are multiple use cases from the users perspective that dictate what parame
| `--add-feature content/ostree` | Enable OSTree content type | `--foreman-proxy-content-enable-ostree` |
| `--bmc-ipmi-implementation` | IPMI implementation to use for BMC | `--foreman-proxy-bmc-default-provider` |
| `--bmc-redfish-verify-ssl` | Verify SSL certificates for Redfish BMC connections | `--foreman-proxy-bmc-redfish-verify-ssl` |
| `--add-feature registration` | Enable Registration feature | `--foreman-proxy-registration` |
| `--registration-url` | URL that hosts use to reach the registration endpoint | `--foreman-proxy-registration-url` |

### Undetermined

Expand Down Expand Up @@ -197,8 +199,6 @@ There are multiple use cases from the users perspective that dictate what parame
| `--foreman-proxy-realm-keytab` | | | |
| `--foreman-proxy-realm-principal` | | | |
| `--foreman-proxy-realm-provider` | | | |
| `--foreman-proxy-registration` | | | |
| `--foreman-proxy-registration-url` | | | |
| `--foreman-proxy-templates` | | | |
| `--foreman-proxy-template-url` | | | |
| `--puppet-server` | | puppet | server |
Expand Down
10 changes: 10 additions & 0 deletions src/features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ bmc:
description: Power management for bare metal hosts (IPMI, Redfish)
foreman_proxy:
plugin_name: bmc
templates:
description: Templates feature for foreman-proxy
foreman_proxy:
plugin_name: templates
registration:
description: Host registration feature for foreman-proxy
foreman_proxy:
plugin_name: registration
dependencies:
- templates
3 changes: 3 additions & 0 deletions src/playbooks/_foreman_proxy/metadata.obsah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ variables:
parameter: --bmc-redfish-verify-ssl
help: Verify SSL certificates for Redfish BMC connections.
type: Boolean
foreman_proxy_registration_url:
parameter: --registration-url
help: URL that hosts use to reach the registration endpoint (e.g. https://loadbalancer.example.com).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
:enabled: https
{% if foreman_proxy_registration_url is defined %}
:registration_url: {{ foreman_proxy_registration_url }}
{% endif %}
3 changes: 3 additions & 0 deletions src/roles/foreman_proxy/templates/settings.d/templates.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
:enabled: {{ feature_enabled }}
:template_url: {{ foreman_proxy_templates_url | default(foreman_proxy_url) }}
1 change: 1 addition & 0 deletions src/vars/flavors/foreman-proxy-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ flavor_features:
- content/container
- content/ansible
- content/python
- registration

pulp_mirror: true

Expand Down
10 changes: 10 additions & 0 deletions tests/feature/foreman-proxy/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 'registration' in enabled_features:
assert "registration" in features
else:
assert "registration" not in features


def test_foreman_proxy_service(server):
Expand Down Expand Up @@ -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('registration')
def test_registration_settings(proxy_v2_features):
assert 'registration' in proxy_v2_features
assert proxy_v2_features['registration'].get('state') == 'running'
Loading