diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8652947e3..7c6b6d627 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ on: [push, pull_request] env: COLORTERM: 'yes' TERM: 'xterm-256color' - PYTEST_ADDOPTS: '--color=yes' + PYTEST_ADDOPTS: '-vv --color=yes' concurrency: group: ${{ github.ref_name }}-${{ github.workflow }} @@ -25,18 +25,11 @@ jobs: - stable-2.15 - stable-2.16 - stable-2.17 + - stable-2.18 - devel include: - python: "3.8" - ansible: "v2.9.17" - - python: "3.8" - ansible: "stable-2.10" - - python: "2.7" - ansible: "stable-2.11" - container: "python:2.7" - - python: "3.5" - ansible: "stable-2.11" - container: "python:3.5" + ansible: "v2.10.4" - python: "3.6" ansible: "stable-2.11" - python: "3.7" @@ -49,6 +42,8 @@ jobs: ansible: "stable-2.13" - python: "3.12" ansible: "devel" + - python: "3.13" + ansible: "devel" steps: - uses: actions/checkout@v4 - name: Set up Python @@ -72,16 +67,19 @@ jobs: if: matrix.container == null - name: Install Ansible run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz - - name: Ensure Jinja version is old enough for Ansible 2.9 + - name: Ensure Jinja version is old enough for Ansible 2.10 run: pip install --upgrade 'Jinja2<3.1' - if: matrix.ansible == 'v2.9.17' + if: matrix.ansible == 'v2.10.4' - name: Install dependencies run: make test-setup - name: prepare a redhat-uep.pem, even if we run on Ubuntu run: sudo mkdir -p /etc/rhsm/ca/ && sudo curl -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem - - name: Install required collections for ansible-base (2.10+) + - name: Install required collections run: ansible-galaxy collection install https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-3.12.0.tar.gz - if: matrix.ansible != 'v2.9.17' + if: matrix.ansible != 'v2.10.4' + - name: Install required collections for ansible 2.10 + run: ansible-galaxy collection install https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-2.7.12.tar.gz + if: matrix.ansible == 'v2.10.4' - name: Run crud tests run: make test-crud - name: Run other tests @@ -90,7 +88,7 @@ jobs: run: make dist-test - name: Run sanity tests run: make SANITY_OPTS="--docker" sanity - if: matrix.ansible != 'v2.9.17' && matrix.ansible != 'stable-2.10' && matrix.ansible != 'stable-2.11' && matrix.ansible != 'stable-2.12' && matrix.ansible != 'stable-2.13' && matrix.ansible != 'stable-2.14' + if: matrix.ansible != 'v2.10.4' && matrix.ansible != 'stable-2.11' checkmode: runs-on: ubuntu-latest diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2b030fc62..7e3b9e13a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,20 @@ redhat.satellite Release Notes This changelog describes changes after version 0.8.1. +v5.0.0 +====== + +Minor Changes +------------- + +- host, hostgroup, domain, operatingsystem, subnet, organization, location - support setting hidden parameters + +Breaking Changes / Porting Guide +-------------------------------- + +- Drop support for Ansible 2.9. +- Drop support for Python 2.7 and 3.5. + v4.2.0 ====== diff --git a/Makefile b/Makefile index bfa5ea7a1..7436ce12c 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,17 @@ $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(eval _$(PLUGIN_TYPE) := $(filter-out %__ DEPENDENCIES := $(METADATA) $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(_$(PLUGIN_TYPE))) $(foreach ROLE,$(ROLES),$(wildcard $(ROLE)/*/*)) $(foreach ROLE,$(ROLES),$(ROLE)/README.md) $(TESTDATA) PYTHON_VERSION = $(shell $(PYTHON_COMMAND) -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') -ANSIBLE_SUPPORTS_REDIRECTS = $(shell ansible --version | grep -q 'ansible 2.9' && echo 0 || echo 1) COLLECTION_COMMAND ?= ansible-galaxy SANITY_OPTS = --venv TEST = FLAGS = -PYTEST = pytest -n 4 --forked -vv +PYTEST_COMMAND ?= pytest +PYTEST = $(PYTEST_COMMAND) -n 4 --forked +# PYTEST_ADDOPTS is exported to sub-shells and picked up by *all* pytest invocations +PYTEST_ADDOPTS ?= -vv +export PYTEST_ADDOPTS -APIPIE_VERSION ?= v0.4.0 +APIPIE_VERSION ?= v0.5.0 default: help help: @@ -72,17 +75,17 @@ test-other: $(PYTEST) -k 'not test_crud.py' livetest: $(MANIFEST) | tests/test_playbooks/vars/server.yml - pytest -vv 'tests/test_crud.py::test_crud' --vcrmode live $(FLAGS) + $(PYTEST_COMMAND) 'tests/test_crud.py::test_crud' --vcrmode live $(FLAGS) test_%: FORCE $(MANIFEST) | tests/test_playbooks/vars/server.yml - pytest -vv 'tests/test_crud.py::test_crud[$*]' 'tests/test_crud.py::test_check_mode[$*]' $(FLAGS) + $(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' 'tests/test_crud.py::test_check_mode[$*]' $(FLAGS) livetest_%: FORCE $(MANIFEST) | tests/test_playbooks/vars/server.yml - pytest -vv 'tests/test_crud.py::test_crud[$*]' --vcrmode live $(FLAGS) + $(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' --vcrmode live $(FLAGS) record_%: FORCE $(MANIFEST) $(RM) tests/test_playbooks/fixtures/$*-*.yml - pytest -vv 'tests/test_crud.py::test_crud[$*]' --vcrmode record $(FLAGS) + $(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' --vcrmode record $(FLAGS) clean_%: FORCE $(MANIFEST) ansible-playbook --tags teardown,cleanup -i tests/inventory/hosts 'tests/test_playbooks/$*.yml' @@ -99,9 +102,7 @@ tests/test_playbooks/vars/server.yml: dist-test: $(MANIFEST) SATELLITE_SERVER_URL=https://foreman.example.test ansible -m $(NAMESPACE).$(NAME).organization -a "username=admin password=changeme name=collectiontest" localhost | grep -q "Failed to connect to Foreman server.*foreman.example.test" -ifeq ($(ANSIBLE_SUPPORTS_REDIRECTS),1) SATELLITE_SERVER_URL=https://foreman.example.test ansible -m $(NAMESPACE).$(NAME).foreman_organization -a "username=admin password=changeme name=collectiontest" localhost | grep -q "Failed to connect to Foreman server.*foreman.example.test" -endif SATELLITE_SERVER_URL=http://foreman.example.test ansible -m $(NAMESPACE).$(NAME).organization -a "username=admin password=changeme name=collectiontest" localhost 2>&1| grep -q "You have configured a plain HTTP server URL." ansible-doc $(NAMESPACE).$(NAME).organization | grep -q "Manage Organization" diff --git a/ansible.cfg b/ansible.cfg index 4739cb8f9..2c0ba1a00 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,5 @@ [defaults] -collections_paths = build/collections +collections_path = build/collections inventory = tests/inventory/hosts retry_files_enabled = False devel_warning = False diff --git a/bindep.txt b/bindep.txt index 1bfc31e5e..7bc5d2dca 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,3 +1,2 @@ python3-rpm [(platform:redhat platform:base-py3)] -rpm-python [(platform:redhat platform:base-py2)] python38-requests [platform:centos-8 platform:rhel-8] diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 08a5ec664..00a644e15 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -915,3 +915,16 @@ releases: - 1769-callback-vault-facts.yml - lce-role-state.yml release_date: '2024-08-30' + 5.0.0: + changes: + breaking_changes: + - Drop support for Ansible 2.9. + - Drop support for Python 2.7 and 3.5. + minor_changes: + - host, hostgroup, domain, operatingsystem, subnet, organization, location + - support setting hidden parameters + fragments: + - 1785-hidden_parameters.yml + - drop-ansible-29.yaml + - drop-python-pre-36.yaml + release_date: '2024-11-22' diff --git a/galaxy.yml b/galaxy.yml index 717185311..ae673a3a9 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -92,6 +92,7 @@ authors: - "Thomas Mueller " - "William Bradford Clark " - "Yifat Makias " + - "ab " - "achevalet " - "alesc " - "bob <57952350+TheRedGreek@users.noreply.github.com>" @@ -108,7 +109,7 @@ authors: - "russianguppie <46544650+russianguppie@users.noreply.github.com>" - "willtome " - "yuqo2450 <79540477+yuqo2450@users.noreply.github.com>" -version: "4.2.0" +version: "5.0.0" license: - "GPL-3.0-or-later" tags: diff --git a/meta/runtime.yml b/meta/runtime.yml index b46e203a8..22c2546a5 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -189,4 +189,4 @@ plugin_routing: redirect: redhat.satellite.sync_plan katello_upload: redirect: redhat.satellite.content_upload -requires_ansible: '>=2.15.0' +requires_ansible: '>=2.10.4' diff --git a/plugins/doc_fragments/foreman.py b/plugins/doc_fragments/foreman.py index be1867fec..806390d34 100644 --- a/plugins/doc_fragments/foreman.py +++ b/plugins/doc_fragments/foreman.py @@ -91,6 +91,11 @@ class ModuleDocFragment(object): - 'yaml' - 'json' type: str + hidden_value: + description: + - Should the value be hidden + required: false + type: bool ''' OS_FAMILY = ''' diff --git a/plugins/module_utils/_apypie.py b/plugins/module_utils/_apypie.py index 09ea11b27..677bd2714 100644 --- a/plugins/module_utils/_apypie.py +++ b/plugins/module_utils/_apypie.py @@ -1,21 +1,13 @@ # pylint: disable=ansible-format-automatic-specification,raise-missing-from from __future__ import absolute_import, division, print_function __metaclass__ = type -try: - from typing import Any, Iterable, List, Optional, Tuple # pylint: disable=unused-import # noqa: F401 -except ImportError: - pass +from typing import Any, Iterable, List, Optional, Set, Tuple, cast # pylint: disable=unused-import # noqa: F401 """ Apypie Action module """ -try: - base_string = basestring -except NameError: # Python 3 has no base_string - base_string = str # pylint: disable=invalid-name,redefined-builtin - class Action(object): """ @@ -156,7 +148,7 @@ def _validate(self, params, values, data=None, files=None, path=None): # pylint self._validate(param_description.params, item, path=self._add_to_path(path, [param_description.name, str(num)])) elif param_description.expected_type == 'hash': self._validate(param_description.params, value, path=self._add_to_path(path, [param_description.name])) - if (param_description.expected_type == 'numeric' and isinstance(value, base_string)): + if (param_description.expected_type == 'numeric' and isinstance(value, str)): try: value = int(value) except ValueError: @@ -168,7 +160,7 @@ def _validate(self, params, values, data=None, files=None, path=None): # pylint if (value is not None and ((param_description.expected_type == 'boolean' and not isinstance(value, bool) and not (isinstance(value, int) and value in [0, 1])) or (param_description.expected_type == 'numeric' and not isinstance(value, int)) - or (param_description.expected_type == 'string' and not isinstance(value, (base_string, int))))): + or (param_description.expected_type == 'string' and not isinstance(value, (str, int))))): raise ValueError("{} ({}): {}".format(param, value, param_description.validator)) @staticmethod @@ -247,19 +239,14 @@ def _prepare_route_params(self, input_dict): import errno import glob import json +from json.decoder import JSONDecodeError # type: ignore + +import os +from urllib.parse import urljoin # type: ignore try: import requests except ImportError: pass -try: - from json.decoder import JSONDecodeError # type: ignore -except ImportError: - JSONDecodeError = ValueError # type: ignore -import os -try: - from urlparse import urljoin # type: ignore -except ImportError: - from urllib.parse import urljoin # type: ignore NO_CONTENT = 204 @@ -617,6 +604,228 @@ class InvalidArgumentTypesError(Exception): """ +""" +Apypie Foreman module + +opinionated helpers to use Apypie with Foreman +""" + +import time + +# Foreman supports "per_page=all" since 2.2 (https://projects.theforeman.org/issues/29909) +# But plugins, especially Katello, do not: https://github.com/Katello/katello/pull/11126 +# To still be able to fetch all results without pagination, we have this constant for now +PER_PAGE = 2 << 31 + + +class ForemanApiException(Exception): + """ + General Exception, raised by any issue in ForemanApi + """ + + def __init__(self, msg, error=None): + if error: + super().__init__(f'{msg} - {error}') + else: + super().__init__(msg) + + @classmethod + def from_exception(cls, exc, msg): + """ + Create a ForemanException from any other Exception + + Especially useful to gather the error message from HTTP responses. + """ + error = None + if hasattr(exc, 'response') and exc.response is not None: + try: + response = exc.response.json() + if 'error' in response: + error = response['error'] + else: + error = response + except Exception: # pylint: disable=broad-except + error = exc.response.text + return cls(msg=msg, error=error) + + +class ForemanApi(Api): + """ + `apypie.Api` with default settings and helper functions for Foreman + + Usage:: + + >>> import apypie + >>> api = apypie.ForemanApi(uri='https://satellite.example.com', username='admin', password='changeme') + """ + + def __init__(self, **kwargs): + self.task_timeout = kwargs.pop('task_timeout', 60) + self.task_poll = 4 + kwargs['api_version'] = 2 + super().__init__(**kwargs) + + def _resource(self, resource: str) -> 'Resource': + if resource not in self.resources: + raise ForemanApiException(msg=f"The server doesn't know about {resource}, is the right plugin installed?") + return self.resource(resource) + + def _resource_call(self, resource: str, *args, **kwargs) -> Optional[dict]: + return self._resource(resource).call(*args, **kwargs) + + def _resource_prepare_params(self, resource: str, action: str, params: dict) -> dict: + api_action = self._resource(resource).action(action) + return api_action.prepare_params(params) + + def resource_action(self, resource: str, action: str, params: dict, options=None, data=None, files=None, # pylint: disable=too-many-arguments + ignore_task_errors: bool = False) -> Optional[dict]: + """ + Perform a generic action on a resource + + Will wait for tasks if the action returns one + """ + resource_payload = self._resource_prepare_params(resource, action, params) + if options is None: + options = {} + try: + result = self._resource_call(resource, action, resource_payload, options=options, data=data, files=files) + is_foreman_task = isinstance(result, dict) and 'action' in result and 'state' in result and 'started_at' in result + if result and is_foreman_task: + result = self.wait_for_task(result, ignore_errors=ignore_task_errors) + except Exception as exc: + msg = f'Error while performing {action} on {resource}: {exc}' + raise ForemanApiException.from_exception(exc, msg) from exc + return result + + def wait_for_task(self, task: dict, ignore_errors: bool = False) -> dict: + """ + Wait for a foreman-tasks task, polling it every ``self.task_poll`` seconds. + + Will raise a ForemanApiException when task has not finished in ``self.task_timeout`` seconds. + """ + duration = self.task_timeout + while task['state'] not in ['paused', 'stopped']: + duration -= self.task_poll + if duration <= 0: + raise ForemanApiException(msg=f"Timeout waiting for Task {task['id']}") + time.sleep(self.task_poll) + + resource_payload = self._resource_prepare_params('foreman_tasks', 'show', {'id': task['id']}) + task = cast(dict, self._resource_call('foreman_tasks', 'show', resource_payload)) + if not ignore_errors and task['result'] != 'success': + msg = f"Task {task['action']}({task['id']}) did not succeed. Task information: {task['humanized']['errors']}" + raise ForemanApiException(msg=msg) + return task + + def show(self, resource: str, resource_id: int, params: Optional[dict] = None) -> Optional[dict]: + """ + Execute the ``show`` action on an entity. + + :param resource: Plural name of the api resource to show + :param resource_id: The ID of the entity to show + :param params: Lookup parameters (i.e. parent_id for nested entities) + + :return: The entity + """ + payload = {'id': resource_id} + if params: + payload.update(params) + return self.resource_action(resource, 'show', payload) + + def list(self, resource: str, search: Optional[str] = None, params: Optional[dict] = None) -> list: + """ + Execute the ``index`` action on an resource. + + :param resource: Plural name of the api resource to show + :param search: Search string as accepted by the API to limit the results + :param params: Lookup parameters (i.e. parent_id for nested entities) + + :return: List of results + """ + payload: dict = {'per_page': PER_PAGE} + if search is not None: + payload['search'] = search + if params: + payload.update(params) + + result = self.resource_action(resource, 'index', payload) + if result: + return result['results'] + return [] + + def create(self, resource: str, desired_entity: dict, params: Optional[dict] = None) -> Optional[dict]: + """ + Create entity with given properties + + :param resource: Plural name of the api resource to manipulate + :param desired_entity: Desired properties of the entity + :param params: Lookup parameters (i.e. parent_id for nested entities) + + :return: The new current state of the entity + """ + payload = desired_entity.copy() + if params: + payload.update(params) + return self.resource_action(resource, 'create', payload) + + def update(self, resource: str, desired_entity: dict, params: Optional[dict] = None) -> Optional[dict]: + """ + Update entity with given properties + + :param resource: Plural name of the api resource to manipulate + :param desired_entity: Desired properties of the entity + :param params: Lookup parameters (i.e. parent_id for nested entities) + + :return: The new current state of the entity + """ + payload = desired_entity.copy() + if params: + payload.update(params) + return self.resource_action(resource, 'update', payload) + + def delete(self, resource: str, current_entity: dict, params: Optional[dict] = None) -> None: + """ + Delete a given entity + + :param resource: Plural name of the api resource to manipulate + :param current_entity: Current properties of the entity + :param params: Lookup parameters (i.e. parent_id for nested entities) + + :return: The new current state of the entity + """ + payload = {'id': current_entity['id']} + if params: + payload.update(params) + entity = self.resource_action(resource, 'destroy', payload) + + # this is a workaround for https://projects.theforeman.org/issues/26937 + if entity and isinstance(entity, dict) and 'error' in entity and 'message' in entity['error']: + raise ForemanApiException(msg=entity['error']['message']) + + def validate_payload(self, resource: str, action: str, payload: dict) -> Tuple[dict, Set[str]]: + """ + Check whether the payload only contains supported keys. + + :param resource: Plural name of the api resource to check + :param action: Name of the action to check payload against + :param payload: API paylod to be checked + + :return: The payload as it can be submitted to the API and set of unssuported parameters + """ + filtered_payload = self._resource_prepare_params(resource, action, payload) + unsupported_parameters = set(payload.keys()) - _recursive_dict_keys(filtered_payload) + return (filtered_payload, unsupported_parameters) + + +def _recursive_dict_keys(a_dict: dict) -> set: + """Find all keys of a nested dictionary""" + keys = set(a_dict.keys()) + for value in a_dict.values(): + if isinstance(value, dict): + keys.update(_recursive_dict_keys(value)) + return keys + + """ Apypie Inflector module @@ -879,10 +1088,7 @@ def call(self, action, params=None, headers=None, options=None, data=None, files Apypie Route module """ -try: - from urllib.parse import quote # type: ignore -except ImportError: - from urllib import quote # type: ignore +from urllib.parse import quote # type: ignore class Route(object): diff --git a/plugins/module_utils/foreman_helper.py b/plugins/module_utils/foreman_helper.py index 8e9d9989f..b5b4a87b7 100644 --- a/plugins/module_utils/foreman_helper.py +++ b/plugins/module_utils/foreman_helper.py @@ -56,6 +56,7 @@ name=dict(required=True), value=dict(type='raw', required=True), parameter_type=dict(default='string', choices=['string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json']), + hidden_value=dict(type='bool'), ) parameter_ansible_spec = {k: v for (k, v) in parameter_foreman_spec.items() if k != 'id'} @@ -213,7 +214,7 @@ def __init__(self, **kwargs): self.validate_parameters() def run(self, **kwargs): - entity = self.lookup_entity('entity') + entity = self.lookup_entity('entity', params={'show_hidden_parameters': True}) if not self.desired_absent: if entity and 'parameters' in entity: entity['parameters'] = parameters_list_to_str_list(entity['parameters']) @@ -265,6 +266,8 @@ def ensure_scoped_parameters(self, scope): desired_parameter['value'] = parameter_value_to_str(desired_parameter['value'], desired_parameter['parameter_type']) current_parameter = current_parameters.pop(name, None) if current_parameter: + if 'hidden_value?' in current_parameter: + current_parameter['hidden_value'] = current_parameter.pop('hidden_value?') if 'parameter_type' not in current_parameter: current_parameter['parameter_type'] = 'string' current_parameter['value'] = parameter_value_to_str(current_parameter['value'], current_parameter['parameter_type']) @@ -1090,6 +1093,15 @@ def _update_entity(self, resource, desired_entity, current_entity, params, forem # however this is not set for flattened entries and setting it # confuses _flatten_entity elif foreman_type == 'list' and value and isinstance(value[0], dict): + # special handling for parameters created by ParametersMixin + # they are defined as a list of dict, but the dicts should be really handled like + # entities, which means we only want to update the user-provided details + if key.endswith('_parameters_attributes'): + for new_param in new_value: + old_param = next((x for x in old_value if x['name'] == new_param['name']), None) + if old_param is not None: + for pop_key in set(old_param.keys()) - set(new_param.keys()): + old_param.pop(pop_key) if 'name' in value[0]: sort_key = 'name' else: @@ -1806,6 +1818,8 @@ def parameter_value_to_str(value, parameter_type): def parameters_list_to_str_list(parameters): filtered_params = [] for param in parameters: + if 'hidden_value?' in param: + param['hidden_value'] = param.pop('hidden_value?') new_param = {k: v for (k, v) in param.items() if k in parameter_ansible_spec.keys()} new_param['value'] = parameter_value_to_str(new_param['value'], new_param.get('parameter_type', 'string')) filtered_params.append(new_param) diff --git a/plugins/modules/host.py b/plugins/modules/host.py index 9b33df4c0..a6cf9839a 100644 --- a/plugins/modules/host.py +++ b/plugins/modules/host.py @@ -485,7 +485,7 @@ def main(): module.foreman_params['owner_type'] = 'Usergroup' with module.api_connection(): - entity = module.lookup_entity('entity') + entity = module.lookup_entity('entity', params={'show_hidden_parameters': True}) if not module.desired_absent: module.auto_lookup_entities() diff --git a/plugins/modules/hostgroup.py b/plugins/modules/hostgroup.py index d61ecedc2..220392baf 100644 --- a/plugins/modules/hostgroup.py +++ b/plugins/modules/hostgroup.py @@ -183,7 +183,7 @@ def main(): module_params = module.foreman_params with module.api_connection(): - old_entity = module.lookup_entity('entity') + old_entity = module.lookup_entity('entity', params={'show_hidden_parameters': True}) if not module.desired_absent: if 'organization' in module_params: if 'organizations' in module_params: diff --git a/plugins/modules/operatingsystem.py b/plugins/modules/operatingsystem.py index dc463834e..d2d303728 100644 --- a/plugins/modules/operatingsystem.py +++ b/plugins/modules/operatingsystem.py @@ -221,7 +221,7 @@ def main(): if not entity and (module.state == 'present' or module.state == 'present_with_defaults'): # we actually attempt to create a new one... - for param_name in ['major', 'os_family', 'password_hash']: + for param_name in ['major', 'os_family']: if param_name not in module_params.keys(): module.fail_json(msg='{0} is a required parameter to create a new operating system.'.format(param_name)) diff --git a/plugins/modules/redhat_manifest.py b/plugins/modules/redhat_manifest.py index b0ebee75e..ecabd6b66 100644 --- a/plugins/modules/redhat_manifest.py +++ b/plugins/modules/redhat_manifest.py @@ -154,16 +154,7 @@ def fetch_portal(module, path, method, data=None, accept_header='application/jso fetch_kwargs = {'timeout': 30} if os.path.exists(REDHAT_UEP): fetch_kwargs['ca_path'] = REDHAT_UEP - try: - resp, info = fetch_url(module, url, data, headers, method, **fetch_kwargs) - except TypeError: - # ca_path was added in Ansible 2.9 and backported to 2.8 in 2.8.6 - # older Ansible releases don't support that and we have to omit the CA cert here - if module.params['validate_certs']: - module.warn("Your Ansible version does not support providing custom CA certificates for HTTP requests. " - "Talking to the Red Hat portal might fail without validate_certs=False. Please update.") - del fetch_kwargs['ca_path'] - resp, info = fetch_url(module, url, data, headers, method, **fetch_kwargs) + resp, info = fetch_url(module, url, data, headers, method, **fetch_kwargs) if resp is None or info["status"] >= 400: try: error = json.loads(info['body'])['displayMessage'] diff --git a/plugins/modules/subnet.py b/plugins/modules/subnet.py index 36fea338b..c433b2742 100644 --- a/plugins/modules/subnet.py +++ b/plugins/modules/subnet.py @@ -28,8 +28,6 @@ - Create, update, and delete Subnets author: - "Baptiste Agasse (@bagasse)" -requirements: - - ipaddress options: name: description: Subnet name @@ -211,17 +209,10 @@ elements: dict ''' -import traceback +import ipaddress from ansible_collections.redhat.satellite.plugins.module_utils.foreman_helper import ( - ForemanTaxonomicEntityAnsibleModule, ParametersMixin, missing_required_lib + ForemanTaxonomicEntityAnsibleModule, ParametersMixin ) -try: - import ipaddress - HAS_IPADDRESS = True - IPADDRESS_IMP_ERR = None -except ImportError: - HAS_IPADDRESS = False - IPADDRESS_IMP_ERR = traceback.format_exc() class ForemanSubnetModule(ParametersMixin, ForemanTaxonomicEntityAnsibleModule): @@ -267,9 +258,6 @@ def main(): ], ) - if not HAS_IPADDRESS: - module.fail_json(msg=missing_required_lib("ipaddress"), exception=IPADDRESS_IMP_ERR) - module_params = module.foreman_params if not module.desired_absent: diff --git a/requirements.txt b/requirements.txt index bcdcbab82..643fe9977 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ requests>=2.4.2 -ipaddress; python_version < '3.3' PyYAML diff --git a/roles/manifest/README.md b/roles/manifest/README.md index 9e68f6331..4a0840bc0 100644 --- a/roles/manifest/README.md +++ b/roles/manifest/README.md @@ -48,3 +48,24 @@ Download the Subscription Manifest from the Red Hat Customer Portal to localhost satellite_rhsm_password: "$ecur3p4$$w0rd" satellite_manifest_uuid: "01234567-89ab-cdef-0123-456789abcdef" ``` + +Download the Subscription Manifest from the Red Hat Customer Portal, via a proxy, to localhost before uploading to Foreman server: + +```yaml +- hosts: localhost + roles: + - role: redhat.satellite.manifest + environment: + https_proxy: "http://proxy.example.com:3128" + no_proxy: "satellite.example.com" + vars: + satellite_server_url: https://satellite.example.com + satellite_username: "admin" + satellite_password: "changeme" + satellite_organization: "Default Organization" + satellite_manifest_path: "~/manifest.zip" + satellite_manifest_download: true + satellite_rhsm_username: "happycustomer" + satellite_rhsm_password: "$ecur3p4$$w0rd" + satellite_manifest_uuid: "01234567-89ab-cdef-0123-456789abcdef" +``` diff --git a/tests/test_callback.py b/tests/test_callback.py index 749a2b633..1677521d2 100644 --- a/tests/test_callback.py +++ b/tests/test_callback.py @@ -41,7 +41,7 @@ def drop_incompatible_items(d): for k, v in d.items(): if k in ['msg', 'start', 'end', 'delta', 'uuid', 'timeout', '_ansible_no_log', 'warn', 'connection', 'extended_allitems', 'loop_control', 'expand_argument_vars', 'retries', 'parent', 'parent_type', 'finalized', 'squashed', 'no_log', - 'listen']: + 'listen', '_ansible_internal_redirect_list']: continue if isinstance(v, dict): diff --git a/tests/test_playbooks/compute_profiles_role.yml b/tests/test_playbooks/compute_profiles_role.yml index 9398430c2..8a29c526b 100644 --- a/tests/test_playbooks/compute_profiles_role.yml +++ b/tests/test_playbooks/compute_profiles_role.yml @@ -5,6 +5,7 @@ gather_facts: false vars_files: - vars/server.yml + - vars/compute_profile.yml tasks: - name: ensure test organization include_tasks: tasks/organization.yml @@ -32,8 +33,7 @@ compute_resource_locations: - Test Location compute_resource_provider: 'libvirt' - compute_resource_provider_params: - url: qemu:///system + compute_resource_provider_params: "{{ libvirt.compute_resource.params }}" compute_resource_state: present - hosts: tests diff --git a/tests/test_playbooks/fixtures/domain-0.yml b/tests/test_playbooks/fixtures/domain-0.yml index 1a3ce5144..08568626e 100644 --- a/tests/test_playbooks/fixtures/domain-0.yml +++ b/tests/test_playbooks/fixtures/domain-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK @@ -128,18 +124,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -190,17 +182,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -214,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -231,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -251,18 +240,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -293,14 +281,12 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK - request: - body: '{"domain": {"name": "example.com", "location_ids": [65, 68], "organization_ids": - [69]}}' + body: '{"domain": {"name": "example.com", "location_ids": [23, 24], "organization_ids": + [25]}}' headers: Accept: - application/json;version=2 @@ -318,16 +304,18 @@ interactions: uri: https://foreman.example.org/api/domains response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:54 UTC","id":26,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:31 UTC","id":10,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +329,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/domain-1.yml b/tests/test_playbooks/fixtures/domain-1.yml index 2e67b03ec..40c50ddb3 100644 --- a/tests/test_playbooks/fixtures/domain-1.yml +++ b/tests/test_playbooks/fixtures/domain-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:56:54 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:56:54 UTC\",\"id\":26,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:31 UTC\",\"updated_at\":\"2024-10-08 14:39:31 UTC\",\"id\":10,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:54 UTC","id":26,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:31 UTC","id":10,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -171,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '489' status: code: 200 message: OK @@ -191,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -253,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -314,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -339,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-10.yml b/tests/test_playbooks/fixtures/domain-10.yml index 085eb30fa..f1c37d944 100644 --- a/tests/test_playbooks/fixtures/domain-10.yml +++ b/tests/test_playbooks/fixtures/domain-10.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,21 +122,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":81,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":52,"name":"subnet_param2","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value2"}],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '922' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -173,8 +167,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '824' status: code: 200 message: OK @@ -193,18 +185,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -218,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -235,8 +225,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -255,17 +243,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -296,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -316,18 +301,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -358,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK @@ -381,21 +363,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11 response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:03 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:03 UTC","updated_at":"2020-10-07 10:57:03 UTC","id":82,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:37 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"new_value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:37 UTC","updated_at":"2024-10-08 14:39:37 UTC","id":53,"name":"subnet_param3","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value3"}],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -409,13 +393,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -426,8 +408,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '828' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-11.yml b/tests/test_playbooks/fixtures/domain-11.yml index ed28e3944..891a78b3e 100644 --- a/tests/test_playbooks/fixtures/domain-11.yml +++ b/tests/test_playbooks/fixtures/domain-11.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,21 +122,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:03 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:03 UTC","updated_at":"2020-10-07 10:57:03 UTC","id":82,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:37 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"new_value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:37 UTC","updated_at":"2024-10-08 14:39:37 UTC","id":53,"name":"subnet_param3","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value3"}],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -173,8 +167,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '828' status: code: 200 message: OK @@ -193,18 +185,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -218,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -235,8 +225,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -255,17 +243,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -296,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -316,18 +301,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -358,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-12.yml b/tests/test_playbooks/fixtures/domain-12.yml index 98bc0e379..918c2b7d3 100644 --- a/tests/test_playbooks/fixtures/domain-12.yml +++ b/tests/test_playbooks/fixtures/domain-12.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,21 +122,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:03 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:03 UTC","updated_at":"2020-10-07 10:57:03 UTC","id":82,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:37 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"new_value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:37 UTC","updated_at":"2024-10-08 14:39:37 UTC","id":53,"name":"subnet_param3","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value3"}],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -173,8 +167,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '828' status: code: 200 message: OK @@ -193,18 +185,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -218,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -235,8 +225,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -255,17 +243,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -296,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -316,18 +301,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -358,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK @@ -379,19 +361,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11 response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -405,13 +389,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -422,8 +404,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '489' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-13.yml b/tests/test_playbooks/fixtures/domain-13.yml index 9649b2608..26729540d 100644 --- a/tests/test_playbooks/fixtures/domain-13.yml +++ b/tests/test_playbooks/fixtures/domain-13.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -171,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '489' status: code: 200 message: OK @@ -191,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -253,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -314,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -339,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-14.yml b/tests/test_playbooks/fixtures/domain-14.yml index 8f360342f..b7fa6172e 100644 --- a/tests/test_playbooks/fixtures/domain-14.yml +++ b/tests/test_playbooks/fixtures/domain-14.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22foobar.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"foobar.example.com\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"foobar.example.com\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '184' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '184' status: code: 200 message: OK @@ -128,18 +124,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -190,17 +182,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -214,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -231,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -251,18 +240,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -293,14 +281,12 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK - request: - body: '{"domain": {"name": "foobar.example.com", "location_ids": [65, 68], "organization_ids": - [69]}}' + body: '{"domain": {"name": "foobar.example.com", "location_ids": [23, 24], "organization_ids": + [25]}}' headers: Accept: - application/json;version=2 @@ -318,16 +304,18 @@ interactions: uri: https://foreman.example.org/api/domains response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:06 UTC","updated_at":"2020-10-07 - 10:57:06 UTC","id":28,"name":"foobar.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:39 UTC","updated_at":"2024-10-08 + 14:39:39 UTC","id":12,"name":"foobar.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '496' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +329,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/domain-15.yml b/tests/test_playbooks/fixtures/domain-15.yml index 8d1a5d6b5..665af5311 100644 --- a/tests/test_playbooks/fixtures/domain-15.yml +++ b/tests/test_playbooks/fixtures/domain-15.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22foobar.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"foobar.example.com\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:06 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:06 UTC\",\"id\":28,\"name\":\"foobar.example.com\",\"dns_id\":null,\"\ - dns\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"foobar.example.com\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:39 UTC\",\"updated_at\":\"2024-10-08 14:39:39 UTC\",\"id\":12,\"name\":\"foobar.example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '340' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '340' status: code: 200 message: OK @@ -128,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/28 + uri: https://foreman.example.org/api/domains/12?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:06 UTC","updated_at":"2020-10-07 - 10:57:06 UTC","id":28,"name":"foobar.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:39 UTC","updated_at":"2024-10-08 + 14:39:39 UTC","id":12,"name":"foobar.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '496' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -171,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '496' status: code: 200 message: OK @@ -191,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -253,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -314,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -339,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK @@ -377,19 +359,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/domains/28 + uri: https://foreman.example.org/api/domains/12 response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:06 UTC","updated_at":"2020-10-07 - 10:57:07 UTC","id":28,"name":"barbaz.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:39 UTC","updated_at":"2024-10-08 + 14:39:40 UTC","id":12,"name":"barbaz.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '496' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -403,13 +387,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -420,8 +402,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '496' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-16.yml b/tests/test_playbooks/fixtures/domain-16.yml index a525b0d92..82c8620c8 100644 --- a/tests/test_playbooks/fixtures/domain-16.yml +++ b/tests/test_playbooks/fixtures/domain-16.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22barbaz.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"barbaz.example.com\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:06 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:07 UTC\",\"id\":28,\"name\":\"barbaz.example.com\",\"dns_id\":null,\"\ - dns\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"barbaz.example.com\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:39 UTC\",\"updated_at\":\"2024-10-08 14:39:40 UTC\",\"id\":12,\"name\":\"barbaz.example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '340' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '340' status: code: 200 message: OK @@ -128,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/28 + uri: https://foreman.example.org/api/domains/12?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:06 UTC","updated_at":"2020-10-07 - 10:57:07 UTC","id":28,"name":"barbaz.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:39 UTC","updated_at":"2024-10-08 + 14:39:40 UTC","id":12,"name":"barbaz.example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '496' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -171,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '496' status: code: 200 message: OK @@ -191,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -253,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -314,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -339,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-17.yml b/tests/test_playbooks/fixtures/domain-17.yml index 5096abd0e..bc33133a2 100644 --- a/tests/test_playbooks/fixtures/domain-17.yml +++ b/tests/test_playbooks/fixtures/domain-17.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22barbaz.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"barbaz.example.com\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:06 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:07 UTC\",\"id\":28,\"name\":\"barbaz.example.com\",\"dns_id\":null,\"\ - dns\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"barbaz.example.com\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:39 UTC\",\"updated_at\":\"2024-10-08 14:39:40 UTC\",\"id\":12,\"name\":\"barbaz.example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '340' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '340' status: code: 200 message: OK @@ -130,15 +124,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/domains/28 + uri: https://foreman.example.org/api/domains/12 response: body: - string: '{"id":28,"name":"barbaz.example.com","fullname":null,"created_at":"2020-10-07T10:57:06.705Z","updated_at":"2020-10-07T10:57:07.577Z","dns_id":null}' + string: '{"id":12,"name":"barbaz.example.com","fullname":null,"created_at":"2024-10-08T14:39:39.702Z","updated_at":"2024-10-08T14:39:40.332Z","dns_id":null}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '147' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +163,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '147' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-18.yml b/tests/test_playbooks/fixtures/domain-18.yml index 2fc6bbc02..c5c83671c 100644 --- a/tests/test_playbooks/fixtures/domain-18.yml +++ b/tests/test_playbooks/fixtures/domain-18.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -130,15 +124,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11 response: body: - string: '{"id":27,"name":"example.com","fullname":null,"created_at":"2020-10-07T10:57:00.637Z","updated_at":"2020-10-07T10:57:00.637Z","dns_id":null}' + string: '{"id":11,"name":"example.com","fullname":null,"created_at":"2024-10-08T14:39:35.435Z","updated_at":"2024-10-08T14:39:35.435Z","dns_id":null}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '140' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +163,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '140' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-19.yml b/tests/test_playbooks/fixtures/domain-19.yml index a32f2135f..9a573134a 100644 --- a/tests/test_playbooks/fixtures/domain-19.yml +++ b/tests/test_playbooks/fixtures/domain-19.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-2.yml b/tests/test_playbooks/fixtures/domain-2.yml index ebcec94ca..4fc3c8a98 100644 --- a/tests/test_playbooks/fixtures/domain-2.yml +++ b/tests/test_playbooks/fixtures/domain-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:56:54 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:56:54 UTC\",\"id\":26,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:31 UTC\",\"updated_at\":\"2024-10-08 14:39:31 UTC\",\"id\":10,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:54 UTC","id":26,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:31 UTC","id":10,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -171,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '489' status: code: 200 message: OK @@ -191,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -253,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -314,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -339,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK @@ -373,25 +355,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -405,13 +384,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -422,8 +399,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK @@ -443,19 +418,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10 response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:56 UTC","id":26,"name":"example.com","dns_id":1,"dns":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:32 UTC","id":10,"name":"example.com","dns_id":1,"dns":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '610' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -469,13 +446,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -486,8 +461,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '596' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-3.yml b/tests/test_playbooks/fixtures/domain-3.yml index 0029068ff..950542c0d 100644 --- a/tests/test_playbooks/fixtures/domain-3.yml +++ b/tests/test_playbooks/fixtures/domain-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:56:54 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:56:56 UTC\",\"id\":26,\"name\":\"example.com\",\"dns_id\":1,\"dns\":{\"\ - name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"\ - }}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:31 UTC\",\"updated_at\":\"2024-10-08 14:39:32 UTC\",\"id\":10,\"name\":\"example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '447' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '433' status: code: 200 message: OK @@ -129,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:56 UTC","id":26,"name":"example.com","dns_id":1,"dns":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:32 UTC","id":10,"name":"example.com","dns_id":1,"dns":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '610' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -155,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -172,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '596' status: code: 200 message: OK @@ -192,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -217,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -234,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -254,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -278,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -295,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -315,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -340,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -357,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK @@ -374,25 +355,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -406,13 +384,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -423,8 +399,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-4.yml b/tests/test_playbooks/fixtures/domain-4.yml index 9ea66bee7..a3ba5e797 100644 --- a/tests/test_playbooks/fixtures/domain-4.yml +++ b/tests/test_playbooks/fixtures/domain-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,18 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:56:54 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:56:56 UTC\",\"id\":26,\"name\":\"example.com\",\"dns_id\":1,\"dns\":{\"\ - name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"\ - }}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:31 UTC\",\"updated_at\":\"2024-10-08 14:39:32 UTC\",\"id\":10,\"name\":\"example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '447' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -112,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '433' status: code: 200 message: OK @@ -129,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:56 UTC","id":26,"name":"example.com","dns_id":1,"dns":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:32 UTC","id":10,"name":"example.com","dns_id":1,"dns":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '610' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -155,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -172,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '596' status: code: 200 message: OK @@ -192,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -217,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -234,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -254,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -278,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -295,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -315,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -340,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -357,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK @@ -378,19 +359,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10 response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:58 UTC","id":26,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:33 UTC","id":10,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -404,13 +387,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -421,8 +402,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '489' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-5.yml b/tests/test_playbooks/fixtures/domain-5.yml index 71ced71c1..3bbbc9b3b 100644 --- a/tests/test_playbooks/fixtures/domain-5.yml +++ b/tests/test_playbooks/fixtures/domain-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:56:54 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:56:58 UTC\",\"id\":26,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:31 UTC\",\"updated_at\":\"2024-10-08 14:39:33 UTC\",\"id\":10,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,19 +122,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:56:54 UTC","updated_at":"2020-10-07 - 10:56:58 UTC","id":26,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:31 UTC","updated_at":"2024-10-08 + 14:39:33 UTC","id":10,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '489' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -171,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '489' status: code: 200 message: OK @@ -191,18 +183,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -253,17 +241,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -294,8 +281,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -314,18 +299,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -339,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-6.yml b/tests/test_playbooks/fixtures/domain-6.yml index 67ab94164..251c11ecf 100644 --- a/tests/test_playbooks/fixtures/domain-6.yml +++ b/tests/test_playbooks/fixtures/domain-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:56:54 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:56:58 UTC\",\"id\":26,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:31 UTC\",\"updated_at\":\"2024-10-08 14:39:33 UTC\",\"id\":10,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -130,15 +124,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/domains/26 + uri: https://foreman.example.org/api/domains/10 response: body: - string: '{"id":26,"name":"example.com","fullname":null,"created_at":"2020-10-07T10:56:54.560Z","updated_at":"2020-10-07T10:56:58.156Z","dns_id":null}' + string: '{"id":10,"name":"example.com","fullname":null,"created_at":"2024-10-08T14:39:31.167Z","updated_at":"2024-10-08T14:39:33.745Z","dns_id":null}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '140' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +163,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '140' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-7.yml b/tests/test_playbooks/fixtures/domain-7.yml index 5ccd4be18..ef9b7396b 100644 --- a/tests/test_playbooks/fixtures/domain-7.yml +++ b/tests/test_playbooks/fixtures/domain-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK @@ -135,15 +131,17 @@ interactions: uri: https://foreman.example.org/api/domains response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":81,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[],"organizations":[]}' + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":52,"name":"subnet_param2","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value2"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '661' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -157,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/domain-8.yml b/tests/test_playbooks/fixtures/domain-8.yml index 26002ed7b..10d40b3ed 100644 --- a/tests/test_playbooks/fixtures/domain-8.yml +++ b/tests/test_playbooks/fixtures/domain-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,18 +122,20 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":81,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[],"organizations":[]}' + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":52,"name":"subnet_param2","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value2"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '661' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '563' status: code: 200 message: OK @@ -190,18 +182,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -215,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -232,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -252,17 +240,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +265,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -293,8 +280,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -313,18 +298,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -338,13 +324,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -355,13 +339,11 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK - request: - body: '{"domain": {"location_ids": [65, 68], "organization_ids": [69]}}' + body: '{"domain": {"location_ids": [23, 24], "organization_ids": [25]}}' headers: Accept: - application/json;version=2 @@ -376,21 +358,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11 response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":81,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":52,"name":"subnet_param2","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value2"}],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '922' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -404,13 +388,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -421,8 +403,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '824' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/domain-9.yml b/tests/test_playbooks/fixtures/domain-9.yml index 40acb147e..b22f2681c 100644 --- a/tests/test_playbooks/fixtures/domain-9.yml +++ b/tests/test_playbooks/fixtures/domain-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.3","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-10-07 10:57:00 UTC\",\"updated_at\":\"2020-10-07\ - \ 10:57:00 UTC\",\"id\":27,\"name\":\"example.com\",\"dns_id\":null,\"dns\"\ - :null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"example.com\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:39:35 UTC\",\"updated_at\":\"2024-10-08 14:39:35 UTC\",\"id\":11,\"name\":\"example.com\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '326' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +107,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '326' status: code: 200 message: OK @@ -128,21 +122,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/domains/27 + uri: https://foreman.example.org/api/domains/11?show_hidden_parameters=true response: body: - string: '{"fullname":null,"created_at":"2020-10-07 10:57:00 UTC","updated_at":"2020-10-07 - 10:57:00 UTC","id":27,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":80,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":30,"created_at":"2020-10-07 - 10:57:00 UTC","updated_at":"2020-10-07 10:57:00 UTC","id":81,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[{"id":65,"name":"Test - Location","title":"Test Location","description":null},{"id":68,"name":"Sublocation","title":"Test - Location/Sublocation","description":null}],"organizations":[{"id":69,"name":"Test + string: '{"fullname":null,"created_at":"2024-10-08 14:39:35 UTC","updated_at":"2024-10-08 + 14:39:35 UTC","id":11,"name":"example.com","dns_id":null,"dns":null,"subnets":[],"interfaces":[],"parameters":[{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":51,"name":"subnet_param1","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value1"},{"priority":30,"created_at":"2024-10-08 + 14:39:35 UTC","updated_at":"2024-10-08 14:39:35 UTC","id":52,"name":"subnet_param2","parameter_type":"string","associated_type":"domain","hidden_value?":false,"value":"value2"}],"locations":[{"id":23,"name":"Test + Location","title":"Test Location","description":null},{"id":24,"name":"Sublocation","title":"Test + Location/Sublocation","description":null}],"organizations":[{"id":25,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '922' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -173,8 +167,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '824' status: code: 200 message: OK @@ -193,18 +185,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:56:52 UTC\",\"updated_at\":\"2020-10-07 10:56:52 UTC\",\"id\":69,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:29 UTC\",\"updated_at\":\"2024-10-08 14:39:29 UTC\",\"id\":25,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -218,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -235,8 +225,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '413' status: code: 200 message: OK @@ -255,17 +243,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-10-07\ - \ 10:32:00 UTC\",\"updated_at\":\"2020-10-07 10:32:00 UTC\",\"id\":65,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:39:27 UTC\",\"updated_at\":\"2024-10-08 14:39:27 UTC\",\"id\":23,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -296,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '385' status: code: 200 message: OK @@ -316,18 +301,19 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%2FSublocation%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n\ - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"ancestry\":\"65\",\"parent_id\":65,\"parent_name\":\"Test Location\"\ - ,\"created_at\":\"2020-10-07 10:56:50 UTC\",\"updated_at\":\"2020-10-07 10:56:50\ - \ UTC\",\"id\":68,\"name\":\"Sublocation\",\"title\":\"Test Location/Sublocation\"\ - ,\"description\":null}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location/Sublocation\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Test Location\",\"created_at\":\"2024-10-08 + 14:39:28 UTC\",\"updated_at\":\"2024-10-08 14:39:28 UTC\",\"id\":24,\"name\":\"Sublocation\",\"title\":\"Test + Location/Sublocation\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -341,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.3 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -358,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '416' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host-0.yml b/tests/test_playbooks/fixtures/host-0.yml index 3d9d4a1de..b850687d7 100644 --- a/tests/test_playbooks/fixtures/host-0.yml +++ b/tests/test_playbooks/fixtures/host-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,14 +126,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -147,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,14 +184,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -205,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -226,8 +226,8 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "build": false, "managed": false}}' + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "build": false, "managed": false}}' headers: Accept: - application/json;version=2 @@ -236,7 +236,7 @@ interactions: Connection: - keep-alive Content-Length: - - '157' + - '161' Content-Type: - application/json User-Agent: @@ -245,19 +245,21 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2966' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -267,17 +269,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-1.yml b/tests/test_playbooks/fixtures/host-1.yml index 160616d04..63a0af7db 100644 --- a/tests/test_playbooks/fixtures/host-1.yml +++ b/tests/test_playbooks/fixtures/host-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2966' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-10.yml b/tests/test_playbooks/fixtures/host-10.yml index 69ab080d1..c5e1da179 100644 --- a/tests/test_playbooks/fixtures/host-10.yml +++ b/tests/test_playbooks/fixtures/host-10.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,13 +126,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"test_group\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":2,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-25 - 11:51:39 UTC\",\"updated_at\":\"2022-11-25 11:51:39 UTC\",\"id\":2,\"name\":\"test_group\",\"title\":\"test_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":14,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 15:49:32 UTC\",\"updated_at\":\"2024-10-08 15:49:32 UTC\",\"id\":27,\"name\":\"test_group\",\"title\":\"test_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1375' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -146,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,14 +183,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -204,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -241,14 +241,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -262,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -283,9 +283,9 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "hostgroup_id": 2, "build": false, "managed": - false}}' + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "hostgroup_id": 27, "build": false, + "managed": false}}' headers: Accept: - application/json;version=2 @@ -294,7 +294,7 @@ interactions: Connection: - keep-alive Content-Length: - - '176' + - '181' Content-Type: - application/json User-Agent: @@ -303,19 +303,21 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":2,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"test_group","hostgroup_title":"test_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","managed":true,"identifier":null,"id":3,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":27,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"test_group","hostgroup_title":"test_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","managed":true,"identifier":null,"id":9,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2980' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -325,17 +327,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-11.yml b/tests/test_playbooks/fixtures/host-11.yml index 63bfb2f13..fc28f1c13 100644 --- a/tests/test_playbooks/fixtures/host-11.yml +++ b/tests/test_playbooks/fixtures/host-11.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":4,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/3 + uri: https://foreman.example.org/api/hosts/4?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":2,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"test_group","hostgroup_title":"test_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","managed":true,"identifier":null,"id":3,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":27,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"test_group","hostgroup_title":"test_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","managed":true,"identifier":null,"id":9,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2980' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"test_group\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":2,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-25 - 11:51:39 UTC\",\"updated_at\":\"2022-11-25 11:51:39 UTC\",\"id\":2,\"name\":\"test_group\",\"title\":\"test_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":14,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 15:49:32 UTC\",\"updated_at\":\"2024-10-08 15:49:32 UTC\",\"id\":27,\"name\":\"test_group\",\"title\":\"test_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1375' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-12.yml b/tests/test_playbooks/fixtures/host-12.yml index 03139d157..1eda4348c 100644 --- a/tests/test_playbooks/fixtures/host-12.yml +++ b/tests/test_playbooks/fixtures/host-12.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":4,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/3 + uri: https://foreman.example.org/api/hosts/4?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":2,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"test_group","hostgroup_title":"test_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","managed":true,"identifier":null,"id":3,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":27,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"test_group","hostgroup_title":"test_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","managed":true,"identifier":null,"id":9,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2980' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"test_group/child_group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":2,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"2\",\"parent_id\":2,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-25 - 11:51:40 UTC\",\"updated_at\":\"2022-11-25 11:51:40 UTC\",\"id\":3,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":14,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"27\",\"parent_id\":27,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 15:49:32 UTC\",\"updated_at\":\"2024-10-08 15:49:32 UTC\",\"id\":28,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1406' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -344,7 +344,7 @@ interactions: code: 200 message: OK - request: - body: '{"host": {"hostgroup_id": 3}}' + body: '{"host": {"hostgroup_id": 28}}' headers: Accept: - application/json;version=2 @@ -353,28 +353,30 @@ interactions: Connection: - keep-alive Content-Length: - - '29' + - '30' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hosts/3 + uri: https://foreman.example.org/api/hosts/4 response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":3,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:53 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","managed":true,"identifier":null,"id":3,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":28,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:44 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","managed":true,"identifier":null,"id":9,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2993' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -388,13 +390,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-13.yml b/tests/test_playbooks/fixtures/host-13.yml index db63aee88..92e1ae51e 100644 --- a/tests/test_playbooks/fixtures/host-13.yml +++ b/tests/test_playbooks/fixtures/host-13.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":4,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/3 + uri: https://foreman.example.org/api/hosts/4?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":3,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:53 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:51 UTC","updated_at":"2022-11-25 11:51:51 UTC","managed":true,"identifier":null,"id":3,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":28,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:44 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:43 UTC","updated_at":"2024-10-08 15:49:43 UTC","managed":true,"identifier":null,"id":9,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2993' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"test_group/child_group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":2,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"2\",\"parent_id\":2,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-25 - 11:51:40 UTC\",\"updated_at\":\"2022-11-25 11:51:40 UTC\",\"id\":3,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":14,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"27\",\"parent_id\":27,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 15:49:32 UTC\",\"updated_at\":\"2024-10-08 15:49:32 UTC\",\"id\":28,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1406' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-14.yml b/tests/test_playbooks/fixtures/host-14.yml index 397b045a6..edbd218de 100644 --- a/tests/test_playbooks/fixtures/host-14.yml +++ b/tests/test_playbooks/fixtures/host-14.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":4,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/3 + uri: https://foreman.example.org/api/hosts/4 response: body: - string: '{"id":3,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:51:53.358Z","created_at":"2022-11-25T11:51:51.837Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":3,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":5,"location_id":6,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":4,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:49:44.849Z","created_at":"2024-10-08T15:49:43.324Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":28,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":28,"location_id":29,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '865' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-15.yml b/tests/test_playbooks/fixtures/host-15.yml index 134da2767..efb7423e7 100644 --- a/tests/test_playbooks/fixtures/host-15.yml +++ b/tests/test_playbooks/fixtures/host-15.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-16.yml b/tests/test_playbooks/fixtures/host-16.yml index 087e1c16a..cdbf93a04 100644 --- a/tests/test_playbooks/fixtures/host-16.yml +++ b/tests/test_playbooks/fixtures/host-16.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,13 +126,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"test_group/child_group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":2,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"2\",\"parent_id\":2,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-25 - 11:51:40 UTC\",\"updated_at\":\"2022-11-25 11:51:40 UTC\",\"id\":3,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":14,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"27\",\"parent_id\":27,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 15:49:32 UTC\",\"updated_at\":\"2024-10-08 15:49:32 UTC\",\"id\":28,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1406' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -146,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,14 +183,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -204,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -241,14 +241,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -262,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -283,9 +283,9 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "hostgroup_id": 3, "build": false, "managed": - false}}' + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "hostgroup_id": 28, "build": false, + "managed": false}}' headers: Accept: - application/json;version=2 @@ -294,7 +294,7 @@ interactions: Connection: - keep-alive Content-Length: - - '176' + - '181' Content-Type: - application/json User-Agent: @@ -303,19 +303,21 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":3,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:56 UTC","updated_at":"2022-11-25 11:51:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:56 UTC","updated_at":"2022-11-25 11:51:56 UTC","managed":true,"identifier":null,"id":4,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":28,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:48 UTC","updated_at":"2024-10-08 15:49:48 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":5,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:48 UTC","updated_at":"2024-10-08 15:49:48 UTC","managed":true,"identifier":null,"id":10,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2994' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -325,17 +327,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-17.yml b/tests/test_playbooks/fixtures/host-17.yml index 34ba95756..973d5a726 100644 --- a/tests/test_playbooks/fixtures/host-17.yml +++ b/tests/test_playbooks/fixtures/host-17.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":4,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":5,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/4 + uri: https://foreman.example.org/api/hosts/5?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":3,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:56 UTC","updated_at":"2022-11-25 11:51:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":4,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:56 UTC","updated_at":"2022-11-25 11:51:56 UTC","managed":true,"identifier":null,"id":4,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":28,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:48 UTC","updated_at":"2024-10-08 15:49:48 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":5,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":"child_group","hostgroup_title":"test_group/child_group","parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:48 UTC","updated_at":"2024-10-08 15:49:48 UTC","managed":true,"identifier":null,"id":10,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2994' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"test_group/child_group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":2,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"2\",\"parent_id\":2,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-25 - 11:51:40 UTC\",\"updated_at\":\"2022-11-25 11:51:40 UTC\",\"id\":3,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":14,\"domain_name\":\"example.net\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":\"27\",\"parent_id\":27,\"parent_name\":\"test_group\",\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 15:49:32 UTC\",\"updated_at\":\"2024-10-08 15:49:32 UTC\",\"id\":28,\"name\":\"child_group\",\"title\":\"test_group/child_group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1406' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-18.yml b/tests/test_playbooks/fixtures/host-18.yml index f333169b4..1a86ad8c6 100644 --- a/tests/test_playbooks/fixtures/host-18.yml +++ b/tests/test_playbooks/fixtures/host-18.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":4,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":5,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/4 + uri: https://foreman.example.org/api/hosts/5 response: body: - string: '{"id":4,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:51:56.287Z","created_at":"2022-11-25T11:51:56.287Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":3,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":5,"location_id":6,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":5,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:49:48.121Z","created_at":"2024-10-08T15:49:48.121Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":28,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":28,"location_id":29,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '865' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-19.yml b/tests/test_playbooks/fixtures/host-19.yml index 134da2767..efb7423e7 100644 --- a/tests/test_playbooks/fixtures/host-19.yml +++ b/tests/test_playbooks/fixtures/host-19.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-2.yml b/tests/test_playbooks/fixtures/host-2.yml index b8891457d..aa214262d 100644 --- a/tests/test_playbooks/fixtures/host-2.yml +++ b/tests/test_playbooks/fixtures/host-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2966' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,18 +303,20 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"login=\\\"test\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"firstname\":\"Test\",\"lastname\":\"Userson\",\"mail\":\"test.userson@example.com\",\"mail_enabled\":false,\"admin\":false,\"auth_source_id\":1,\"disabled\":false,\"auth_source_name\":\"Internal\",\"timezone\":\"Stockholm\",\"locale\":\"sv_SE\",\"last_login_on\":null,\"created_at\":\"2022-11-25 - 11:51:40 UTC\",\"updated_at\":\"2022-11-25 11:51:40 UTC\",\"id\":5,\"login\":\"test\",\"description\":\"Dr. - Test Userson\",\"ssh_keys\":[],\"default_location\":{\"id\":6,\"name\":\"Test - Location\",\"title\":\"Test Location\",\"description\":null},\"locations\":[{\"id\":6,\"name\":\"Test - Location\"}],\"default_organization\":{\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test - Organization\",\"description\":\"A test organization\"},\"organizations\":[{\"id\":5,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"firstname\":\"Test\",\"lastname\":\"Userson\",\"mail\":\"test.userson@example.com\",\"mail_enabled\":false,\"admin\":false,\"auth_source_id\":1,\"disabled\":false,\"auth_source_name\":\"Internal\",\"timezone\":\"Stockholm\",\"locale\":\"sv_SE\",\"last_login_on\":null,\"created_at\":\"2024-10-08 + 15:49:33 UTC\",\"updated_at\":\"2024-10-08 15:49:33 UTC\",\"id\":5,\"login\":\"test\",\"description\":\"Dr. + Test Userson\",\"ssh_keys\":[],\"default_location\":{\"id\":29,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null},\"locations\":[{\"id\":29,\"name\":\"Test + Location\"}],\"default_organization\":{\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test + Organization\",\"description\":\"A test organization\"},\"organizations\":[{\"id\":28,\"name\":\"Test Organization\"}],\"effective_admin\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '900' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -328,13 +330,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -364,22 +364,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3 response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":5,"owner_name":"Test - Userson","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:46 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":5,"owner_name":"Test + Userson","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:38 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2968' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -393,13 +395,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-20.yml b/tests/test_playbooks/fixtures/host-20.yml index 3081bcc7b..2b26b9bec 100644 --- a/tests/test_playbooks/fixtures/host-20.yml +++ b/tests/test_playbooks/fixtures/host-20.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,14 +126,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -147,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,14 +184,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -205,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -226,8 +226,8 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "ip": "192.0.2.23", "mac": "ee:ff:00:00:00:01", + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "ip": "192.0.2.23", "mac": "ee:ff:00:00:00:01", "build": false, "managed": false}}' headers: Accept: @@ -237,7 +237,7 @@ interactions: Connection: - keep-alive Content-Length: - - '205' + - '209' Content-Type: - application/json User-Agent: @@ -246,19 +246,21 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:59 UTC","updated_at":"2022-11-25 11:51:59 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":5,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:59 UTC","updated_at":"2022-11-25 11:51:59 UTC","managed":true,"identifier":null,"id":5,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:51 UTC","updated_at":"2024-10-08 15:49:51 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":6,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:51 UTC","updated_at":"2024-10-08 15:49:51 UTC","managed":true,"identifier":null,"id":11,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3013' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -268,17 +270,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-21.yml b/tests/test_playbooks/fixtures/host-21.yml index 7dcab4d3f..1bd255a5e 100644 --- a/tests/test_playbooks/fixtures/host-21.yml +++ b/tests/test_playbooks/fixtures/host-21.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":5,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":6,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/5 + uri: https://foreman.example.org/api/hosts/6?show_hidden_parameters=true response: body: - string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:59 UTC","updated_at":"2022-11-25 11:51:59 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":5,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:59 UTC","updated_at":"2022-11-25 11:51:59 UTC","managed":true,"identifier":null,"id":5,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:51 UTC","updated_at":"2024-10-08 15:49:51 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":6,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:51 UTC","updated_at":"2024-10-08 15:49:51 UTC","managed":true,"identifier":null,"id":11,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3013' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-22.yml b/tests/test_playbooks/fixtures/host-22.yml index f9d3ba0ab..33a712dee 100644 --- a/tests/test_playbooks/fixtures/host-22.yml +++ b/tests/test_playbooks/fixtures/host-22.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":5,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":6,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/5 + uri: https://foreman.example.org/api/hosts/6 response: body: - string: '{"id":5,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:51:59.179Z","created_at":"2022-11-25T11:51:59.179Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":5,"location_id":6,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":6,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:49:51.295Z","created_at":"2024-10-08T15:49:51.295Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":28,"location_id":29,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '867' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-23.yml b/tests/test_playbooks/fixtures/host-23.yml index eb3bd99e3..099921422 100644 --- a/tests/test_playbooks/fixtures/host-23.yml +++ b/tests/test_playbooks/fixtures/host-23.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,13 +126,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"superARCH\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 11:51:41 UTC\",\"updated_at\":\"2022-11-25 11:51:41 UTC\",\"name\":\"superARCH\",\"id\":2}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 15:49:34 UTC\",\"updated_at\":\"2024-10-08 15:49:34 UTC\",\"name\":\"superARCH\",\"id\":3}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -146,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -189,6 +189,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -202,13 +204,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -240,13 +240,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title~\\\"TestOS\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 14:40:57 UTC\",\"updated_at\":\"2024-10-08 + 14:40:57 UTC\",\"id\":5,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '412' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -260,13 +262,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -297,14 +297,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -318,13 +320,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -355,14 +355,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -376,13 +378,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -397,9 +397,9 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "architecture_id": 2, "operatingsystem_id": - 2, "build": false, "managed": false}}' + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "architecture_id": 3, "operatingsystem_id": + 5, "build": false, "managed": false}}' headers: Accept: - application/json;version=2 @@ -408,7 +408,7 @@ interactions: Connection: - keep-alive Content-Length: - - '204' + - '208' Content-Type: - application/json User-Agent: @@ -417,20 +417,22 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":2,"architecture_name":"superARCH","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:01 UTC","updated_at":"2022-11-25 11:52:01 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":6,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:01 UTC","updated_at":"2022-11-25 11:52:01 UTC","managed":true,"identifier":null,"id":6,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":3,"architecture_name":"superARCH","operatingsystem_id":5,"operatingsystem_name":"TestOS + 7.6","subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:53 UTC","updated_at":"2024-10-08 15:49:53 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:53 UTC","updated_at":"2024-10-08 15:49:53 UTC","managed":true,"identifier":null,"id":12,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2976' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -440,17 +442,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-24.yml b/tests/test_playbooks/fixtures/host-24.yml index c8a15b88f..6c6c4b9bd 100644 --- a/tests/test_playbooks/fixtures/host-24.yml +++ b/tests/test_playbooks/fixtures/host-24.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":6,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,23 +121,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/6 + uri: https://foreman.example.org/api/hosts/7?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":2,"architecture_name":"superARCH","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:01 UTC","updated_at":"2022-11-25 11:52:01 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":6,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:01 UTC","updated_at":"2022-11-25 11:52:01 UTC","managed":true,"identifier":null,"id":6,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":3,"architecture_name":"superARCH","operatingsystem_id":5,"operatingsystem_name":"TestOS + 7.6","subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:53 UTC","updated_at":"2024-10-08 15:49:53 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:53 UTC","updated_at":"2024-10-08 15:49:53 UTC","managed":true,"identifier":null,"id":12,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2976' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -188,13 +188,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"superARCH\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 11:51:41 UTC\",\"updated_at\":\"2022-11-25 11:51:41 UTC\",\"name\":\"superARCH\",\"id\":2}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 15:49:34 UTC\",\"updated_at\":\"2024-10-08 15:49:34 UTC\",\"name\":\"superARCH\",\"id\":3}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -251,6 +251,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -264,13 +266,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,13 +302,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title~\\\"TestOS\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 14:40:57 UTC\",\"updated_at\":\"2024-10-08 + 14:40:57 UTC\",\"id\":5,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '412' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -322,13 +324,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -359,14 +359,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -380,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -417,14 +417,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -438,13 +440,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-25.yml b/tests/test_playbooks/fixtures/host-25.yml index 686cb6f46..38d83f787 100644 --- a/tests/test_playbooks/fixtures/host-25.yml +++ b/tests/test_playbooks/fixtures/host-25.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":6,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/6 + uri: https://foreman.example.org/api/hosts/7 response: body: - string: '{"id":6,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:52:01.348Z","created_at":"2022-11-25T11:52:01.348Z","root_pass":null,"architecture_id":2,"operatingsystem_id":2,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":5,"location_id":6,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":7,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:49:53.657Z","created_at":"2024-10-08T15:49:53.657Z","root_pass":null,"architecture_id":3,"operatingsystem_id":5,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":28,"location_id":29,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '861' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-26.yml b/tests/test_playbooks/fixtures/host-26.yml index 11be9c02b..0aac1b273 100644 --- a/tests/test_playbooks/fixtures/host-26.yml +++ b/tests/test_playbooks/fixtures/host-26.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,13 +126,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -146,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,14 +183,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -204,13 +206,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -241,14 +241,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -262,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -283,9 +283,9 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "build": false, "managed": false, "environment_id": - 1, "puppet_attributes": {"environment_id": 1}}}' + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "build": false, "managed": false, + "environment_id": 1, "puppet_attributes": {"environment_id": 1}}}' headers: Accept: - application/json;version=2 @@ -294,7 +294,7 @@ interactions: Connection: - keep-alive Content-Length: - - '222' + - '226' Content-Type: - application/json User-Agent: @@ -303,19 +303,21 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[],"config_groups":[],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[],"config_groups":[],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3151' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -325,17 +327,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -367,12 +367,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -386,13 +388,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -407,7 +407,7 @@ interactions: code: 200 message: OK - request: - body: '{"puppetclass_id": 47}' + body: '{"puppetclass_id": 41}' headers: Accept: - application/json;version=2 @@ -422,15 +422,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/foreman_puppet/api/hosts/7/puppetclass_ids + uri: https://foreman.example.org/foreman_puppet/api/hosts/8/puppetclass_ids response: body: - string: '{"host_id":7,"puppetclass_id":47}' + string: '{"host_id":8,"puppetclass_id":41}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '33' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -444,13 +446,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-27.yml b/tests/test_playbooks/fixtures/host-27.yml index f65b1e380..b553bff44 100644 --- a/tests/test_playbooks/fixtures/host-27.yml +++ b/tests/test_playbooks/fixtures/host-27.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3439' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,12 +361,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -380,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-28.yml b/tests/test_playbooks/fixtures/host-28.yml index 872869ee0..e8d7e95cf 100644 --- a/tests/test_playbooks/fixtures/host-28.yml +++ b/tests/test_playbooks/fixtures/host-28.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3439' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,12 +361,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::haproxy_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":24,\"name\":\"prometheus::haproxy_exporter\",\"created_at\":\"2022-11-25T11:50:41.131Z\",\"updated_at\":\"2022-11-25T11:50:41.131Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":17,\"name\":\"prometheus::haproxy_exporter\",\"created_at\":\"2024-10-04T11:23:58.276Z\",\"updated_at\":\"2024-10-04T11:23:58.276Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '337' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -380,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -401,7 +401,7 @@ interactions: code: 200 message: OK - request: - body: '{"puppetclass_id": 24}' + body: '{"puppetclass_id": 17}' headers: Accept: - application/json;version=2 @@ -416,15 +416,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/foreman_puppet/api/hosts/7/puppetclass_ids + uri: https://foreman.example.org/foreman_puppet/api/hosts/8/puppetclass_ids response: body: - string: '{"host_id":7,"puppetclass_id":24}' + string: '{"host_id":8,"puppetclass_id":17}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '33' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -438,13 +440,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -472,7 +472,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/foreman_puppet/api/hosts/7/puppetclass_ids/47 + uri: https://foreman.example.org/foreman_puppet/api/hosts/8/puppetclass_ids/41 response: body: string: '[]' @@ -481,6 +481,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -494,13 +496,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-29.yml b/tests/test_playbooks/fixtures/host-29.yml index 8939f4285..4139e198e 100644 --- a/tests/test_playbooks/fixtures/host-29.yml +++ b/tests/test_playbooks/fixtures/host-29.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3447' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,12 +361,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::haproxy_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":24,\"name\":\"prometheus::haproxy_exporter\",\"created_at\":\"2022-11-25T11:50:41.131Z\",\"updated_at\":\"2022-11-25T11:50:41.131Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":17,\"name\":\"prometheus::haproxy_exporter\",\"created_at\":\"2024-10-04T11:23:58.276Z\",\"updated_at\":\"2024-10-04T11:23:58.276Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '337' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -380,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-3.yml b/tests/test_playbooks/fixtures/host-3.yml index 48a6cbf8d..c2b3ad061 100644 --- a/tests/test_playbooks/fixtures/host-3.yml +++ b/tests/test_playbooks/fixtures/host-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":5,"owner_name":"Test - Userson","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:46 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":5,"owner_name":"Test + Userson","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:38 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2968' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,18 +303,20 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"login=\\\"test\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"firstname\":\"Test\",\"lastname\":\"Userson\",\"mail\":\"test.userson@example.com\",\"mail_enabled\":false,\"admin\":false,\"auth_source_id\":1,\"disabled\":false,\"auth_source_name\":\"Internal\",\"timezone\":\"Stockholm\",\"locale\":\"sv_SE\",\"last_login_on\":null,\"created_at\":\"2022-11-25 - 11:51:40 UTC\",\"updated_at\":\"2022-11-25 11:51:40 UTC\",\"id\":5,\"login\":\"test\",\"description\":\"Dr. - Test Userson\",\"ssh_keys\":[],\"default_location\":{\"id\":6,\"name\":\"Test - Location\",\"title\":\"Test Location\",\"description\":null},\"locations\":[{\"id\":6,\"name\":\"Test - Location\"}],\"default_organization\":{\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test - Organization\",\"description\":\"A test organization\"},\"organizations\":[{\"id\":5,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"firstname\":\"Test\",\"lastname\":\"Userson\",\"mail\":\"test.userson@example.com\",\"mail_enabled\":false,\"admin\":false,\"auth_source_id\":1,\"disabled\":false,\"auth_source_name\":\"Internal\",\"timezone\":\"Stockholm\",\"locale\":\"sv_SE\",\"last_login_on\":null,\"created_at\":\"2024-10-08 + 15:49:33 UTC\",\"updated_at\":\"2024-10-08 15:49:33 UTC\",\"id\":5,\"login\":\"test\",\"description\":\"Dr. + Test Userson\",\"ssh_keys\":[],\"default_location\":{\"id\":29,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null},\"locations\":[{\"id\":29,\"name\":\"Test + Location\"}],\"default_organization\":{\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test + Organization\",\"description\":\"A test organization\"},\"organizations\":[{\"id\":28,\"name\":\"Test Organization\"}],\"effective_admin\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '900' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -328,13 +330,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-30.yml b/tests/test_playbooks/fixtures/host-30.yml index a97e1d5dc..502463e3c 100644 --- a/tests/test_playbooks/fixtures/host-30.yml +++ b/tests/test_playbooks/fixtures/host-30.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":24,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":17,"name":"prometheus::haproxy_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3447' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,12 +361,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -380,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -401,7 +401,7 @@ interactions: code: 200 message: OK - request: - body: '{"puppetclass_id": 47}' + body: '{"puppetclass_id": 41}' headers: Accept: - application/json;version=2 @@ -416,15 +416,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/foreman_puppet/api/hosts/7/puppetclass_ids + uri: https://foreman.example.org/foreman_puppet/api/hosts/8/puppetclass_ids response: body: - string: '{"host_id":7,"puppetclass_id":47}' + string: '{"host_id":8,"puppetclass_id":41}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '33' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -438,13 +440,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -472,7 +472,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/foreman_puppet/api/hosts/7/puppetclass_ids/24 + uri: https://foreman.example.org/foreman_puppet/api/hosts/8/puppetclass_ids/17 response: body: string: '[]' @@ -481,6 +481,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -494,13 +496,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-31.yml b/tests/test_playbooks/fixtures/host-31.yml index f65b1e380..b553bff44 100644 --- a/tests/test_playbooks/fixtures/host-31.yml +++ b/tests/test_playbooks/fixtures/host-31.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3439' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,13 +187,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +244,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +302,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,12 +361,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -380,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-32.yml b/tests/test_playbooks/fixtures/host-32.yml index 8d7036380..a0be393bb 100644 --- a/tests/test_playbooks/fixtures/host-32.yml +++ b/tests/test_playbooks/fixtures/host-32.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3439' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -300,7 +300,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/foreman_puppet/api/hosts/7/puppetclass_ids/47 + uri: https://foreman.example.org/foreman_puppet/api/hosts/8/puppetclass_ids/41 response: body: string: '[]' @@ -309,6 +309,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -322,13 +324,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-33.yml b/tests/test_playbooks/fixtures/host-33.yml index fbc798705..37a021101 100644 --- a/tests/test_playbooks/fixtures/host-33.yml +++ b/tests/test_playbooks/fixtures/host-33.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":7,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:03 UTC","updated_at":"2022-11-25 11:52:03 UTC","managed":true,"identifier":null,"id":7,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[],"config_groups":[],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"environment_id":1,"environment_name":"production","interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:56 UTC","updated_at":"2024-10-08 15:49:56 UTC","managed":true,"identifier":null,"id":13,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppet":{"puppetclasses":[],"config_groups":[],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3151' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-34.yml b/tests/test_playbooks/fixtures/host-34.yml index 727b6c3fa..6d5b0c5c0 100644 --- a/tests/test_playbooks/fixtures/host-34.yml +++ b/tests/test_playbooks/fixtures/host-34.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":7,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/7 + uri: https://foreman.example.org/api/hosts/8 response: body: - string: '{"id":7,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:52:03.544Z","created_at":"2022-11-25T11:52:03.544Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":5,"location_id":6,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"puppet_attributes":{"id":2,"host_id":7,"environment_id":1,"puppet_proxy_id":null,"created_at":"2022-11-25T11:52:03.569Z","updated_at":"2022-11-25T11:52:03.569Z"}}' + string: '{"id":8,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:49:56.104Z","created_at":"2024-10-08T15:49:56.104Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":28,"location_id":29,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4,"puppet_attributes":{"id":2,"host_id":8,"environment_id":1,"puppet_proxy_id":null,"created_at":"2024-10-08T15:49:56.135Z","updated_at":"2024-10-08T15:49:56.135Z"}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1030' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-35.yml b/tests/test_playbooks/fixtures/host-35.yml index a66f7b13c..dca72a013 100644 --- a/tests/test_playbooks/fixtures/host-35.yml +++ b/tests/test_playbooks/fixtures/host-35.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,14 +126,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -147,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,14 +184,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -205,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -226,8 +226,8 @@ interactions: code: 200 message: OK - request: - body: '{"location_id": 6, "organization_id": 5, "host": {"name": "test-host.example.net", - "location_id": 6, "organization_id": 5, "build": false, "managed": false}}' + body: '{"location_id": 29, "organization_id": 28, "host": {"name": "test-host.example.net", + "location_id": 29, "organization_id": 28, "build": false, "managed": false}}' headers: Accept: - application/json;version=2 @@ -236,7 +236,7 @@ interactions: Connection: - keep-alive Content-Length: - - '157' + - '161' Content-Type: - application/json User-Agent: @@ -245,19 +245,21 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":9,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:03 UTC","managed":true,"identifier":null,"id":14,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2967' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -267,17 +269,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 6; Test Location + - 29; Test Location Foreman_current_organization: - - 5; Test Organization + - 28; Test Organization Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-36.yml b/tests/test_playbooks/fixtures/host-36.yml index 23d9491b2..7ce21e6bb 100644 --- a/tests/test_playbooks/fixtures/host-36.yml +++ b/tests/test_playbooks/fixtures/host-36.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":9,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/8 + uri: https://foreman.example.org/api/hosts/9?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:03 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":9,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:03 UTC","managed":true,"identifier":null,"id":14,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2967' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location Secondary\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:36 UTC\",\"updated_at\":\"2022-11-25 11:51:36 UTC\",\"id\":8,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:29 UTC\",\"updated_at\":\"2024-10-08 15:49:29 UTC\",\"id\":31,\"name\":\"Test Location Secondary\",\"title\":\"Test Location Secondary\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '415' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -246,8 +246,8 @@ interactions: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization Secondary\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:36 UTC\",\"updated_at\":\"2022-11-25 11:51:36 UTC\",\"id\":7,\"name\":\"Test + [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":30,\"name\":\"Test Organization Secondary\",\"title\":\"Test Organization Secondary\",\"description\":\"A test organization\"}]\n}\n" headers: @@ -255,6 +255,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '443' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -268,13 +270,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -289,7 +289,7 @@ interactions: code: 200 message: OK - request: - body: '{"host": {"location_id": 8, "organization_id": 7}}' + body: '{"host": {"location_id": 31, "organization_id": 30}}' headers: Accept: - application/json;version=2 @@ -298,28 +298,30 @@ interactions: Connection: - keep-alive Content-Length: - - '50' + - '52' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hosts/8 + uri: https://foreman.example.org/api/hosts/9 response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":7,"organization_name":"Test - Organization Secondary","location_id":8,"location_name":"Test Location Secondary","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:04 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":30,"organization_name":"Test + Organization Secondary","location_id":31,"location_name":"Test Location Secondary","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":9,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:03 UTC","managed":true,"identifier":null,"id":14,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2987' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -333,13 +335,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-37.yml b/tests/test_playbooks/fixtures/host-37.yml index a2bf21a33..824136725 100644 --- a/tests/test_playbooks/fixtures/host-37.yml +++ b/tests/test_playbooks/fixtures/host-37.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":9,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/8 + uri: https://foreman.example.org/api/hosts/9?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":7,"organization_name":"Test - Organization Secondary","location_id":8,"location_name":"Test Location Secondary","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":8,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:52:11 UTC","updated_at":"2022-11-25 11:52:11 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:04 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":30,"organization_name":"Test + Organization Secondary","location_id":31,"location_name":"Test Location Secondary","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":9,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:50:03 UTC","updated_at":"2024-10-08 15:50:03 UTC","managed":true,"identifier":null,"id":14,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2987' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location Secondary\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:36 UTC\",\"updated_at\":\"2022-11-25 11:51:36 UTC\",\"id\":8,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:29 UTC\",\"updated_at\":\"2024-10-08 15:49:29 UTC\",\"id\":31,\"name\":\"Test Location Secondary\",\"title\":\"Test Location Secondary\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '415' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -246,8 +246,8 @@ interactions: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization Secondary\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:36 UTC\",\"updated_at\":\"2022-11-25 11:51:36 UTC\",\"id\":7,\"name\":\"Test + [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":30,\"name\":\"Test Organization Secondary\",\"title\":\"Test Organization Secondary\",\"description\":\"A test organization\"}]\n}\n" headers: @@ -255,6 +255,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '443' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -268,13 +270,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-38.yml b/tests/test_playbooks/fixtures/host-38.yml index 8ab6a022b..07e192625 100644 --- a/tests/test_playbooks/fixtures/host-38.yml +++ b/tests/test_playbooks/fixtures/host-38.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":8,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":9,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/8 + uri: https://foreman.example.org/api/hosts/9 response: body: - string: '{"id":8,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:52:11.902Z","created_at":"2022-11-25T11:52:11.060Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":7,"location_id":8,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":9,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:50:04.821Z","created_at":"2024-10-08T15:50:03.804Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":30,"location_id":31,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '867' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-4.yml b/tests/test_playbooks/fixtures/host-4.yml index 0906639df..a6a0947f7 100644 --- a/tests/test_playbooks/fixtures/host-4.yml +++ b/tests/test_playbooks/fixtures/host-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,22 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":5,"owner_name":"Test - Userson","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:46 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":5,"owner_name":"Test + Userson","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:38 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2968' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -208,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -266,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,13 +303,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"testgroup\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"admin\":false,\"created_at\":\"2022-11-25 - 11:51:41 UTC\",\"updated_at\":\"2022-11-25 11:51:41 UTC\",\"name\":\"testgroup\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"admin\":false,\"created_at\":\"2024-10-08 + 15:49:34 UTC\",\"updated_at\":\"2024-10-08 15:49:34 UTC\",\"name\":\"testgroup\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '294' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -359,21 +359,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3 response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:47 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","creator_id":4,"creator":"Admin + User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:39 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2970' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -387,13 +390,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-5.yml b/tests/test_playbooks/fixtures/host-5.yml index 83ef3420b..a05356eb0 100644 --- a/tests/test_playbooks/fixtures/host-5.yml +++ b/tests/test_playbooks/fixtures/host-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,21 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:47 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","creator_id":4,"creator":"Admin + User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:39 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2970' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -186,14 +187,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,13 +303,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"testgroup\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"admin\":false,\"created_at\":\"2022-11-25 - 11:51:41 UTC\",\"updated_at\":\"2022-11-25 11:51:41 UTC\",\"name\":\"testgroup\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"admin\":false,\"created_at\":\"2024-10-08 + 15:49:34 UTC\",\"updated_at\":\"2024-10-08 15:49:34 UTC\",\"name\":\"testgroup\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '294' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -322,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-6.yml b/tests/test_playbooks/fixtures/host-6.yml index 915ddcec3..124b5799c 100644 --- a/tests/test_playbooks/fixtures/host-6.yml +++ b/tests/test_playbooks/fixtures/host-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,21 +121,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:47 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:44 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","creator_id":4,"creator":"Admin + User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:39 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:36 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2970' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -186,14 +187,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:51:38 UTC\",\"updated_at\":\"2022-11-25 11:51:38 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":1,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 15:49:31 UTC\",\"updated_at\":\"2024-10-08 15:49:31 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":17,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '928' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,14 +245,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -265,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -302,14 +303,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -323,13 +326,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -344,7 +345,7 @@ interactions: code: 200 message: OK - request: - body: '{"host": {"subnet_id": 1}}' + body: '{"host": {"subnet_id": 17}}' headers: Accept: - application/json;version=2 @@ -353,29 +354,32 @@ interactions: Connection: - keep-alive Content-Length: - - '26' + - '27' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3 response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:47 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:48 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":17,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","creator_id":4,"creator":"Admin + User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:39 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":17,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:40 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2986' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -389,13 +393,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-7.yml b/tests/test_playbooks/fixtures/host-7.yml index 2431c49e8..b548810d6 100644 --- a/tests/test_playbooks/fixtures/host-7.yml +++ b/tests/test_playbooks/fixtures/host-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -121,23 +121,26 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:47 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":5,"organization_name":"Test - Organization","location_id":6,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false},{"priority":0,"created_at":"2022-11-25 - 10:13:14 UTC","updated_at":"2022-11-25 10:13:14 UTC","id":3,"name":"host_packages","parameter_type":"string","value":""}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2022-11-25 - 11:51:44 UTC","updated_at":"2022-11-25 11:51:48 UTC","managed":true,"identifier":null,"id":2,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":14,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":17,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_name":"testgroup","owner_type":"Usergroup","creator_id":4,"creator":"Admin + User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:39 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":28,"organization_name":"Test + Organization","location_id":29,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":3,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":17,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":14,"domain_name":"example.net","created_at":"2024-10-08 + 15:49:36 UTC","updated_at":"2024-10-08 15:49:40 UTC","managed":true,"identifier":null,"id":8,"name":"test-host.example.net","ip":null,"ip6":null,"mac":null,"mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2986' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +154,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -188,14 +189,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:51:38 UTC\",\"updated_at\":\"2022-11-25 11:51:38 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":1,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 15:49:31 UTC\",\"updated_at\":\"2024-10-08 15:49:31 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":17,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '928' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -209,13 +212,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -246,14 +247,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:35 UTC\",\"updated_at\":\"2022-11-25 11:51:35 UTC\",\"id\":6,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:28 UTC\",\"updated_at\":\"2024-10-08 15:49:28 UTC\",\"id\":29,\"name\":\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -267,13 +270,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -304,14 +305,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:51:34 UTC\",\"updated_at\":\"2022-11-25 11:51:34 UTC\",\"id\":5,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 15:49:27 UTC\",\"updated_at\":\"2024-10-08 15:49:27 UTC\",\"id\":28,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -325,13 +328,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-8.yml b/tests/test_playbooks/fixtures/host-8.yml index b0009d324..592c281ef 100644 --- a/tests/test_playbooks/fixtures/host-8.yml +++ b/tests/test_playbooks/fixtures/host-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,12 +70,14 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":3,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,15 +123,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/3 response: body: - string: '{"id":2,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2022-11-25T11:51:47.510Z","created_at":"2022-11-25T11:51:44.471Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_type":"Usergroup","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":5,"location_id":6,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":3,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T15:49:39.699Z","created_at":"2024-10-08T15:49:36.972Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":1,"owner_type":"Usergroup","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":28,"location_id":29,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '872' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -145,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host-9.yml b/tests/test_playbooks/fixtures/host-9.yml index 134da2767..efb7423e7 100644 --- a/tests/test_playbooks/fixtures/host-9.yml +++ b/tests/test_playbooks/fixtures/host-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-0.yml b/tests/test_playbooks/fixtures/host_interface_attributes-0.yml index 995989c68..226141b50 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-0.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n\ - }\n" + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '187' status: code: 200 message: OK @@ -129,25 +124,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2021-02-23\ - \ 10:45:37 UTC\",\"updated_at\":\"2021-02-23 10:45:37 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":1,\"name\":\"Test subnet4\"\ - ,\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"\ - dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"\ - httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"\ - dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"\ - bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\"\ - :null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:54 UTC\",\"updated_at\":\"2024-10-08 14:40:54 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":15,\"name\":\"Test + subnet4\",\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '918' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '917' status: code: 200 message: OK @@ -198,17 +182,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -222,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -239,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -259,18 +240,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -284,13 +265,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -301,16 +280,14 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK - request: - body: '{"location_id": 4, "organization_id": 3, "host": {"name": "test-host.example.net", - "location_id": 4, "organization_id": 3, "build": false, "managed": false, "interfaces_attributes": - [{"type": "interface", "identifier": "fam01", "ip": "192.0.2.23", "mac": "EE:FF:00:00:00:01", - "subnet_id": 1}]}}' + body: '{"location_id": 27, "organization_id": 26, "host": {"name": "test-host.example.net", + "location_id": 27, "organization_id": 26, "build": false, "managed": false, + "interfaces_attributes": [{"type": "interface", "identifier": "fam01", "ip": + "192.0.2.23", "mac": "EE:FF:00:00:00:01", "subnet_id": 15}]}}' headers: Accept: - application/json;version=2 @@ -319,7 +296,7 @@ interactions: Connection: - keep-alive Content-Length: - - '294' + - '299' Content-Type: - application/json User-Agent: @@ -328,20 +305,23 @@ interactions: uri: https://foreman.example.org/api/hosts response: body: - string: '{"ip":"192.0.2.23","ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","managed":true,"identifier":"fam01","id":2,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":13,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","managed":true,"identifier":"fam01","id":3,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3031' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -351,17 +331,15 @@ interactions: Foreman_api_version: - '2' Foreman_current_location: - - 4; Test Location + - 27; Test Location Foreman_current_organization: - - 3; Test Organization + - 26; Test Organization Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-1.yml b/tests/test_playbooks/fixtures/host_interface_attributes-1.yml index 690893926..3ed697852 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-1.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,23 +121,26 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":"192.0.2.23","ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","managed":true,"identifier":"fam01","id":2,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":13,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","managed":true,"identifier":"fam01","id":3,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3031' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +154,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -173,8 +169,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2647' status: code: 200 message: OK @@ -193,25 +187,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2021-02-23\ - \ 10:45:37 UTC\",\"updated_at\":\"2021-02-23 10:45:37 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":1,\"name\":\"Test subnet4\"\ - ,\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"\ - dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"\ - httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"\ - dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"\ - bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\"\ - :null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:54 UTC\",\"updated_at\":\"2024-10-08 14:40:54 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":15,\"name\":\"Test + subnet4\",\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '918' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -225,13 +212,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -242,8 +227,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '917' status: code: 200 message: OK @@ -262,17 +245,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -286,13 +270,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,8 +285,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -323,18 +303,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -348,13 +328,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -365,8 +343,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -385,21 +361,17 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":1,\"subnet_name\"\ - :\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :2,\"domain_name\":\"example.net\",\"created_at\":\"2021-02-23 10:45:42 UTC\"\ - ,\"updated_at\":\"2021-02-23 10:45:42 UTC\",\"managed\":true,\"identifier\"\ - :\"fam01\",\"id\":2,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\"\ - ,\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\"\ - ,\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false}]\n\ - }\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":15,\"subnet_name\":\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":13,\"domain_name\":\"example.net\",\"created_at\":\"2024-10-08 + 14:40:58 UTC\",\"updated_at\":\"2024-10-08 14:40:58 UTC\",\"managed\":true,\"identifier\":\"fam01\",\"id\":3,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\",\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '601' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -413,13 +385,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -430,8 +400,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '599' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-2.yml b/tests/test_playbooks/fixtures/host_interface_attributes-2.yml index 3b3fb091c..ebed8877b 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-2.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,23 +121,26 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":"192.0.2.23","ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","managed":true,"identifier":"fam01","id":2,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":13,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","managed":true,"identifier":"fam01","id":3,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3031' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +154,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -173,8 +169,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2647' status: code: 200 message: OK @@ -193,25 +187,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2021-02-23\ - \ 10:45:37 UTC\",\"updated_at\":\"2021-02-23 10:45:37 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":1,\"name\":\"Test subnet4\"\ - ,\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"\ - dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"\ - httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"\ - dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"\ - bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\"\ - :null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:54 UTC\",\"updated_at\":\"2024-10-08 14:40:54 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":15,\"name\":\"Test + subnet4\",\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '918' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -225,13 +212,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -242,8 +227,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '917' status: code: 200 message: OK @@ -262,26 +245,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4+Secondary%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\"\ - :\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\"\ - :null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"\ - created_at\":\"2021-02-23 10:45:38 UTC\",\"updated_at\":\"2021-02-23 10:45:38\ - \ UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\"\ - :2,\"name\":\"Test subnet4 Secondary\",\"description\":null,\"network_address\"\ - :\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"\ - tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\"\ - :null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\"\ - :null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n\ - }\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:55 UTC\",\"updated_at\":\"2024-10-08 14:40:55 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":16,\"name\":\"Test + subnet4 Secondary\",\"description\":null,\"network_address\":\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '944' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -295,13 +270,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -312,8 +285,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -332,17 +303,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -356,13 +328,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -373,8 +343,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -393,18 +361,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -418,13 +386,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -435,8 +401,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -455,21 +419,17 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":1,\"subnet_name\"\ - :\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :2,\"domain_name\":\"example.net\",\"created_at\":\"2021-02-23 10:45:42 UTC\"\ - ,\"updated_at\":\"2021-02-23 10:45:42 UTC\",\"managed\":true,\"identifier\"\ - :\"fam01\",\"id\":2,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\"\ - ,\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\"\ - ,\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false}]\n\ - }\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":15,\"subnet_name\":\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":13,\"domain_name\":\"example.net\",\"created_at\":\"2024-10-08 + 14:40:58 UTC\",\"updated_at\":\"2024-10-08 14:40:58 UTC\",\"managed\":true,\"identifier\":\"fam01\",\"id\":3,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\",\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '601' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -483,13 +443,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -500,14 +458,12 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '599' status: code: 200 message: OK - request: body: '{"interface": {"mac": "ee:ff:00:00:00:02", "ip": "198.51.100.42", "type": - "interface", "subnet_id": 2, "identifier": "fam02"}}' + "interface", "subnet_id": 16, "identifier": "fam02"}}' headers: Accept: - application/json;version=2 @@ -516,7 +472,7 @@ interactions: Connection: - keep-alive Content-Length: - - '126' + - '127' Content-Type: - application/json User-Agent: @@ -525,13 +481,15 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:44 UTC","updated_at":"2021-02-23 10:45:44 UTC","managed":true,"identifier":"fam02","id":3,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}' + string: '{"subnet_id":16,"subnet_name":"Test subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:40:59 UTC","updated_at":"2024-10-08 14:40:59 UTC","managed":true,"identifier":"fam02","id":4,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '412' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -545,13 +503,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-3.yml b/tests/test_playbooks/fixtures/host_interface_attributes-3.yml index 92fbd4c96..b8d388e5d 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-3.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,25 +121,28 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":"192.0.2.23","ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","managed":true,"identifier":"fam01","id":2,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false},{"subnet_id":2,"subnet_name":"Test - subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:44 UTC","updated_at":"2021-02-23 10:45:44 UTC","managed":true,"identifier":"fam02","id":3,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":13,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","managed":true,"identifier":"fam01","id":3,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false},{"subnet_id":16,"subnet_name":"Test + subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:40:59 UTC","updated_at":"2024-10-08 14:40:59 UTC","managed":true,"identifier":"fam02","id":4,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3444' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -158,13 +156,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -175,8 +171,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '3059' status: code: 200 message: OK @@ -195,25 +189,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2021-02-23\ - \ 10:45:37 UTC\",\"updated_at\":\"2021-02-23 10:45:37 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":1,\"name\":\"Test subnet4\"\ - ,\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"\ - dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"\ - httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"\ - dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"\ - bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\"\ - :null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.0.2.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:54 UTC\",\"updated_at\":\"2024-10-08 14:40:54 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":15,\"name\":\"Test + subnet4\",\"description\":null,\"network_address\":\"192.0.2.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '918' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -227,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,8 +229,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '917' status: code: 200 message: OK @@ -264,26 +247,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4+Secondary%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\"\ - :\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\"\ - :null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"\ - created_at\":\"2021-02-23 10:45:38 UTC\",\"updated_at\":\"2021-02-23 10:45:38\ - \ UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\"\ - :2,\"name\":\"Test subnet4 Secondary\",\"description\":null,\"network_address\"\ - :\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"\ - tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\"\ - :null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\"\ - :null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n\ - }\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:55 UTC\",\"updated_at\":\"2024-10-08 14:40:55 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":16,\"name\":\"Test + subnet4 Secondary\",\"description\":null,\"network_address\":\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '944' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -297,13 +272,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -314,8 +287,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -334,17 +305,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -358,13 +330,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -375,8 +345,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -395,18 +363,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -420,13 +388,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -437,8 +403,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -457,27 +421,19 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 2,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":1,\"subnet_name\"\ - :\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :2,\"domain_name\":\"example.net\",\"created_at\":\"2021-02-23 10:45:42 UTC\"\ - ,\"updated_at\":\"2021-02-23 10:45:42 UTC\",\"managed\":true,\"identifier\"\ - :\"fam01\",\"id\":2,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\"\ - ,\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\"\ - ,\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false},{\"\ - subnet_id\":2,\"subnet_name\":\"Test subnet4 Secondary\",\"subnet6_id\":null,\"\ - subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\"\ - :\"2021-02-23 10:45:44 UTC\",\"updated_at\":\"2021-02-23 10:45:44 UTC\",\"\ - managed\":true,\"identifier\":\"fam02\",\"id\":3,\"name\":null,\"ip\":\"198.51.100.42\"\ - ,\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\",\"mtu\":1500,\"fqdn\":null,\"\ - primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false}]\n\ - }\n" + string: "{\n \"total\": 2,\n \"subtotal\": 2,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":15,\"subnet_name\":\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":13,\"domain_name\":\"example.net\",\"created_at\":\"2024-10-08 + 14:40:58 UTC\",\"updated_at\":\"2024-10-08 14:40:58 UTC\",\"managed\":true,\"identifier\":\"fam01\",\"id\":3,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\",\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false},{\"subnet_id\":16,\"subnet_name\":\"Test + subnet4 Secondary\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\":\"2024-10-08 + 14:40:59 UTC\",\"updated_at\":\"2024-10-08 14:40:59 UTC\",\"managed\":true,\"identifier\":\"fam02\",\"id\":4,\"name\":null,\"ip\":\"198.51.100.42\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\",\"mtu\":1500,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1014' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -491,13 +447,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -508,8 +462,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1011' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-4.yml b/tests/test_playbooks/fixtures/host_interface_attributes-4.yml index b6afceb48..248be1cc1 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-4.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,25 +121,28 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":"192.0.2.23","ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":1,"subnet_name":"Test - subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","managed":true,"identifier":"fam01","id":2,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false},{"subnet_id":2,"subnet_name":"Test - subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:44 UTC","updated_at":"2021-02-23 10:45:44 UTC","managed":true,"identifier":"fam02","id":3,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.23","ip6":null,"last_report":null,"mac":"ee:ff:00:00:00:01","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":13,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":15,"subnet_name":"Test + subnet4","subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","managed":true,"identifier":"fam01","id":3,"name":"test-host.example.net","ip":"192.0.2.23","ip6":null,"mac":"ee:ff:00:00:00:01","mtu":1500,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"interface","virtual":false},{"subnet_id":16,"subnet_name":"Test + subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:40:59 UTC","updated_at":"2024-10-08 14:40:59 UTC","managed":true,"identifier":"fam02","id":4,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3444' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -158,13 +156,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -175,8 +171,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '3059' status: code: 200 message: OK @@ -195,26 +189,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4+Secondary%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\"\ - :\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\"\ - :null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"\ - created_at\":\"2021-02-23 10:45:38 UTC\",\"updated_at\":\"2021-02-23 10:45:38\ - \ UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\"\ - :2,\"name\":\"Test subnet4 Secondary\",\"description\":null,\"network_address\"\ - :\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"\ - tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\"\ - :null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\"\ - :null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n\ - }\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:55 UTC\",\"updated_at\":\"2024-10-08 14:40:55 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":16,\"name\":\"Test + subnet4 Secondary\",\"description\":null,\"network_address\":\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '944' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -228,13 +214,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -245,8 +229,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -265,17 +247,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -289,13 +272,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -306,8 +287,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -326,18 +305,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -351,13 +330,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -368,8 +345,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -388,27 +363,19 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 2,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":1,\"subnet_name\"\ - :\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :2,\"domain_name\":\"example.net\",\"created_at\":\"2021-02-23 10:45:42 UTC\"\ - ,\"updated_at\":\"2021-02-23 10:45:42 UTC\",\"managed\":true,\"identifier\"\ - :\"fam01\",\"id\":2,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\"\ - ,\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\"\ - ,\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false},{\"\ - subnet_id\":2,\"subnet_name\":\"Test subnet4 Secondary\",\"subnet6_id\":null,\"\ - subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\"\ - :\"2021-02-23 10:45:44 UTC\",\"updated_at\":\"2021-02-23 10:45:44 UTC\",\"\ - managed\":true,\"identifier\":\"fam02\",\"id\":3,\"name\":null,\"ip\":\"198.51.100.42\"\ - ,\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\",\"mtu\":1500,\"fqdn\":null,\"\ - primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false}]\n\ - }\n" + string: "{\n \"total\": 2,\n \"subtotal\": 2,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":15,\"subnet_name\":\"Test subnet4\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":13,\"domain_name\":\"example.net\",\"created_at\":\"2024-10-08 + 14:40:58 UTC\",\"updated_at\":\"2024-10-08 14:40:58 UTC\",\"managed\":true,\"identifier\":\"fam01\",\"id\":3,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.23\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:01\",\"mtu\":1500,\"fqdn\":\"test-host.example.net\",\"primary\":true,\"provision\":true,\"type\":\"interface\",\"virtual\":false},{\"subnet_id\":16,\"subnet_name\":\"Test + subnet4 Secondary\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\":\"2024-10-08 + 14:40:59 UTC\",\"updated_at\":\"2024-10-08 14:40:59 UTC\",\"managed\":true,\"identifier\":\"fam02\",\"id\":4,\"name\":null,\"ip\":\"198.51.100.42\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\",\"mtu\":1500,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1014' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -422,13 +389,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -439,8 +404,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1011' status: code: 200 message: OK @@ -458,15 +421,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/2/interfaces/2 + uri: https://foreman.example.org/api/hosts/2/interfaces/3 response: body: - string: '{"id":2,"mac":"ee:ff:00:00:00:01","ip":"192.0.2.23","name":"test-host.example.net","host_id":2,"subnet_id":1,"domain_id":2,"attrs":{},"created_at":"2021-02-23T10:45:42.512Z","updated_at":"2021-02-23T10:45:42.512Z","provider":null,"username":null,"password":null,"virtual":false,"link":true,"identifier":"fam01","tag":"","attached_to":"","managed":true,"mode":"balance-rr","attached_devices":"","bond_options":"","primary":true,"provision":true,"compute_attributes":{},"ip6":null,"subnet6_id":null}' + string: '{"id":3,"mac":"ee:ff:00:00:00:01","ip":"192.0.2.23","name":"test-host.example.net","host_id":2,"subnet_id":15,"domain_id":13,"attrs":{},"created_at":"2024-10-08T14:40:58.267Z","updated_at":"2024-10-08T14:40:58.267Z","provider":null,"username":null,"password":null,"virtual":false,"link":true,"identifier":"fam01","tag":"","attached_to":"","managed":true,"mode":"balance-rr","attached_devices":"","bond_options":"","primary":true,"provision":true,"compute_attributes":{},"ip6":null,"subnet6_id":null}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '499' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -480,13 +445,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -497,8 +460,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '497' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-5.yml b/tests/test_playbooks/fixtures/host_interface_attributes-5.yml index a33d2c66b..979072db3 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-5.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,22 +121,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":null,"domain_name":null,"architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":2,"subnet_name":"Test - subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:44 UTC","updated_at":"2021-02-23 10:45:44 UTC","managed":true,"identifier":"fam02","id":3,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":null,"domain_name":null,"architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":16,"subnet_name":"Test + subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:40:59 UTC","updated_at":"2024-10-08 14:40:59 UTC","managed":true,"identifier":"fam02","id":4,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2963' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -155,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -172,8 +168,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2582' status: code: 200 message: OK @@ -192,26 +186,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+subnet4+Secondary%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\"\ - :\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\"\ - :null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"\ - created_at\":\"2021-02-23 10:45:38 UTC\",\"updated_at\":\"2021-02-23 10:45:38\ - \ UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\"\ - :2,\"name\":\"Test subnet4 Secondary\",\"description\":null,\"network_address\"\ - :\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"\ - tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\"\ - :null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\"\ - :null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n\ - }\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test subnet4 Secondary\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"198.51.100.0\",\"network_type\":\"IPv4\",\"cidr\":24,\"mask\":\"255.255.255.0\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:40:55 UTC\",\"updated_at\":\"2024-10-08 14:40:55 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":16,\"name\":\"Test + subnet4 Secondary\",\"description\":null,\"network_address\":\"198.51.100.0/24\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '944' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -225,13 +211,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -242,8 +226,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -262,17 +244,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -286,13 +269,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,8 +284,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -323,18 +302,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -348,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -365,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -385,20 +360,18 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\"\ - :\"Test subnet4 Secondary\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :null,\"domain_name\":null,\"created_at\":\"2021-02-23 10:45:44 UTC\",\"updated_at\"\ - :\"2021-02-23 10:45:44 UTC\",\"managed\":true,\"identifier\":\"fam02\",\"\ - id\":3,\"name\":null,\"ip\":\"198.51.100.42\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\"\ - ,\"mtu\":1500,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\"\ - :\"interface\",\"virtual\":false}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":16,\"subnet_name\":\"Test subnet4 + Secondary\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\":\"2024-10-08 + 14:40:59 UTC\",\"updated_at\":\"2024-10-08 14:40:59 UTC\",\"managed\":true,\"identifier\":\"fam02\",\"id\":4,\"name\":null,\"ip\":\"198.51.100.42\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\",\"mtu\":1500,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '571' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -412,13 +385,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -429,8 +400,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '570' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-6.yml b/tests/test_playbooks/fixtures/host_interface_attributes-6.yml index a0a84d539..af0e7ff04 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-6.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,22 +121,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":null,"ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":null,"domain_name":null,"architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":2,"subnet_name":"Test - subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:44 UTC","updated_at":"2021-02-23 10:45:44 UTC","managed":true,"identifier":"fam02","id":3,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":null,"ip6":null,"last_report":null,"mac":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":null,"domain_name":null,"architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":16,"subnet_name":"Test + subnet4 Secondary","subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:40:59 UTC","updated_at":"2024-10-08 14:40:59 UTC","managed":true,"identifier":"fam02","id":4,"name":null,"ip":"198.51.100.42","ip6":null,"mac":"ee:ff:00:00:00:02","mtu":1500,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2963' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -155,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -172,8 +168,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2582' status: code: 200 message: OK @@ -192,17 +186,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +211,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -233,8 +226,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -253,18 +244,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -278,13 +269,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -295,8 +284,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -315,20 +302,18 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\"\ - :\"Test subnet4 Secondary\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :null,\"domain_name\":null,\"created_at\":\"2021-02-23 10:45:44 UTC\",\"updated_at\"\ - :\"2021-02-23 10:45:44 UTC\",\"managed\":true,\"identifier\":\"fam02\",\"\ - id\":3,\"name\":null,\"ip\":\"198.51.100.42\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\"\ - ,\"mtu\":1500,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\"\ - :\"interface\",\"virtual\":false}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":16,\"subnet_name\":\"Test subnet4 + Secondary\",\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\":\"2024-10-08 + 14:40:59 UTC\",\"updated_at\":\"2024-10-08 14:40:59 UTC\",\"managed\":true,\"identifier\":\"fam02\",\"id\":4,\"name\":null,\"ip\":\"198.51.100.42\",\"ip6\":null,\"mac\":\"ee:ff:00:00:00:02\",\"mtu\":1500,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '571' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -342,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -359,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '570' status: code: 200 message: OK @@ -384,13 +365,15 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces response: body: - string: '{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:48 UTC","updated_at":"2021-02-23 10:45:48 UTC","managed":true,"identifier":"eth0","id":4,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}' + string: '{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:41:02 UTC","updated_at":"2024-10-08 14:41:02 UTC","managed":true,"identifier":"eth0","id":5,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '382' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -404,13 +387,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -444,13 +425,15 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces response: body: - string: '{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:48 UTC","updated_at":"2021-02-23 10:45:48 UTC","managed":true,"identifier":"eth1","id":5,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ee","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}' + string: '{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:41:02 UTC","updated_at":"2024-10-08 14:41:02 UTC","managed":true,"identifier":"eth1","id":6,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ee","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '382' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -464,13 +447,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -506,14 +487,16 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces response: body: - string: '{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:48 UTC","updated_at":"2021-02-23 10:45:48 UTC","managed":true,"identifier":"bond0","id":6,"name":"test-host.example.net","ip":"192.0.2.100","ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"bond","mode":"802.3ad","attached_devices":"eth0,eth1","bond_options":"miimon=100 + string: '{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:41:02 UTC","updated_at":"2024-10-08 14:41:02 UTC","managed":true,"identifier":"bond0","id":7,"name":"test-host.example.net","ip":"192.0.2.100","ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"bond","mode":"802.3ad","attached_devices":"eth0,eth1","bond_options":"miimon=100 lacp_rate=1","virtual":true}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '517' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -527,13 +510,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -561,15 +542,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hosts/2/interfaces/3 + uri: https://foreman.example.org/api/hosts/2/interfaces/4 response: body: - string: '{"id":3,"mac":"ee:ff:00:00:00:02","ip":"198.51.100.42","name":null,"host_id":2,"subnet_id":2,"domain_id":null,"attrs":{},"created_at":"2021-02-23T10:45:44.488Z","updated_at":"2021-02-23T10:45:44.488Z","provider":null,"username":null,"password":null,"virtual":false,"link":true,"identifier":"fam02","tag":"","attached_to":"","managed":true,"mode":"balance-rr","attached_devices":"","bond_options":"","primary":false,"provision":false,"compute_attributes":{},"ip6":null,"subnet6_id":null}' + string: '{"id":4,"mac":"ee:ff:00:00:00:02","ip":"198.51.100.42","name":null,"host_id":2,"subnet_id":16,"domain_id":null,"attrs":{},"created_at":"2024-10-08T14:40:59.560Z","updated_at":"2024-10-08T14:40:59.560Z","provider":null,"username":null,"password":null,"virtual":false,"link":true,"identifier":"fam02","tag":"","attached_to":"","managed":true,"mode":"balance-rr","attached_devices":"","bond_options":"","primary":false,"provision":false,"compute_attributes":{},"ip6":null,"subnet6_id":null}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '487' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -583,13 +566,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -600,8 +581,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '486' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-7.yml b/tests/test_playbooks/fixtures/host_interface_attributes-7.yml index a363f88dd..583c8509b 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-7.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=false&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -126,24 +121,27 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hosts/2 + uri: https://foreman.example.org/api/hosts/2?show_hidden_parameters=true response: body: - string: '{"ip":"192.0.2.100","ip6":null,"environment_id":null,"environment_name":null,"last_report":null,"mac":"aa:bb:cc:dd:ee:ff","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":2,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin - User","owner_type":"User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2021-02-23 - 10:45:42 UTC","updated_at":"2021-02-23 10:45:42 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","uptime_seconds":null,"organization_id":3,"organization_name":"Test - Organization","location_id":4,"location_name":"Test Location","puppet_status":0,"model_name":null,"name":"test-host.example.net","id":2,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","value":true},{"priority":0,"created_at":"2021-02-23 - 09:35:53 UTC","updated_at":"2021-02-23 09:35:53 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","value":false}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":2,"domain_name":"example.net","created_at":"2021-02-23 - 10:45:48 UTC","updated_at":"2021-02-23 10:45:48 UTC","managed":true,"identifier":"bond0","id":6,"name":"test-host.example.net","ip":"192.0.2.100","ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"bond","mode":"802.3ad","attached_devices":"eth0,eth1","bond_options":"miimon=100 - lacp_rate=1","virtual":true},{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:48 UTC","updated_at":"2021-02-23 10:45:48 UTC","managed":true,"identifier":"eth0","id":4,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false},{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2021-02-23 - 10:45:48 UTC","updated_at":"2021-02-23 10:45:48 UTC","managed":true,"identifier":"eth1","id":5,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ee","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' + string: '{"ip":"192.0.2.100","ip6":null,"last_report":null,"mac":"aa:bb:cc:dd:ee:ff","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":13,"domain_name":"example.net","architecture_id":null,"architecture_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"build":false,"comment":"","disk":null,"initiated_at":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_name":"Admin + User","owner_type":"User","creator_id":4,"creator":"Admin User","enabled":true,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"test-host.example.net","image_id":null,"image_name":null,"created_at":"2024-10-08 + 14:40:58 UTC","updated_at":"2024-10-08 14:40:58 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","bmc_available":false,"organization_id":26,"organization_name":"Test + Organization","location_id":27,"location_name":"Test Location","puppet_status":0,"model_name":null,"build_status":0,"build_status_label":"Installed","name":"test-host.example.net","id":2,"display_name":"test-host.example.net","puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"compute_resource_provider":null,"hostgroup_name":null,"hostgroup_title":null,"parameters":[],"all_parameters":[{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":2,"name":"host_registration_remote_execution","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":true},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":1,"name":"host_registration_insights","parameter_type":"boolean","associated_type":"global","hidden_value?":false,"value":false},{"priority":0,"created_at":"2024-10-04 + 11:20:15 UTC","updated_at":"2024-10-04 11:20:15 UTC","id":3,"name":"host_packages","parameter_type":"string","associated_type":"global","hidden_value?":false,"value":""}],"interfaces":[{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":13,"domain_name":"example.net","created_at":"2024-10-08 + 14:41:02 UTC","updated_at":"2024-10-08 14:41:02 UTC","managed":true,"identifier":"bond0","id":7,"name":"test-host.example.net","ip":"192.0.2.100","ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":"test-host.example.net","primary":true,"provision":true,"type":"bond","mode":"802.3ad","attached_devices":"eth0,eth1","bond_options":"miimon=100 + lacp_rate=1","virtual":true},{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:41:02 UTC","updated_at":"2024-10-08 14:41:02 UTC","managed":true,"identifier":"eth0","id":5,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ff","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false},{"subnet_id":null,"subnet_name":null,"subnet6_id":null,"subnet6_name":null,"domain_id":null,"domain_name":null,"created_at":"2024-10-08 + 14:41:02 UTC","updated_at":"2024-10-08 14:41:02 UTC","managed":true,"identifier":"eth1","id":6,"name":null,"ip":null,"ip6":null,"mac":"aa:bb:cc:dd:ee:ee","mtu":null,"fqdn":null,"primary":false,"provision":false,"type":"interface","virtual":false}],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"forget_status_hosts":true}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3865' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -157,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -174,8 +170,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '3483' status: code: 200 message: OK @@ -194,17 +188,18 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Test+Location%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:33 UTC\",\"updated_at\":\"2021-02-23 10:45:33 UTC\",\"id\":4,\"name\"\ - :\"Test Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Test Location\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:53 UTC\",\"updated_at\":\"2024-10-08 14:40:53 UTC\",\"id\":27,\"name\":\"Test + Location\",\"title\":\"Test Location\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '385' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -218,13 +213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -235,8 +228,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '384' status: code: 200 message: OK @@ -255,18 +246,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-02-23\ - \ 10:45:31 UTC\",\"updated_at\":\"2021-02-23 10:45:31 UTC\",\"id\":3,\"name\"\ - :\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"\ - A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:40:52 UTC\",\"updated_at\":\"2024-10-08 14:40:52 UTC\",\"id\":26,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '413' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -280,13 +271,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -297,8 +286,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '412' status: code: 200 message: OK @@ -317,33 +304,20 @@ interactions: uri: https://foreman.example.org/api/hosts/2/interfaces?per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 3,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \ - \ \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\"\ - :null,\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\"\ - :null,\"created_at\":\"2021-02-23 10:45:48 UTC\",\"updated_at\":\"2021-02-23\ - \ 10:45:48 UTC\",\"managed\":true,\"identifier\":\"eth0\",\"id\":4,\"name\"\ - :null,\"ip\":null,\"ip6\":null,\"mac\":\"aa:bb:cc:dd:ee:ff\",\"mtu\":null,\"\ - fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"\ - virtual\":false},{\"subnet_id\":null,\"subnet_name\":null,\"subnet6_id\":null,\"\ - subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\"\ - :\"2021-02-23 10:45:48 UTC\",\"updated_at\":\"2021-02-23 10:45:48 UTC\",\"\ - managed\":true,\"identifier\":\"eth1\",\"id\":5,\"name\":null,\"ip\":null,\"\ - ip6\":null,\"mac\":\"aa:bb:cc:dd:ee:ee\",\"mtu\":null,\"fqdn\":null,\"primary\"\ - :false,\"provision\":false,\"type\":\"interface\",\"virtual\":false},{\"subnet_id\"\ - :null,\"subnet_name\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\"\ - :2,\"domain_name\":\"example.net\",\"created_at\":\"2021-02-23 10:45:48 UTC\"\ - ,\"updated_at\":\"2021-02-23 10:45:48 UTC\",\"managed\":true,\"identifier\"\ - :\"bond0\",\"id\":6,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.100\"\ - ,\"ip6\":null,\"mac\":\"aa:bb:cc:dd:ee:ff\",\"mtu\":null,\"fqdn\":\"test-host.example.net\"\ - ,\"primary\":true,\"provision\":true,\"type\":\"bond\",\"mode\":\"802.3ad\"\ - ,\"attached_devices\":\"eth0,eth1\",\"bond_options\":\"miimon=100 lacp_rate=1\"\ - ,\"virtual\":true}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 3,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\":\"2024-10-08 + 14:41:02 UTC\",\"updated_at\":\"2024-10-08 14:41:02 UTC\",\"managed\":true,\"identifier\":\"eth0\",\"id\":5,\"name\":null,\"ip\":null,\"ip6\":null,\"mac\":\"aa:bb:cc:dd:ee:ff\",\"mtu\":null,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false},{\"subnet_id\":null,\"subnet_name\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":null,\"domain_name\":null,\"created_at\":\"2024-10-08 + 14:41:02 UTC\",\"updated_at\":\"2024-10-08 14:41:02 UTC\",\"managed\":true,\"identifier\":\"eth1\",\"id\":6,\"name\":null,\"ip\":null,\"ip6\":null,\"mac\":\"aa:bb:cc:dd:ee:ee\",\"mtu\":null,\"fqdn\":null,\"primary\":false,\"provision\":false,\"type\":\"interface\",\"virtual\":false},{\"subnet_id\":null,\"subnet_name\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"domain_id\":13,\"domain_name\":\"example.net\",\"created_at\":\"2024-10-08 + 14:41:02 UTC\",\"updated_at\":\"2024-10-08 14:41:02 UTC\",\"managed\":true,\"identifier\":\"bond0\",\"id\":7,\"name\":\"test-host.example.net\",\"ip\":\"192.0.2.100\",\"ip6\":null,\"mac\":\"aa:bb:cc:dd:ee:ff\",\"mtu\":null,\"fqdn\":\"test-host.example.net\",\"primary\":true,\"provision\":true,\"type\":\"bond\",\"mode\":\"802.3ad\",\"attached_devices\":\"eth0,eth1\",\"bond_options\":\"miimon=100 + lacp_rate=1\",\"virtual\":true}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1442' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -357,13 +331,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -374,8 +346,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1441' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-8.yml b/tests/test_playbooks/fixtures/host_interface_attributes-8.yml index 09ee6ca45..ea901c29a 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-8.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=true&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"\ - id\":2,\"name\":\"test-host.example.net\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":2,\"name\":\"test-host.example.net\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '226' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '226' status: code: 200 message: OK @@ -131,12 +126,14 @@ interactions: uri: https://foreman.example.org/api/hosts/2 response: body: - string: '{"id":2,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2021-02-23T10:45:42.506Z","created_at":"2021-02-23T10:45:42.506Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"environment_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":3,"location_id":4,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":"","global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null}' + string: '{"id":2,"name":"test-host.example.net","last_compile":null,"last_report":null,"updated_at":"2024-10-08T14:40:58.265Z","created_at":"2024-10-08T14:40:58.265Z","root_pass":null,"architecture_id":null,"operatingsystem_id":null,"ptable_id":null,"medium_id":null,"build":false,"comment":"","disk":null,"installed_at":null,"model_id":null,"hostgroup_id":null,"owner_id":4,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":null,"managed":false,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"puppet_proxy_id":null,"certname":"test-host.example.net","image_id":null,"organization_id":26,"location_id":27,"otp":null,"realm_id":null,"compute_profile_id":null,"provision_method":"build","grub_pass":null,"global_status":0,"lookup_value_matcher":"fqdn=test-host.example.net","pxe_loader":null,"initiated_at":null,"build_errors":null,"creator_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '867' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -150,13 +147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -167,8 +162,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '872' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/host_interface_attributes-9.yml b/tests/test_playbooks/fixtures/host_interface_attributes-9.yml index 50b367efd..efb7423e7 100644 --- a/tests/test_playbooks/fixtures/host_interface_attributes-9.yml +++ b/tests/test_playbooks/fixtures/host_interface_attributes-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -70,15 +68,16 @@ interactions: uri: https://foreman.example.org/api/hosts?thin=true&search=name%3D%22test-host.example.net%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"\ - sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n\ - }\n" + string: "{\n \"total\": 1,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"test-host.example.net\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -92,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -109,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '187' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/hostgroup-0.yml b/tests/test_playbooks/fixtures/hostgroup-0.yml index 6a23d731a..415cdbce7 100644 --- a/tests/test_playbooks/fixtures/hostgroup-0.yml +++ b/tests/test_playbooks/fixtures/hostgroup-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,14 +126,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -147,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,14 +184,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -205,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -242,13 +242,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -262,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -299,13 +299,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -319,13 +321,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -356,13 +356,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -376,13 +378,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -413,13 +413,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"libvirt-cr\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"url\":\"qemu:///system\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":1,\"name\":\"libvirt-cr\",\"provider\":\"Libvirt\",\"provider_friendly_name\":\"Libvirt\",\"display_type\":\"vnc\",\"set_console_password\":true}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"url\":\"qemu:///system\",\"created_at\":\"2024-10-04 + 11:26:26 UTC\",\"updated_at\":\"2024-10-04 11:26:26 UTC\",\"id\":1,\"name\":\"libvirt-cr\",\"provider\":\"Libvirt\",\"provider_friendly_name\":\"Libvirt\",\"display_type\":\"vnc\",\"set_console_password\":true}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '429' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -433,13 +435,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -470,13 +470,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -490,13 +492,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -527,13 +527,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -547,13 +549,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -584,14 +584,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -605,13 +607,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -642,13 +642,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -662,13 +664,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -700,13 +700,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -720,13 +722,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -755,16 +755,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -778,13 +780,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -813,16 +813,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -836,13 +838,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -873,13 +873,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -893,13 +895,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -930,13 +930,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -950,13 +952,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -987,13 +987,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1007,13 +1009,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1039,20 +1039,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1066,13 +1068,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1098,20 +1098,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1125,13 +1127,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1147,14 +1147,16 @@ interactions: message: OK - request: body: '{"hostgroup": {"name": "New host group", "description": "New host group", - "compute_profile_id": 4, "compute_resource_id": 1, "operatingsystem_id": 2, - "architecture_id": 1, "pxe_loader": "Grub2 UEFI", "medium_id": 17, "ptable_id": - 144, "subnet_id": 2, "domain_id": 3, "group_parameters_attributes": [{"name": + "compute_profile_id": 6, "compute_resource_id": 1, "operatingsystem_id": 4, + "architecture_id": 1, "pxe_loader": "Grub2 UEFI", "medium_id": 18, "ptable_id": + 159, "subnet_id": 3, "domain_id": 6, "group_parameters_attributes": [{"name": "subnet_param1", "value": "value1", "parameter_type": "string"}, {"name": "subnet_param2", - "value": "value2", "parameter_type": "string"}], "puppet_proxy_id": 1, "puppet_ca_proxy_id": - 1, "location_ids": [9, 10, 11], "organization_ids": [12, 13], "environment_id": - 1, "config_group_ids": [3, 4], "puppet_attributes": {"environment_id": 1, "config_group_ids": - [3, 4]}}}' + "value": "value2", "parameter_type": "string"}, {"name": "hidden_secret", "value": + "super_secret", "hidden_value": true, "parameter_type": "string"}, {"name": + "excplicit_text", "value": "not_secret", "hidden_value": false, "parameter_type": + "string"}], "puppet_proxy_id": 1, "puppet_ca_proxy_id": 1, "location_ids": [13, + 14, 15], "organization_ids": [16, 17], "environment_id": 1, "config_group_ids": + [5, 6], "puppet_attributes": {"environment_id": 1, "config_group_ids": [5, 6]}}}' headers: Accept: - application/json;version=2 @@ -1163,7 +1165,7 @@ interactions: Connection: - keep-alive Content-Length: - - '675' + - '880' Content-Type: - application/json User-Agent: @@ -1172,24 +1174,32 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":5,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null},{"id":11,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":33,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":32,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"*****"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":31,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null},{"id":15,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3614' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1203,13 +1213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=80 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-1.yml b/tests/test_playbooks/fixtures/hostgroup-1.yml index de3b4abfe..bfaf71131 100644 --- a/tests/test_playbooks/fixtures/hostgroup-1.yml +++ b/tests/test_playbooks/fixtures/hostgroup-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '201' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,14 +127,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -148,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -185,14 +185,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -206,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -243,13 +243,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -263,13 +265,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -300,13 +300,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -320,13 +322,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -357,13 +357,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -377,13 +379,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -414,13 +414,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"libvirt-cr\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"url\":\"qemu:///system\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":1,\"name\":\"libvirt-cr\",\"provider\":\"Libvirt\",\"provider_friendly_name\":\"Libvirt\",\"display_type\":\"vnc\",\"set_console_password\":true}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"url\":\"qemu:///system\",\"created_at\":\"2024-10-04 + 11:26:26 UTC\",\"updated_at\":\"2024-10-04 11:26:26 UTC\",\"id\":1,\"name\":\"libvirt-cr\",\"provider\":\"Libvirt\",\"provider_friendly_name\":\"Libvirt\",\"display_type\":\"vnc\",\"set_console_password\":true}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '429' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -434,13 +436,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -471,13 +471,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -491,13 +493,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -528,13 +528,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -548,13 +550,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -585,14 +585,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -606,13 +608,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -643,13 +643,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -663,13 +665,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -701,13 +701,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -721,13 +723,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -756,16 +756,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -779,13 +781,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -814,16 +814,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -837,13 +839,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -874,13 +874,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -894,13 +896,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -931,13 +931,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -951,13 +953,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -988,13 +988,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1008,13 +1010,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1040,20 +1040,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1067,13 +1069,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1099,20 +1099,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1126,13 +1128,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1148,14 +1148,16 @@ interactions: message: OK - request: body: '{"hostgroup": {"name": "New host group with puppet classes", "description": - "New host group", "compute_profile_id": 4, "compute_resource_id": 1, "operatingsystem_id": - 2, "architecture_id": 1, "pxe_loader": "Grub2 UEFI", "medium_id": 17, "ptable_id": - 144, "subnet_id": 2, "domain_id": 3, "group_parameters_attributes": [{"name": + "New host group", "compute_profile_id": 6, "compute_resource_id": 1, "operatingsystem_id": + 4, "architecture_id": 1, "pxe_loader": "Grub2 UEFI", "medium_id": 18, "ptable_id": + 159, "subnet_id": 3, "domain_id": 6, "group_parameters_attributes": [{"name": "subnet_param1", "value": "value1", "parameter_type": "string"}, {"name": "subnet_param2", - "value": "value2", "parameter_type": "string"}], "puppet_proxy_id": 1, "puppet_ca_proxy_id": - 1, "location_ids": [9, 10, 11], "organization_ids": [12, 13], "environment_id": - 1, "config_group_ids": [3, 4], "puppet_attributes": {"environment_id": 1, "config_group_ids": - [3, 4]}}}' + "value": "value2", "parameter_type": "string"}, {"name": "hidden_secret", "value": + "super_secret", "hidden_value": true, "parameter_type": "string"}, {"name": + "excplicit_text", "value": "not_secret", "hidden_value": false, "parameter_type": + "string"}], "puppet_proxy_id": 1, "puppet_ca_proxy_id": 1, "location_ids": [13, + 14, 15], "organization_ids": [16, 17], "environment_id": 1, "config_group_ids": + [5, 6], "puppet_attributes": {"environment_id": 1, "config_group_ids": [5, 6]}}}' headers: Accept: - application/json;version=2 @@ -1164,7 +1166,7 @@ interactions: Connection: - keep-alive Content-Length: - - '695' + - '900' Content-Type: - application/json User-Agent: @@ -1173,25 +1175,33 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":5,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":20,"name":"New host group with puppet classes","title":"New host group with puppet classes","description":"New - host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":6,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":7,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null},{"id":11,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":37,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":36,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"*****"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":34,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":35,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null},{"id":15,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3654' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1205,13 +1215,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=80 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1243,12 +1251,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1262,13 +1272,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=79 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1283,7 +1291,7 @@ interactions: code: 200 message: OK - request: - body: '{"puppetclass_id": 47}' + body: '{"puppetclass_id": 41}' headers: Accept: - application/json;version=2 @@ -1298,15 +1306,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/foreman_puppet/api/hostgroups/5/puppetclass_ids + uri: https://foreman.example.org/foreman_puppet/api/hostgroups/20/puppetclass_ids response: body: - string: '{"hostgroup_id":5,"puppetclass_id":47}' + string: '{"hostgroup_id":20,"puppetclass_id":41}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '39' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1320,13 +1330,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=78 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-10.yml b/tests/test_playbooks/fixtures/hostgroup-10.yml index a90c6ad23..81105e872 100644 --- a/tests/test_playbooks/fixtures/hostgroup-10.yml +++ b/tests/test_playbooks/fixtures/hostgroup-10.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '237' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,18 +128,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:28 UTC\",\"updated_at\":\"2022-11-28 08:31:28 UTC\",\"id\":6,\"name\":\"Nested + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:16 UTC\",\"updated_at\":\"2024-10-08 11:08:16 UTC\",\"id\":21,\"name\":\"Nested New host group\",\"title\":\"New host group/Nested New host group\",\"description\":\"Nested - group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -190,14 +190,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -211,13 +213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -248,14 +248,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -269,13 +271,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -306,13 +306,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -326,13 +328,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -363,13 +363,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -383,13 +385,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -420,13 +420,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -440,13 +442,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -477,13 +477,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -497,13 +499,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -534,14 +534,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -555,13 +557,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -592,13 +592,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -612,13 +614,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -650,13 +650,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -670,13 +672,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -705,16 +705,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -728,13 +730,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -763,16 +763,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -786,13 +788,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -818,20 +818,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -845,13 +847,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -877,20 +877,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -904,13 +906,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -926,10 +926,10 @@ interactions: message: OK - request: body: '{"hostgroup": {"name": "New host group with nested parent", "description": - "Nested group", "parent_id": 6, "operatingsystem_id": 2, "architecture_id": - 1, "pxe_loader": "Grub2 UEFI", "medium_id": 17, "ptable_id": 144, "subnet_id": - 2, "domain_id": 3, "puppet_proxy_id": 1, "puppet_ca_proxy_id": 1, "location_ids": - [9, 10, 11], "organization_ids": [12, 13]}}' + "Nested group", "parent_id": 21, "operatingsystem_id": 4, "architecture_id": + 1, "pxe_loader": "Grub2 UEFI", "medium_id": 18, "ptable_id": 159, "subnet_id": + 3, "domain_id": 6, "puppet_proxy_id": 1, "puppet_ca_proxy_id": 1, "location_ids": + [13, 14, 15], "organization_ids": [16, 17]}}' headers: Accept: - application/json;version=2 @@ -938,7 +938,7 @@ interactions: Connection: - keep-alive Content-Length: - - '355' + - '357' Content-Type: - application/json User-Agent: @@ -947,20 +947,22 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4/6","parent_id":6,"parent_name":"New - host group/Nested New host group","ptable_id":144,"ptable_name":"Part table","medium_id":17,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:29 UTC","updated_at":"2022-11-28 08:31:29 UTC","id":7,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19/21","parent_id":21,"parent_name":"New + host group/Nested New host group","ptable_id":159,"ptable_name":"Part table","medium_id":18,"medium_name":"TestOS + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:18 UTC","updated_at":"2024-10-08 11:08:18 UTC","id":22,"name":"New host group with nested parent","title":"New host group/Nested New host group/New - host group with nested parent","description":"Nested group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null},{"id":11,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group with nested parent","description":"Nested group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null},{"id":15,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2118' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -974,13 +976,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-11.yml b/tests/test_playbooks/fixtures/hostgroup-11.yml index 470a2fda2..f0135ebcb 100644 --- a/tests/test_playbooks/fixtures/hostgroup-11.yml +++ b/tests/test_playbooks/fixtures/hostgroup-11.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,19 +71,21 @@ interactions: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group/New host group with nested parent\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": - null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4/6\",\"parent_id\":6,\"parent_name\":\"New - host group/Nested New host group\",\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:29 UTC\",\"updated_at\":\"2022-11-28 08:31:29 UTC\",\"id\":7,\"name\":\"New + null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19/21\",\"parent_id\":21,\"parent_name\":\"New + host group/Nested New host group\",\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:18 UTC\",\"updated_at\":\"2024-10-08 11:08:18 UTC\",\"id\":22,\"name\":\"New host group with nested parent\",\"title\":\"New host group/Nested New host - group/New host group with nested parent\",\"description\":\"Nested group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group/New host group with nested parent\",\"description\":\"Nested group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1938' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -97,13 +99,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -129,23 +129,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/7 + uri: https://foreman.example.org/api/hostgroups/22?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4/6","parent_id":6,"parent_name":"New - host group/Nested New host group","ptable_id":144,"ptable_name":"Part table","medium_id":17,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:29 UTC","updated_at":"2022-11-28 08:31:29 UTC","id":7,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19/21","parent_id":21,"parent_name":"New + host group/Nested New host group","ptable_id":159,"ptable_name":"Part table","medium_id":18,"medium_name":"TestOS + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:18 UTC","updated_at":"2024-10-08 11:08:18 UTC","id":22,"name":"New host group with nested parent","title":"New host group/Nested New host group/New - host group with nested parent","description":"Nested group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group with nested parent","description":"Nested group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2118' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -159,13 +161,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -197,18 +197,20 @@ interactions: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:28 UTC\",\"updated_at\":\"2022-11-28 08:31:28 UTC\",\"id\":6,\"name\":\"Nested + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:16 UTC\",\"updated_at\":\"2024-10-08 11:08:16 UTC\",\"id\":21,\"name\":\"Nested New host group\",\"title\":\"New host group/Nested New host group\",\"description\":\"Nested - group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -222,13 +224,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -259,14 +259,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -280,13 +282,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -317,14 +317,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -338,13 +340,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -375,13 +375,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -395,13 +397,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -432,13 +432,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -452,13 +454,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -489,13 +489,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -509,13 +511,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -546,13 +546,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -566,13 +568,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -603,14 +603,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -624,13 +626,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -661,13 +661,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -681,13 +683,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -719,13 +719,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -739,13 +741,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -774,16 +774,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -797,13 +799,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -832,16 +832,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -855,13 +857,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -887,20 +887,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -914,13 +916,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -946,20 +946,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -973,13 +975,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-12.yml b/tests/test_playbooks/fixtures/hostgroup-12.yml index 190d32f62..0237bb358 100644 --- a/tests/test_playbooks/fixtures/hostgroup-12.yml +++ b/tests/test_playbooks/fixtures/hostgroup-12.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '205' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,17 +127,19 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -188,14 +188,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -209,13 +211,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -246,14 +246,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -267,13 +269,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -304,13 +304,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -324,13 +326,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,13 +361,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -381,13 +383,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -418,13 +418,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -438,13 +440,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -475,13 +475,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -495,13 +497,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -533,13 +533,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -553,13 +555,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -588,16 +588,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -611,13 +613,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -646,16 +646,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -669,13 +671,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -690,9 +690,9 @@ interactions: code: 200 message: OK - request: - body: '{"hostgroup": {"name": "Nested New host group 2", "parent_id": 4, "operatingsystem_id": - 2, "architecture_id": 1, "pxe_loader": "PXELinux BIOS", "medium_id": 17, "ptable_id": - 144, "location_ids": [9, 10, 11], "organization_ids": [12, 13]}}' + body: '{"hostgroup": {"name": "Nested New host group 2", "parent_id": 19, "operatingsystem_id": + 4, "architecture_id": 1, "pxe_loader": "PXELinux BIOS", "medium_id": 18, "ptable_id": + 159, "location_ids": [13, 14, 15], "organization_ids": [16, 17]}}' headers: Accept: - application/json;version=2 @@ -701,7 +701,7 @@ interactions: Connection: - keep-alive Content-Length: - - '238' + - '240' Content-Type: - application/json User-Agent: @@ -710,19 +710,21 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New - host group","ptable_id":144,"ptable_name":"Part table","medium_id":17,"medium_name":"TestOS - Mirror","pxe_loader":"PXELinux BIOS","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:31 UTC","updated_at":"2022-11-28 08:31:31 UTC","id":8,"name":"Nested - New host group 2","title":"New host group/Nested New host group 2","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":3,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":2,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null},{"id":11,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New + host group","ptable_id":159,"ptable_name":"Part table","medium_id":18,"medium_name":"TestOS + Mirror","pxe_loader":"PXELinux BIOS","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:19 UTC","updated_at":"2024-10-08 11:08:19 UTC","id":23,"name":"Nested + New host group 2","title":"New host group/Nested New host group 2","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":6,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":3,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null},{"id":15,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2044' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -736,13 +738,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-13.yml b/tests/test_playbooks/fixtures/hostgroup-13.yml index 476dca889..308b0ee74 100644 --- a/tests/test_playbooks/fixtures/hostgroup-13.yml +++ b/tests/test_playbooks/fixtures/hostgroup-13.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,17 +71,19 @@ interactions: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group 2\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"PXELinux BIOS\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:31 UTC\",\"updated_at\":\"2022-11-28 08:31:31 UTC\",\"id\":8,\"name\":\"Nested - New host group 2\",\"title\":\"New host group/Nested New host group 2\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":3,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":2,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"PXELinux BIOS\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:19 UTC\",\"updated_at\":\"2024-10-08 11:08:19 UTC\",\"id\":23,\"name\":\"Nested + New host group 2\",\"title\":\"New host group/Nested New host group 2\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":6,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":3,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1832' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +97,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,22 +127,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/8 + uri: https://foreman.example.org/api/hostgroups/23?show_hidden_parameters=true response: body: - string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New - host group","ptable_id":144,"ptable_name":"Part table","medium_id":17,"medium_name":"TestOS - Mirror","pxe_loader":"PXELinux BIOS","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:31 UTC","updated_at":"2022-11-28 08:31:31 UTC","id":8,"name":"Nested - New host group 2","title":"New host group/Nested New host group 2","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":3,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":2,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New + host group","ptable_id":159,"ptable_name":"Part table","medium_id":18,"medium_name":"TestOS + Mirror","pxe_loader":"PXELinux BIOS","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:19 UTC","updated_at":"2024-10-08 11:08:19 UTC","id":23,"name":"Nested + New host group 2","title":"New host group/Nested New host group 2","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":6,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":3,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2044' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +158,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -193,17 +193,19 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -217,13 +219,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -254,14 +254,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -275,13 +277,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -312,14 +312,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -333,13 +335,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -370,13 +370,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -390,13 +392,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -427,13 +427,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -447,13 +449,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -484,13 +484,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -504,13 +506,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -541,13 +541,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -561,13 +563,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -599,13 +599,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -619,13 +621,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -654,16 +654,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -677,13 +679,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -712,16 +712,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -735,13 +737,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-14.yml b/tests/test_playbooks/fixtures/hostgroup-14.yml index 657cb2336..3293c6de7 100644 --- a/tests/test_playbooks/fixtures/hostgroup-14.yml +++ b/tests/test_playbooks/fixtures/hostgroup-14.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,17 +70,19 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +96,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,27 +126,35 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":5,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":33,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":32,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"super_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":31,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3621' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -160,13 +168,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -198,27 +204,31 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19 response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:33 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":8,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:21 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":38,"name":"subnet_param3","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -232,13 +242,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-15.yml b/tests/test_playbooks/fixtures/hostgroup-15.yml index 1ef9d7c0d..29fe93d0d 100644 --- a/tests/test_playbooks/fixtures/hostgroup-15.yml +++ b/tests/test_playbooks/fixtures/hostgroup-15.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,17 +70,19 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +96,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,27 +126,31 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:33 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":8,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:21 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":38,"name":"subnet_param3","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -160,13 +164,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-16.yml b/tests/test_playbooks/fixtures/hostgroup-16.yml index c8058fda9..cbbd86f18 100644 --- a/tests/test_playbooks/fixtures/hostgroup-16.yml +++ b/tests/test_playbooks/fixtures/hostgroup-16.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '187' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,14 +128,16 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:34 UTC","updated_at":"2022-11-28 08:31:34 UTC","id":9,"name":"Super + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:22 UTC","updated_at":"2024-10-08 11:08:22 UTC","id":24,"name":"Super New host group","title":"Super New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1288' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-17.yml b/tests/test_playbooks/fixtures/hostgroup-17.yml index bc5f9a4e6..3c090abf9 100644 --- a/tests/test_playbooks/fixtures/hostgroup-17.yml +++ b/tests/test_playbooks/fixtures/hostgroup-17.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,14 +70,16 @@ interactions: body: string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Super New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:34 UTC\",\"updated_at\":\"2022-11-28 08:31:34 UTC\",\"id\":9,\"name\":\"Super + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:22 UTC\",\"updated_at\":\"2024-10-08 11:08:22 UTC\",\"id\":24,\"name\":\"Super New host group\",\"title\":\"Super New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1398' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -123,17 +123,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/9 + uri: https://foreman.example.org/api/hostgroups/24?show_hidden_parameters=true response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:34 UTC","updated_at":"2022-11-28 08:31:34 UTC","id":9,"name":"Super + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:22 UTC","updated_at":"2024-10-08 11:08:22 UTC","id":24,"name":"Super New host group","title":"Super New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1288' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -147,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -183,17 +183,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hostgroups/9 + uri: https://foreman.example.org/api/hostgroups/24 response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:34 UTC","updated_at":"2022-11-28 08:31:35 UTC","id":9,"name":"Super + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:22 UTC","updated_at":"2024-10-08 11:08:23 UTC","id":24,"name":"Super New host group 2","title":"Super New host group 2","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1292' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -207,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-18.yml b/tests/test_playbooks/fixtures/hostgroup-18.yml index 3e36732ff..5b7532cd2 100644 --- a/tests/test_playbooks/fixtures/hostgroup-18.yml +++ b/tests/test_playbooks/fixtures/hostgroup-18.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,14 +70,16 @@ interactions: body: string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Super New host group 2\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:34 UTC\",\"updated_at\":\"2022-11-28 08:31:35 UTC\",\"id\":9,\"name\":\"Super + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:22 UTC\",\"updated_at\":\"2024-10-08 11:08:23 UTC\",\"id\":24,\"name\":\"Super New host group 2\",\"title\":\"Super New host group 2\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1404' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,10 +125,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/9 + uri: https://foreman.example.org/api/hostgroups/24 response: body: - string: '{"id":9,"name":"Super New host group 2","created_at":"2022-11-28T08:31:34.607Z","updated_at":"2022-11-28T08:31:35.255Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"Super + string: '{"id":24,"name":"Super New host group 2","created_at":"2024-10-08T11:08:22.934Z","updated_at":"2024-10-08T11:08:23.605Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"Super New host group 2","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=Super New host group 2","subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null}' headers: @@ -136,6 +136,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '604' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -149,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-19.yml b/tests/test_playbooks/fixtures/hostgroup-19.yml index b7658dae0..51271c24f 100644 --- a/tests/test_playbooks/fixtures/hostgroup-19.yml +++ b/tests/test_playbooks/fixtures/hostgroup-19.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '205' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,17 +127,19 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -172,7 +172,7 @@ interactions: code: 200 message: OK - request: - body: '{"hostgroup": {"name": "Nested New host group 1", "parent_id": 4}}' + body: '{"hostgroup": {"name": "Nested New host group 1", "parent_id": 19}}' headers: Accept: - application/json;version=2 @@ -181,7 +181,7 @@ interactions: Connection: - keep-alive Content-Length: - - '66' + - '67' Content-Type: - application/json User-Agent: @@ -191,17 +191,19 @@ interactions: response: body: string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":null,"operatingsystem_name":"TestOS - 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New + 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New host group","ptable_id":null,"ptable_name":"Part table","medium_id":null,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:36 UTC","updated_at":"2022-11-28 08:31:36 UTC","id":10,"name":"Nested - New host group 1","title":"New host group/Nested New host group 1","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":3,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":2,"inherited_architecture_id":1,"inherited_medium_id":17,"inherited_ptable_id":144,"inherited_subnet_id":2,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:25 UTC","updated_at":"2024-10-08 11:08:25 UTC","id":25,"name":"Nested + New host group 1","title":"New host group/Nested New host group 1","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":6,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":4,"inherited_architecture_id":1,"inherited_medium_id":18,"inherited_ptable_id":159,"inherited_subnet_id":3,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 UEFI","parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1709' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -215,13 +217,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-2.yml b/tests/test_playbooks/fixtures/hostgroup-2.yml index 6a3b0d68e..1e40efd6e 100644 --- a/tests/test_playbooks/fixtures/hostgroup-2.yml +++ b/tests/test_playbooks/fixtures/hostgroup-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group with puppet classes\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:21 UTC\",\"updated_at\":\"2022-11-28 08:31:21 UTC\",\"id\":5,\"name\":\"New + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:08 UTC\",\"updated_at\":\"2024-10-08 11:08:08 UTC\",\"id\":20,\"name\":\"New host group with puppet classes\",\"title\":\"New host group with puppet classes\",\"description\":\"New - host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1917' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,28 +128,36 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/5 + uri: https://foreman.example.org/api/hostgroups/20?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":5,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":20,"name":"New host group with puppet classes","title":"New host group with puppet classes","description":"New - host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":6,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":7,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":37,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":36,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"super_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":34,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":35,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3949' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -163,13 +171,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -200,14 +206,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -221,13 +229,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -258,14 +264,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +287,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -316,13 +322,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -336,13 +344,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -373,13 +379,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -393,13 +401,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -430,13 +436,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +458,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -487,13 +493,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -507,13 +515,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -544,13 +550,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -564,13 +572,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -601,14 +607,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -622,13 +630,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -659,13 +665,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -679,13 +687,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -717,13 +723,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -737,13 +745,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -772,16 +778,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -795,13 +803,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -830,16 +836,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -853,13 +861,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -890,13 +896,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -910,13 +918,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -947,13 +953,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -967,13 +975,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1004,13 +1010,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1024,13 +1032,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1056,20 +1062,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1083,13 +1091,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1115,20 +1121,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1142,13 +1150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1180,12 +1186,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1199,13 +1207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=80 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-20.yml b/tests/test_playbooks/fixtures/hostgroup-20.yml index 08d0820da..4efa509f2 100644 --- a/tests/test_playbooks/fixtures/hostgroup-20.yml +++ b/tests/test_playbooks/fixtures/hostgroup-20.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -72,17 +72,19 @@ interactions: 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group 1\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":null,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New + 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New host group\",\"ptable_id\":null,\"ptable_name\":\"Part table\",\"medium_id\":null,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":null,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:36 UTC\",\"updated_at\":\"2022-11-28 08:31:36 UTC\",\"id\":10,\"name\":\"Nested - New host group 1\",\"title\":\"New host group/Nested New host group 1\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":3,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":2,\"inherited_architecture_id\":1,\"inherited_medium_id\":17,\"inherited_ptable_id\":144,\"inherited_subnet_id\":2,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":\"Grub2 + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":null,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:25 UTC\",\"updated_at\":\"2024-10-08 11:08:25 UTC\",\"id\":25,\"name\":\"Nested + New host group 1\",\"title\":\"New host group/Nested New host group 1\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":6,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":4,\"inherited_architecture_id\":1,\"inherited_medium_id\":18,\"inherited_ptable_id\":159,\"inherited_subnet_id\":3,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":\"Grub2 UEFI\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1837' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,21 +128,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/25?show_hidden_parameters=true response: body: string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":null,"operatingsystem_name":"TestOS - 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New + 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New host group","ptable_id":null,"ptable_name":"Part table","medium_id":null,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:36 UTC","updated_at":"2022-11-28 08:31:36 UTC","id":10,"name":"Nested - New host group 1","title":"New host group/Nested New host group 1","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":3,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":2,"inherited_architecture_id":1,"inherited_medium_id":17,"inherited_ptable_id":144,"inherited_subnet_id":2,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:25 UTC","updated_at":"2024-10-08 11:08:25 UTC","id":25,"name":"Nested + New host group 1","title":"New host group/Nested New host group 1","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":6,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":4,"inherited_architecture_id":1,"inherited_medium_id":18,"inherited_ptable_id":159,"inherited_subnet_id":3,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 UEFI","parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1709' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +158,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -193,17 +193,19 @@ interactions: body: string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -217,13 +219,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -253,21 +253,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/25 response: body: string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":null,"operatingsystem_name":"TestOS - 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New + 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New host group","ptable_id":null,"ptable_name":"Part table","medium_id":null,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:36 UTC","updated_at":"2022-11-28 08:31:37 UTC","id":10,"name":"Nested - New host group 10","title":"New host group/Nested New host group 10","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":3,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":2,"inherited_architecture_id":1,"inherited_medium_id":17,"inherited_ptable_id":144,"inherited_subnet_id":2,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:25 UTC","updated_at":"2024-10-08 11:08:25 UTC","id":25,"name":"Nested + New host group 10","title":"New host group/Nested New host group 10","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":6,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":4,"inherited_architecture_id":1,"inherited_medium_id":18,"inherited_ptable_id":159,"inherited_subnet_id":3,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 UEFI","parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1711' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -281,13 +283,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-21.yml b/tests/test_playbooks/fixtures/hostgroup-21.yml index ffaf93897..ab235dcd1 100644 --- a/tests/test_playbooks/fixtures/hostgroup-21.yml +++ b/tests/test_playbooks/fixtures/hostgroup-21.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -72,17 +72,19 @@ interactions: 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group 10\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":null,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New + 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New host group\",\"ptable_id\":null,\"ptable_name\":\"Part table\",\"medium_id\":null,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":null,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:36 UTC\",\"updated_at\":\"2022-11-28 08:31:37 UTC\",\"id\":10,\"name\":\"Nested - New host group 10\",\"title\":\"New host group/Nested New host group 10\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":3,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":2,\"inherited_architecture_id\":1,\"inherited_medium_id\":17,\"inherited_ptable_id\":144,\"inherited_subnet_id\":2,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":\"Grub2 + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":null,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:25 UTC\",\"updated_at\":\"2024-10-08 11:08:25 UTC\",\"id\":25,\"name\":\"Nested + New host group 10\",\"title\":\"New host group/Nested New host group 10\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":6,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":4,\"inherited_architecture_id\":1,\"inherited_medium_id\":18,\"inherited_ptable_id\":159,\"inherited_subnet_id\":3,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":\"Grub2 UEFI\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1840' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,21 +128,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/25?show_hidden_parameters=true response: body: string: '{"subnet_id":null,"subnet_name":"Test subnet4","operatingsystem_id":null,"operatingsystem_name":"TestOS - 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New + 7.6","domain_id":null,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New host group","ptable_id":null,"ptable_name":"Part table","medium_id":null,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:36 UTC","updated_at":"2022-11-28 08:31:37 UTC","id":10,"name":"Nested - New host group 10","title":"New host group/Nested New host group 10","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":3,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":2,"inherited_architecture_id":1,"inherited_medium_id":17,"inherited_ptable_id":144,"inherited_subnet_id":2,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":null,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:25 UTC","updated_at":"2024-10-08 11:08:25 UTC","id":25,"name":"Nested + New host group 10","title":"New host group/Nested New host group 10","description":null,"puppet_proxy_id":null,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":null,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":6,"inherited_puppet_proxy_id":1,"inherited_puppet_ca_proxy_id":1,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":4,"inherited_architecture_id":1,"inherited_medium_id":18,"inherited_ptable_id":159,"inherited_subnet_id":3,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":"Grub2 UEFI","parameters":[],"template_combinations":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1711' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +158,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -193,17 +193,19 @@ interactions: body: string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -217,13 +219,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-22.yml b/tests/test_playbooks/fixtures/hostgroup-22.yml index 1b2130a83..b9cbc95f3 100644 --- a/tests/test_playbooks/fixtures/hostgroup-22.yml +++ b/tests/test_playbooks/fixtures/hostgroup-22.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -72,17 +72,19 @@ interactions: 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group 10\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":null,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New + 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New host group\",\"ptable_id\":null,\"ptable_name\":\"Part table\",\"medium_id\":null,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":null,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:36 UTC\",\"updated_at\":\"2022-11-28 08:31:37 UTC\",\"id\":10,\"name\":\"Nested - New host group 10\",\"title\":\"New host group/Nested New host group 10\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":3,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":2,\"inherited_architecture_id\":1,\"inherited_medium_id\":17,\"inherited_ptable_id\":144,\"inherited_subnet_id\":2,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":\"Grub2 + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":null,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:25 UTC\",\"updated_at\":\"2024-10-08 11:08:25 UTC\",\"id\":25,\"name\":\"Nested + New host group 10\",\"title\":\"New host group/Nested New host group 10\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":6,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":4,\"inherited_architecture_id\":1,\"inherited_medium_id\":18,\"inherited_ptable_id\":159,\"inherited_subnet_id\":3,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":\"Grub2 UEFI\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1840' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -133,17 +133,19 @@ interactions: body: string: "{\n \"total\": 5,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -157,13 +159,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -191,10 +191,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/25 response: body: - string: '{"id":10,"name":"Nested New host group 10","created_at":"2022-11-28T08:31:36.550Z","updated_at":"2022-11-28T08:31:37.305Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":"4","vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New + string: '{"id":25,"name":"Nested New host group 10","created_at":"2024-10-08T11:08:25.000Z","updated_at":"2024-10-08T11:08:25.784Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":"19","vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New host group/Nested New host group 10","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New host group/Nested New host group 10","subnet6_id":null,"pxe_loader":"Grub2 UEFI","description":null,"compute_resource_id":null}' @@ -203,6 +203,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '648' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +218,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-23.yml b/tests/test_playbooks/fixtures/hostgroup-23.yml index 3c120ddef..189efa94e 100644 --- a/tests/test_playbooks/fixtures/hostgroup-23.yml +++ b/tests/test_playbooks/fixtures/hostgroup-23.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,17 +71,19 @@ interactions: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group 2\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"PXELinux BIOS\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:31 UTC\",\"updated_at\":\"2022-11-28 08:31:31 UTC\",\"id\":8,\"name\":\"Nested - New host group 2\",\"title\":\"New host group/Nested New host group 2\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":3,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":2,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + [{\"subnet_id\":null,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":null,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"PXELinux BIOS\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:19 UTC\",\"updated_at\":\"2024-10-08 11:08:19 UTC\",\"id\":23,\"name\":\"Nested + New host group 2\",\"title\":\"New host group/Nested New host group 2\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":6,\"inherited_puppet_proxy_id\":1,\"inherited_puppet_ca_proxy_id\":1,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":3,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1832' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -95,13 +97,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -132,17 +132,19 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -156,13 +158,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -190,10 +190,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/8 + uri: https://foreman.example.org/api/hostgroups/23 response: body: - string: '{"id":8,"name":"Nested New host group 2","created_at":"2022-11-28T08:31:31.599Z","updated_at":"2022-11-28T08:31:31.599Z","operatingsystem_id":2,"architecture_id":1,"medium_id":17,"ptable_id":144,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":"4","vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New + string: '{"id":23,"name":"Nested New host group 2","created_at":"2024-10-08T11:08:19.951Z","updated_at":"2024-10-08T11:08:19.951Z","operatingsystem_id":4,"architecture_id":1,"medium_id":18,"ptable_id":159,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":"19","vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New host group/Nested New host group 2","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New host group/Nested New host group 2","subnet6_id":null,"pxe_loader":"PXELinux BIOS","description":null,"compute_resource_id":null}' @@ -202,6 +202,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '639' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -215,13 +217,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-24.yml b/tests/test_playbooks/fixtures/hostgroup-24.yml index 133ec0189..78ef7777d 100644 --- a/tests/test_playbooks/fixtures/hostgroup-24.yml +++ b/tests/test_playbooks/fixtures/hostgroup-24.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '205' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,17 +127,19 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-25.yml b/tests/test_playbooks/fixtures/hostgroup-25.yml index 8165f77dd..12ca9f3a7 100644 --- a/tests/test_playbooks/fixtures/hostgroup-25.yml +++ b/tests/test_playbooks/fixtures/hostgroup-25.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,19 +71,21 @@ interactions: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group/New host group with nested parent\\\"\",\n \"sort\": {\n \"by\": null,\n \"order\": - null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4/6\",\"parent_id\":6,\"parent_name\":\"New - host group/Nested New host group\",\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:29 UTC\",\"updated_at\":\"2022-11-28 08:31:29 UTC\",\"id\":7,\"name\":\"New + null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19/21\",\"parent_id\":21,\"parent_name\":\"New + host group/Nested New host group\",\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:18 UTC\",\"updated_at\":\"2024-10-08 11:08:18 UTC\",\"id\":22,\"name\":\"New host group with nested parent\",\"title\":\"New host group/Nested New host - group/New host group with nested parent\",\"description\":\"Nested group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group/New host group with nested parent\",\"description\":\"Nested group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1938' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -97,13 +99,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -135,18 +135,20 @@ interactions: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:28 UTC\",\"updated_at\":\"2022-11-28 08:31:28 UTC\",\"id\":6,\"name\":\"Nested + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:16 UTC\",\"updated_at\":\"2024-10-08 11:08:16 UTC\",\"id\":21,\"name\":\"Nested New host group\",\"title\":\"New host group/Nested New host group\",\"description\":\"Nested - group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -160,13 +162,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -194,10 +194,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/7 + uri: https://foreman.example.org/api/hostgroups/22 response: body: - string: '{"id":7,"name":"New host group with nested parent","created_at":"2022-11-28T08:31:29.848Z","updated_at":"2022-11-28T08:31:29.848Z","operatingsystem_id":2,"architecture_id":1,"medium_id":17,"ptable_id":144,"root_pass":null,"puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":"4/6","vm_defaults":null,"subnet_id":2,"domain_id":3,"puppet_proxy_id":1,"title":"New + string: '{"id":22,"name":"New host group with nested parent","created_at":"2024-10-08T11:08:18.080Z","updated_at":"2024-10-08T11:08:18.080Z","operatingsystem_id":4,"architecture_id":1,"medium_id":18,"ptable_id":159,"root_pass":null,"puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":"19/21","vm_defaults":null,"subnet_id":3,"domain_id":6,"puppet_proxy_id":1,"title":"New host group/Nested New host group/New host group with nested parent","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New host group/Nested New host group/New host group with nested parent","subnet6_id":null,"pxe_loader":"Grub2 UEFI","description":"Nested group","compute_resource_id":null}' @@ -206,6 +206,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '711' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -219,13 +221,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-26.yml b/tests/test_playbooks/fixtures/hostgroup-26.yml index db0fa8988..9ccf6e616 100644 --- a/tests/test_playbooks/fixtures/hostgroup-26.yml +++ b/tests/test_playbooks/fixtures/hostgroup-26.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '237' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,18 +128,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:28 UTC\",\"updated_at\":\"2022-11-28 08:31:28 UTC\",\"id\":6,\"name\":\"Nested + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:16 UTC\",\"updated_at\":\"2024-10-08 11:08:16 UTC\",\"id\":21,\"name\":\"Nested New host group\",\"title\":\"New host group/Nested New host group\",\"description\":\"Nested - group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-27.yml b/tests/test_playbooks/fixtures/hostgroup-27.yml index ff23bfe50..354ba77f7 100644 --- a/tests/test_playbooks/fixtures/hostgroup-27.yml +++ b/tests/test_playbooks/fixtures/hostgroup-27.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:28 UTC\",\"updated_at\":\"2022-11-28 08:31:28 UTC\",\"id\":6,\"name\":\"Nested + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:16 UTC\",\"updated_at\":\"2024-10-08 11:08:16 UTC\",\"id\":21,\"name\":\"Nested New host group\",\"title\":\"New host group/Nested New host group\",\"description\":\"Nested - group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -133,17 +133,19 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -157,13 +159,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -191,10 +191,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/6 + uri: https://foreman.example.org/api/hostgroups/21 response: body: - string: '{"id":6,"name":"Nested New host group","created_at":"2022-11-28T08:31:28.015Z","updated_at":"2022-11-28T08:31:28.015Z","operatingsystem_id":2,"architecture_id":1,"medium_id":17,"ptable_id":144,"root_pass":null,"puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":"4","vm_defaults":null,"subnet_id":2,"domain_id":3,"puppet_proxy_id":1,"title":"New + string: '{"id":21,"name":"Nested New host group","created_at":"2024-10-08T11:08:16.052Z","updated_at":"2024-10-08T11:08:16.052Z","operatingsystem_id":4,"architecture_id":1,"medium_id":18,"ptable_id":159,"root_pass":null,"puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":"19","vm_defaults":null,"subnet_id":3,"domain_id":6,"puppet_proxy_id":1,"title":"New host group/Nested New host group","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New host group/Nested New host group","subnet6_id":null,"pxe_loader":"Grub2 UEFI","description":"Nested group","compute_resource_id":null}' @@ -203,6 +203,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '628' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -216,13 +218,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-28.yml b/tests/test_playbooks/fixtures/hostgroup-28.yml index 3e9775362..66a6aca14 100644 --- a/tests/test_playbooks/fixtures/hostgroup-28.yml +++ b/tests/test_playbooks/fixtures/hostgroup-28.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '203' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,17 +127,19 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-29.yml b/tests/test_playbooks/fixtures/hostgroup-29.yml index 14fdb482d..65377cc96 100644 --- a/tests/test_playbooks/fixtures/hostgroup-29.yml +++ b/tests/test_playbooks/fixtures/hostgroup-29.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,17 +70,19 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +96,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,27 +126,31 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:33 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":8,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:21 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":38,"name":"subnet_param3","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -160,13 +164,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -196,27 +198,31 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19 response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:43 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:33 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":8,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:31 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:21 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":38,"name":"subnet_param3","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -230,13 +236,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-3.yml b/tests/test_playbooks/fixtures/hostgroup-3.yml index c68360b20..868696653 100644 --- a/tests/test_playbooks/fixtures/hostgroup-3.yml +++ b/tests/test_playbooks/fixtures/hostgroup-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group with puppet classes\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:21 UTC\",\"updated_at\":\"2022-11-28 08:31:21 UTC\",\"id\":5,\"name\":\"New + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:08 UTC\",\"updated_at\":\"2024-10-08 11:08:08 UTC\",\"id\":20,\"name\":\"New host group with puppet classes\",\"title\":\"New host group with puppet classes\",\"description\":\"New - host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1917' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,28 +128,36 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/5 + uri: https://foreman.example.org/api/hostgroups/20?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":5,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":20,"name":"New host group with puppet classes","title":"New host group with puppet classes","description":"New - host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":6,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":7,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":37,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":36,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"super_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":34,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":35,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"}],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3949' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -163,13 +171,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -200,14 +206,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -221,13 +229,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -258,14 +264,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +287,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -316,13 +322,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -336,13 +344,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -373,13 +379,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -393,13 +401,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -430,13 +436,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +458,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -487,13 +493,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -507,13 +515,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -544,13 +550,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -564,13 +572,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -601,14 +607,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -622,13 +630,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -659,13 +665,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -679,13 +687,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -717,13 +723,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -737,13 +745,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -772,16 +778,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -795,13 +803,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -830,16 +836,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -853,13 +861,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -890,13 +896,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -910,13 +918,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -947,13 +953,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -967,13 +975,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1004,13 +1010,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1024,13 +1032,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1056,20 +1062,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1083,13 +1091,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1115,20 +1121,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1142,13 +1150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1180,12 +1186,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::redis_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":47,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2022-11-25T11:50:49.956Z\",\"updated_at\":\"2022-11-25T11:50:49.956Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":41,\"name\":\"prometheus::redis_exporter\",\"created_at\":\"2024-10-04T11:24:07.584Z\",\"updated_at\":\"2024-10-04T11:24:07.584Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '333' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1199,13 +1207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=80 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1237,12 +1243,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::statsd_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":55,\"name\":\"prometheus::statsd_exporter\",\"created_at\":\"2022-11-25T11:50:52.428Z\",\"updated_at\":\"2022-11-25T11:50:52.428Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":49,\"name\":\"prometheus::statsd_exporter\",\"created_at\":\"2024-10-04T11:24:10.160Z\",\"updated_at\":\"2024-10-04T11:24:10.160Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '335' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1256,13 +1264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=79 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1277,7 +1283,7 @@ interactions: code: 200 message: OK - request: - body: '{"puppetclass_id": 55}' + body: '{"puppetclass_id": 49}' headers: Accept: - application/json;version=2 @@ -1292,15 +1298,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/foreman_puppet/api/hostgroups/5/puppetclass_ids + uri: https://foreman.example.org/foreman_puppet/api/hostgroups/20/puppetclass_ids response: body: - string: '{"hostgroup_id":5,"puppetclass_id":55}' + string: '{"hostgroup_id":20,"puppetclass_id":49}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '39' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1314,13 +1322,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=78 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-30.yml b/tests/test_playbooks/fixtures/hostgroup-30.yml index f802b266b..64fd372c1 100644 --- a/tests/test_playbooks/fixtures/hostgroup-30.yml +++ b/tests/test_playbooks/fixtures/hostgroup-30.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,17 +70,19 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:43 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:31 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +96,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,27 +126,31 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:43 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:33 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":8,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:31 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:21 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":38,"name":"subnet_param3","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -160,13 +164,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -196,27 +198,31 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19 response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:44 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:33 UTC","updated_at":"2022-11-28 08:31:33 UTC","id":8,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:32 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:21 UTC","updated_at":"2024-10-08 11:08:21 UTC","id":38,"name":"subnet_param3","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value3"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3173' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -230,13 +236,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-31.yml b/tests/test_playbooks/fixtures/hostgroup-31.yml index 1b3d83edd..b8c405add 100644 --- a/tests/test_playbooks/fixtures/hostgroup-31.yml +++ b/tests/test_playbooks/fixtures/hostgroup-31.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,17 +70,19 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:44 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:32 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +96,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,18 +128,20 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19 response: body: - string: '{"id":4,"name":"New host group","created_at":"2022-11-28T08:31:20.460Z","updated_at":"2022-11-28T08:31:44.087Z","operatingsystem_id":2,"architecture_id":1,"medium_id":17,"ptable_id":144,"root_pass":"$5$56Flct8hZo0fqZpU$WnW05vec0Vu3wZmz1J3sF/YYx/AVx5qCfcYAU7vHQI7","puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":2,"domain_id":3,"puppet_proxy_id":1,"title":"New - host group","realm_id":null,"compute_profile_id":4,"grub_pass":"$5$AJME7O5vPDVbJBuS$3zA6TGOU4yt4dxVtzwDnaW8tt8M6UBWGgWUJVDuazK4","lookup_value_matcher":"hostgroup=New + string: '{"id":19,"name":"New host group","created_at":"2024-10-08T11:08:07.799Z","updated_at":"2024-10-08T11:08:32.491Z","operatingsystem_id":4,"architecture_id":1,"medium_id":18,"ptable_id":159,"root_pass":"$5$vXtF7vx8sUaDOY4f$vRqS68G6V6SIi9Wr.lVK.j5w32W.nnl.QfQlZRLeRwC","puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":3,"domain_id":6,"puppet_proxy_id":1,"title":"New + host group","realm_id":null,"compute_profile_id":6,"grub_pass":"$6$fmMofqWgANMv8taQ$XpF2JFVxBWdjwA7/1DkBL8J/iKfPpQgk7U0lR7mJklnnP4QcVn71EjJHFeLYFTLncQ0Vb.Isjq8/nVJMXB4E71","lookup_value_matcher":"hostgroup=New host group","subnet6_id":null,"pxe_loader":"Grub2 UEFI","description":"New - host group","compute_resource_id":1,"puppet_attributes":{"id":1,"hostgroup_id":4,"environment_id":1,"puppet_proxy_id":null,"created_at":"2022-11-28T08:31:20.481Z","updated_at":"2022-11-28T08:31:20.481Z"}}' + host group","compute_resource_id":1,"puppet_attributes":{"id":9,"hostgroup_id":19,"environment_id":1,"puppet_proxy_id":null,"created_at":"2024-10-08T11:08:07.826Z","updated_at":"2024-10-08T11:08:07.826Z"}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '907' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-32.yml b/tests/test_playbooks/fixtures/hostgroup-32.yml index bf0bae791..b758ecb58 100644 --- a/tests/test_playbooks/fixtures/hostgroup-32.yml +++ b/tests/test_playbooks/fixtures/hostgroup-32.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -76,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -89,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-33.yml b/tests/test_playbooks/fixtures/hostgroup-33.yml index b04baa657..3894206bc 100644 --- a/tests/test_playbooks/fixtures/hostgroup-33.yml +++ b/tests/test_playbooks/fixtures/hostgroup-33.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '196' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -133,6 +133,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -146,13 +148,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-4.yml b/tests/test_playbooks/fixtures/hostgroup-4.yml index 74c06b84f..ab4e37b56 100644 --- a/tests/test_playbooks/fixtures/hostgroup-4.yml +++ b/tests/test_playbooks/fixtures/hostgroup-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group with puppet classes\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:21 UTC\",\"updated_at\":\"2022-11-28 08:31:21 UTC\",\"id\":5,\"name\":\"New + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:08 UTC\",\"updated_at\":\"2024-10-08 11:08:08 UTC\",\"id\":20,\"name\":\"New host group with puppet classes\",\"title\":\"New host group with puppet classes\",\"description\":\"New - host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1917' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,28 +128,36 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/5 + uri: https://foreman.example.org/api/hostgroups/20?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":5,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":20,"name":"New host group with puppet classes","title":"New host group with puppet classes","description":"New - host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":6,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":7,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":47,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":37,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":36,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"super_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":34,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":35,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":41,"name":"prometheus::redis_exporter","module_name":"prometheus"},{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '4245' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -163,13 +171,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -200,14 +206,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -221,13 +229,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -258,14 +264,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +287,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -316,13 +322,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -336,13 +344,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -373,13 +379,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -393,13 +401,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -430,13 +436,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +458,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -487,13 +493,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -507,13 +515,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -544,13 +550,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -564,13 +572,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -601,14 +607,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -622,13 +630,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -659,13 +665,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -679,13 +687,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -717,13 +723,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -737,13 +745,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -772,16 +778,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -795,13 +803,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -830,16 +836,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -853,13 +861,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -890,13 +896,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -910,13 +918,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -947,13 +953,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -967,13 +975,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1004,13 +1010,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1024,13 +1032,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1056,20 +1062,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1083,13 +1091,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1115,20 +1121,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1142,13 +1150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1180,12 +1186,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::statsd_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":55,\"name\":\"prometheus::statsd_exporter\",\"created_at\":\"2022-11-25T11:50:52.428Z\",\"updated_at\":\"2022-11-25T11:50:52.428Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":49,\"name\":\"prometheus::statsd_exporter\",\"created_at\":\"2024-10-04T11:24:10.160Z\",\"updated_at\":\"2024-10-04T11:24:10.160Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '335' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1199,13 +1207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=80 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1233,7 +1239,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/foreman_puppet/api/hostgroups/5/puppetclass_ids/47 + uri: https://foreman.example.org/foreman_puppet/api/hostgroups/20/puppetclass_ids/41 response: body: string: '[]' @@ -1242,6 +1248,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1255,13 +1263,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=79 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-5.yml b/tests/test_playbooks/fixtures/hostgroup-5.yml index 46a806af3..bb7b8bccf 100644 --- a/tests/test_playbooks/fixtures/hostgroup-5.yml +++ b/tests/test_playbooks/fixtures/hostgroup-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group with puppet classes\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:21 UTC\",\"updated_at\":\"2022-11-28 08:31:21 UTC\",\"id\":5,\"name\":\"New + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:08 UTC\",\"updated_at\":\"2024-10-08 11:08:08 UTC\",\"id\":20,\"name\":\"New host group with puppet classes\",\"title\":\"New host group with puppet classes\",\"description\":\"New - host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1917' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,28 +128,36 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/5 + uri: https://foreman.example.org/api/hostgroups/20?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":5,"name":"New host + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":20,"name":"New host group with puppet classes","title":"New host group with puppet classes","description":"New - host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":6,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:21 UTC","updated_at":"2022-11-28 08:31:21 UTC","id":7,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":55,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":37,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":36,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"super_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":34,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:08 UTC","updated_at":"2024-10-08 11:08:08 UTC","id":35,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}]},"puppetclasses":[{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[{"id":49,"name":"prometheus::statsd_exporter","module_name":"prometheus"}],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3953' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -163,13 +171,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -200,14 +206,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -221,13 +229,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -258,14 +264,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -279,13 +287,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -316,13 +322,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -336,13 +344,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -373,13 +379,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -393,13 +401,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -430,13 +436,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +458,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -487,13 +493,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -507,13 +515,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -544,13 +550,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -564,13 +572,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -601,14 +607,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -622,13 +630,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -659,13 +665,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -679,13 +687,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -717,13 +723,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -737,13 +745,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -772,16 +778,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -795,13 +803,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -830,16 +836,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -853,13 +861,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -890,13 +896,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -910,13 +918,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -947,13 +953,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -967,13 +975,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1004,13 +1010,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1024,13 +1032,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1056,20 +1062,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1083,13 +1091,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1115,20 +1121,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1142,13 +1150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1180,12 +1186,14 @@ interactions: string: "{\n \"total\": 71,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"prometheus::statsd_exporter\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - {\"prometheus\":[{\"id\":55,\"name\":\"prometheus::statsd_exporter\",\"created_at\":\"2022-11-25T11:50:52.428Z\",\"updated_at\":\"2022-11-25T11:50:52.428Z\"}]}\n}\n" + {\"prometheus\":[{\"id\":49,\"name\":\"prometheus::statsd_exporter\",\"created_at\":\"2024-10-04T11:24:10.160Z\",\"updated_at\":\"2024-10-04T11:24:10.160Z\"}]}\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '335' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1199,13 +1207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=80 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-6.yml b/tests/test_playbooks/fixtures/hostgroup-6.yml index 8810b1518..30f7c4fb9 100644 --- a/tests/test_playbooks/fixtures/hostgroup-6.yml +++ b/tests/test_playbooks/fixtures/hostgroup-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group with puppet classes\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:21 UTC\",\"updated_at\":\"2022-11-28 08:31:21 UTC\",\"id\":5,\"name\":\"New + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:08 UTC\",\"updated_at\":\"2024-10-08 11:08:08 UTC\",\"id\":20,\"name\":\"New host group with puppet classes\",\"title\":\"New host group with puppet classes\",\"description\":\"New - host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1917' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -130,18 +130,20 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/5 + uri: https://foreman.example.org/api/hostgroups/20 response: body: - string: '{"id":5,"name":"New host group with puppet classes","created_at":"2022-11-28T08:31:21.506Z","updated_at":"2022-11-28T08:31:21.506Z","operatingsystem_id":2,"architecture_id":1,"medium_id":17,"ptable_id":144,"root_pass":null,"puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":2,"domain_id":3,"puppet_proxy_id":1,"title":"New - host group with puppet classes","realm_id":null,"compute_profile_id":4,"grub_pass":null,"lookup_value_matcher":"hostgroup=New + string: '{"id":20,"name":"New host group with puppet classes","created_at":"2024-10-08T11:08:08.787Z","updated_at":"2024-10-08T11:08:08.787Z","operatingsystem_id":4,"architecture_id":1,"medium_id":18,"ptable_id":159,"root_pass":null,"puppet_ca_proxy_id":1,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":3,"domain_id":6,"puppet_proxy_id":1,"title":"New + host group with puppet classes","realm_id":null,"compute_profile_id":6,"grub_pass":null,"lookup_value_matcher":"hostgroup=New host group with puppet classes","subnet6_id":null,"pxe_loader":"Grub2 UEFI","description":"New - host group","compute_resource_id":1,"puppet_attributes":{"id":2,"hostgroup_id":5,"environment_id":1,"puppet_proxy_id":null,"created_at":"2022-11-28T08:31:21.522Z","updated_at":"2022-11-28T08:31:21.522Z"}}' + host group","compute_resource_id":1,"puppet_attributes":{"id":10,"hostgroup_id":20,"environment_id":1,"puppet_proxy_id":null,"created_at":"2024-10-08T11:08:08.807Z","updated_at":"2024-10-08T11:08:08.807Z"}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '803' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -155,13 +157,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-7.yml b/tests/test_playbooks/fixtures/hostgroup-7.yml index bcd3fa347..48abf8a07 100644 --- a/tests/test_playbooks/fixtures/hostgroup-7.yml +++ b/tests/test_playbooks/fixtures/hostgroup-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -70,17 +70,19 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +96,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -126,27 +126,35 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/4 + uri: https://foreman.example.org/api/hostgroups/19?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":4,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":144,"ptable_name":"Part - table","medium_id":17,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"New host - group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":4,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":60,"created_at":"2022-11-28 - 08:31:20 UTC","updated_at":"2022-11-28 08:31:20 UTC","id":5,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":3,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2022-11-25 - 12:00:02 UTC","updated_at":"2022-11-25 12:00:02 UTC","id":4,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":6,"compute_profile_name":"myprofile","ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":159,"ptable_name":"Part + table","medium_id":18,"medium_name":"TestOS Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":1,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":19,"name":"New host + group","title":"New host group","description":"New host group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":33,"name":"excplicit_text","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"not_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":32,"name":"hidden_secret","parameter_type":"string","associated_type":"host + group","hidden_value?":true,"value":"super_secret"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":30,"name":"subnet_param1","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value1"},{"priority":60,"created_at":"2024-10-08 + 11:08:07 UTC","updated_at":"2024-10-08 11:08:07 UTC","id":31,"name":"subnet_param2","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"value2"}],"environment_id":1,"environment_name":"production","inherited_environment_id":null,"template_combinations":[],"puppet":{"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[]},"puppetclasses":[],"config_groups":[{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":5,"name":"cfg_group1","puppetclasses":[]},{"created_at":"2024-10-08 + 10:52:28 UTC","updated_at":"2024-10-08 10:52:28 UTC","id":6,"name":"cfg_group2","puppetclasses":[]}],"all_puppetclasses":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3621' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -160,13 +168,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -197,14 +203,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -218,13 +226,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -255,14 +261,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +284,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -313,13 +319,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -333,13 +341,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -370,13 +376,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -390,13 +398,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -427,13 +433,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -447,13 +455,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -484,13 +490,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"myprofile\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:01 UTC\",\"updated_at\":\"2022-11-25 12:00:01 UTC\",\"id\":4,\"name\":\"myprofile\"}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:27 UTC\",\"updated_at\":\"2024-10-08 10:52:27 UTC\",\"id\":6,\"name\":\"myprofile\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '280' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -504,13 +512,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -541,13 +547,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -561,13 +569,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -598,14 +604,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -619,13 +627,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -656,13 +662,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -676,13 +684,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -714,13 +720,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -734,13 +742,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -769,16 +775,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -792,13 +800,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -827,16 +833,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -850,13 +858,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -887,13 +893,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"production\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:46 UTC\",\"updated_at\":\"2024-10-04 11:20:46 UTC\",\"name\":\"production\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '282' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -907,13 +915,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -944,13 +950,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":3,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":5,\"name\":\"cfg_group1\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -964,13 +972,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1001,13 +1007,15 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"cfg_group2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 12:00:02 UTC\",\"updated_at\":\"2022-11-25 12:00:02 UTC\",\"id\":4,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-08 + 10:52:28 UTC\",\"updated_at\":\"2024-10-08 10:52:28 UTC\",\"id\":6,\"name\":\"cfg_group2\",\"puppetclasses\":[]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '301' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1021,13 +1029,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=83 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1053,20 +1059,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1080,13 +1088,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=82 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -1112,20 +1118,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -1139,13 +1147,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=81 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-8.yml b/tests/test_playbooks/fixtures/hostgroup-8.yml index 947012e23..c6eeb3699 100644 --- a/tests/test_playbooks/fixtures/hostgroup-8.yml +++ b/tests/test_playbooks/fixtures/hostgroup-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -77,6 +77,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '203' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -90,13 +92,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -127,17 +127,19 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -188,14 +188,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -209,13 +211,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -246,14 +246,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -267,13 +269,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -304,13 +304,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -324,13 +326,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -361,13 +361,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -381,13 +383,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -418,13 +418,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -438,13 +440,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -475,13 +475,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -495,13 +497,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -532,14 +532,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -553,13 +555,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -590,13 +590,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -610,13 +612,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -648,13 +648,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -668,13 +670,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -703,16 +703,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -726,13 +728,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -761,16 +761,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -784,13 +786,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -816,20 +816,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -843,13 +845,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -875,20 +875,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -902,13 +904,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -924,10 +924,10 @@ interactions: message: OK - request: body: '{"hostgroup": {"name": "Nested New host group", "description": "Nested - group", "parent_id": 4, "operatingsystem_id": 2, "architecture_id": 1, "pxe_loader": - "Grub2 UEFI", "medium_id": 17, "ptable_id": 144, "subnet_id": 2, "domain_id": - 3, "puppet_proxy_id": 1, "puppet_ca_proxy_id": 1, "location_ids": [9, 10, 11], - "organization_ids": [12, 13]}}' + group", "parent_id": 19, "operatingsystem_id": 4, "architecture_id": 1, "pxe_loader": + "Grub2 UEFI", "medium_id": 18, "ptable_id": 159, "subnet_id": 3, "domain_id": + 6, "puppet_proxy_id": 1, "puppet_ca_proxy_id": 1, "location_ids": [13, 14, 15], + "organization_ids": [16, 17]}}' headers: Accept: - application/json;version=2 @@ -936,7 +936,7 @@ interactions: Connection: - keep-alive Content-Length: - - '343' + - '345' Content-Type: - application/json User-Agent: @@ -945,20 +945,22 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New - host group","ptable_id":144,"ptable_name":"Part table","medium_id":17,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:28 UTC","updated_at":"2022-11-28 08:31:28 UTC","id":6,"name":"Nested + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New + host group","ptable_id":159,"ptable_name":"Part table","medium_id":18,"medium_name":"TestOS + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:16 UTC","updated_at":"2024-10-08 11:08:16 UTC","id":21,"name":"Nested New host group","title":"New host group/Nested New host group","description":"Nested - group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null},{"id":11,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null},{"id":15,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2047' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -972,13 +974,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/hostgroup-9.yml b/tests/test_playbooks/fixtures/hostgroup-9.yml index eca216a3c..986f362d3 100644 --- a/tests/test_playbooks/fixtures/hostgroup-9.yml +++ b/tests/test_playbooks/fixtures/hostgroup-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.5.0-rc1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -71,18 +71,20 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group/Nested New host group\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"subnet_id\":2,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS - 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"4\",\"parent_id\":4,\"parent_name\":\"New - host group\",\"ptable_id\":144,\"ptable_name\":\"Part table\",\"medium_id\":17,\"medium_name\":\"TestOS - Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:28 UTC\",\"updated_at\":\"2022-11-28 08:31:28 UTC\",\"id\":6,\"name\":\"Nested + [{\"subnet_id\":3,\"subnet_name\":\"Test subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS + 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":null,\"compute_profile_name\":\"myprofile\",\"ancestry\":\"19\",\"parent_id\":19,\"parent_name\":\"New + host group\",\"ptable_id\":159,\"ptable_name\":\"Part table\",\"medium_id\":18,\"medium_name\":\"TestOS + Mirror\",\"pxe_loader\":\"Grub2 UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:16 UTC\",\"updated_at\":\"2024-10-08 11:08:16 UTC\",\"id\":21,\"name\":\"Nested New host group\",\"title\":\"New host group/Nested New host group\",\"description\":\"Nested - group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":4,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":6,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":1,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1833' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -96,13 +98,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -128,23 +128,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/6 + uri: https://foreman.example.org/api/hostgroups/21?show_hidden_parameters=true response: body: - string: '{"subnet_id":2,"subnet_name":"Test subnet4","operatingsystem_id":2,"operatingsystem_name":"TestOS - 7.6","domain_id":3,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"4","parent_id":4,"parent_name":"New - host group","ptable_id":144,"ptable_name":"Part table","medium_id":17,"medium_name":"TestOS - Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2022-11-28 - 08:31:28 UTC","updated_at":"2022-11-28 08:31:28 UTC","id":6,"name":"Nested + string: '{"subnet_id":3,"subnet_name":"Test subnet4","operatingsystem_id":4,"operatingsystem_name":"TestOS + 7.6","domain_id":6,"domain_name":"foo.example.com","compute_profile_id":null,"compute_profile_name":"myprofile","ancestry":"19","parent_id":19,"parent_name":"New + host group","ptable_id":159,"ptable_name":"Part table","medium_id":18,"medium_name":"TestOS + Mirror","pxe_loader":"Grub2 UEFI","subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":"libvirt-cr","architecture_id":1,"architecture_name":"x86_64","realm_id":null,"realm_name":null,"created_at":"2024-10-08 + 11:08:16 UTC","updated_at":"2024-10-08 11:08:16 UTC","id":21,"name":"Nested New host group","title":"New host group/Nested New host group","description":"Nested - group","puppet_proxy_id":1,"puppet_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"centos8-stream-foreman-3-5.tanso.example.com","puppet_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"centos8-stream-foreman-3-5.tanso.example.com","id":1,"url":"https://centos8-stream-foreman-3-5.tanso.example.com:8443"},"inherited_compute_profile_id":4,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":11,"name":"Bar","title":"Bar","description":null},{"id":9,"name":"Foo","title":"Foo","description":null},{"id":10,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":12,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":13,"name":"Test + group","puppet_proxy_id":1,"puppet_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_ca_proxy_id":1,"puppet_ca_proxy_name":"almalinux8-foreman-nightly.tanso.example.com","puppet_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"puppet_ca_proxy":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"inherited_compute_profile_id":6,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":1,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":15,"name":"Bar","title":"Bar","description":null},{"id":13,"name":"Foo","title":"Foo","description":null},{"id":14,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":16,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":17,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2047' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -158,13 +160,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -195,17 +195,19 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":2,\"subnet_name\":\"Test - subnet4\",\"operatingsystem_id\":2,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":3,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":4,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":144,\"ptable_name\":\"Part - table\",\"medium_id\":17,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 - UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2022-11-28 - 08:31:20 UTC\",\"updated_at\":\"2022-11-28 08:31:20 UTC\",\"id\":4,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"puppet_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":3,\"subnet_name\":\"Test + subnet4\",\"operatingsystem_id\":4,\"operatingsystem_name\":\"TestOS 7.6\",\"domain_id\":6,\"domain_name\":\"foo.example.com\",\"compute_profile_id\":6,\"compute_profile_name\":\"myprofile\",\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":159,\"ptable_name\":\"Part + table\",\"medium_id\":18,\"medium_name\":\"TestOS Mirror\",\"pxe_loader\":\"Grub2 + UEFI\",\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":1,\"compute_resource_name\":\"libvirt-cr\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-08 + 11:08:07 UTC\",\"updated_at\":\"2024-10-08 11:08:07 UTC\",\"id\":19,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":\"New host group\",\"puppet_proxy_id\":1,\"puppet_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_ca_proxy_id\":1,\"puppet_ca_proxy_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"puppet_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"puppet_ca_proxy\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null,\"environment_id\":1,\"environment_name\":\"production\",\"inherited_environment_id\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1857' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -219,13 +221,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -256,14 +256,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:10 UTC\",\"updated_at\":\"2022-11-25 11:58:10 UTC\",\"id\":12,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":16,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -277,13 +279,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -314,14 +314,16 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:11 UTC\",\"updated_at\":\"2022-11-25 11:58:11 UTC\",\"id\":13,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:20 UTC\",\"updated_at\":\"2024-10-08 10:52:20 UTC\",\"id\":17,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -335,13 +337,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -372,13 +372,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:07 UTC\",\"updated_at\":\"2022-11-25 11:58:07 UTC\",\"id\":9,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:17 UTC\",\"updated_at\":\"2024-10-08 10:52:17 UTC\",\"id\":13,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -392,13 +394,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -429,13 +429,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"9\",\"parent_id\":9,\"parent_name\":\"Foo\",\"created_at\":\"2022-11-25 - 11:58:08 UTC\",\"updated_at\":\"2022-11-25 11:58:08 UTC\",\"id\":10,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"13\",\"parent_id\":13,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 10:52:18 UTC\",\"updated_at\":\"2024-10-08 10:52:18 UTC\",\"id\":14,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -449,13 +451,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -486,13 +486,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2022-11-25 - 11:58:09 UTC\",\"updated_at\":\"2022-11-25 11:58:09 UTC\",\"id\":11,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 10:52:19 UTC\",\"updated_at\":\"2024-10-08 10:52:19 UTC\",\"id\":15,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -506,13 +508,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -543,13 +543,15 @@ interactions: body: string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2022-11-25 - 11:59:56 UTC\",\"updated_at\":\"2022-11-25 11:59:56 UTC\",\"id\":3,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\"}}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 10:52:22 UTC\",\"updated_at\":\"2024-10-08 10:52:22 UTC\",\"id\":6,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -563,13 +565,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -600,14 +600,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test subnet4\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2022-11-25 - 11:59:57 UTC\",\"updated_at\":\"2022-11-25 11:59:57 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":2,\"name\":\"Test + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 10:52:23 UTC\",\"updated_at\":\"2024-10-08 10:52:23 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":3,\"name\":\"Test subnet4\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '927' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -621,13 +623,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -658,13 +658,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"x86_64\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2022-11-25 - 10:13:12 UTC\",\"updated_at\":\"2022-11-25 10:13:12 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"created_at\":\"2024-10-04 + 11:20:13 UTC\",\"updated_at\":\"2024-10-04 11:20:13 UTC\",\"name\":\"x86_64\",\"id\":1}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '274' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -678,13 +680,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -716,13 +716,15 @@ interactions: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"TestOS 7.6\\\"\",\n \"sort\": {\n \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"major\":\"7\",\"minor\":\"6\",\"family\":\"Redhat\",\"release_name\":\"reverse - whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2022-11-25 11:51:42 UTC\",\"updated_at\":\"2022-11-25 - 11:51:42 UTC\",\"id\":2,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" + whip\",\"password_hash\":\"SHA256\",\"created_at\":\"2024-10-08 10:52:25 UTC\",\"updated_at\":\"2024-10-08 + 10:52:25 UTC\",\"id\":4,\"name\":\"TestOS\",\"title\":\"TestOS 7.6\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '416' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -736,13 +738,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=88 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -771,16 +771,18 @@ interactions: uri: https://foreman.example.org/api/media?search=name%3D%22TestOS+Mirror%22&per_page=4294967296 response: body: - string: "{\n \"total\": 17,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 16,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"TestOS Mirror\\\"\",\n \"sort\": {\n - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 12:00:00 UTC\",\"updated_at\":\"2022-11-25 12:00:00 UTC\",\"id\":17,\"name\":\"TestOS + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"path\":\"https://templeos.org/TempleOS.ISO\",\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:25 UTC\",\"updated_at\":\"2024-10-08 10:52:25 UTC\",\"id\":18,\"name\":\"TestOS Mirror\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '354' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -794,13 +796,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=87 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -829,16 +829,18 @@ interactions: uri: https://foreman.example.org/api/ptables?search=name%3D%22Part+table%22&per_page=4294967296 response: body: - string: "{\n \"total\": 21,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 23,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Part table\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2022-11-25 - 11:59:58 UTC\",\"updated_at\":\"2022-11-25 11:59:58 UTC\",\"name\":\"Part - table\",\"id\":144}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"description\":null,\"os_family\":\"Redhat\",\"created_at\":\"2024-10-08 + 10:52:24 UTC\",\"updated_at\":\"2024-10-08 10:52:24 UTC\",\"name\":\"Part + table\",\"id\":159}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '325' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -852,13 +854,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=86 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -884,20 +884,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -911,13 +913,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=85 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -943,20 +943,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos8-stream-foreman-3-5.tanso.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos8-stream-foreman-3-5.tanso.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2022-11-25 10:14:00 UTC\",\"updated_at\":\"2022-11-25 10:14:00 - UTC\",\"hosts_count\":1,\"name\":\"centos8-stream-foreman-3-5.tanso.example.com\",\"id\":1,\"url\":\"https://centos8-stream-foreman-3-5.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '616' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -970,13 +972,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.5.0-rc1 + - 3.13.0-develop Keep-Alive: - timeout=15, max=84 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-0.yml b/tests/test_playbooks/fixtures/katello_hostgroup-0.yml index dd4f47c36..e1218aacd 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-0.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '181' status: code: 200 message: OK @@ -128,17 +124,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -152,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -169,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -189,17 +182,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org2\",\"created_at\":\"2021-08-24 14:13:58 UTC\",\"updated_at\":\"\ - 2021-08-24 14:14:00 UTC\",\"id\":11,\"name\":\"Test Org2\",\"title\":\"Test\ - \ Org2\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:35:58 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"id\":27,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -250,17 +240,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-08-24 14:10:05\ - \ UTC\",\"updated_at\":\"2021-08-24 14:10:05 UTC\",\"id\":4,\"name\":\"Foo\"\ - ,\"title\":\"Foo\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:35:50 UTC\",\"updated_at\":\"2024-10-15 08:35:50 UTC\",\"id\":23,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -274,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -291,8 +279,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '354' status: code: 200 message: OK @@ -311,17 +297,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%2FBaz%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :\"4\",\"parent_id\":4,\"parent_name\":\"Foo\",\"created_at\":\"2021-08-24\ - \ 14:13:54 UTC\",\"updated_at\":\"2021-08-24 14:13:54 UTC\",\"id\":9,\"name\"\ - :\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-15 + 08:35:52 UTC\",\"updated_at\":\"2024-10-15 08:35:52 UTC\",\"id\":24,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -335,13 +321,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -352,8 +336,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '359' status: code: 200 message: OK @@ -372,17 +354,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Bar%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-08-24 14:13:56\ - \ UTC\",\"updated_at\":\"2021-08-24 14:13:56 UTC\",\"id\":10,\"name\":\"Bar\"\ - ,\"title\":\"Bar\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:35:53 UTC\",\"updated_at\":\"2024-10-15 08:35:53 UTC\",\"id\":25,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -396,13 +378,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -413,8 +393,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -433,17 +411,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -457,13 +436,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -474,8 +451,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -491,28 +466,37 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?organization_id=7&search=name%3D%22centos7-katello-4-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?organization_id=26&search=name%3D%22centos9-stream-katello-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-katello-4-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2021-07-19 09:35:32 UTC\",\"updated_at\":\"2021-07-19\ - \ 09:35:32 UTC\",\"name\":\"centos7-katello-4-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-katello-4-1.yatsu.example.com:9090\",\"remote_execution_pubkey\"\ - :null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\"\ - :{\"supported_types\":[]},\"pulp3\":{\"supported_types\":[\"ansible_collection\"\ - ,\"deb\",\"docker\",\"file\",\"yum\"],\"overriden_to_pulp2\":[]}},\"features\"\ - :[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\"\ - ,\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":4},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":10},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":9},{\"capabilities\":[],\"name\":\"Logs\",\"id\":14},{\"capabilities\"\ - :[],\"name\":\"Registration\",\"id\":17}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"centos9-stream-katello-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-09-04 05:16:16 UTC\",\"updated_at\":\"2024-09-17 07:05:17 + UTC\",\"hosts_count\":0,\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCq6I2A0Dgj/AZCjSXUdeY7BtxK65E66fgqNB83KMHHb1vzWXWyTtwebvN3C1F97Hg9LlFSnuW+xjnQb2JacrVSbvxRyvwHKIya5GGciCJpcDIF+07w6cw08zv7QMy9GYbkNggh5Xw7LK6dSfCYklkijIJHVLmrPWBsZNaDlybde/+RA7ZzFljpJdVsmlPvSDmHm4OC4t2oqbDL4vpd0i7kuDf+VwcJV5EZ2ZHBW9SGcbVGzKOa40PC7AshA7A0CkcbBzFLSWJsCoSXPE9vVwUFg8OcX41urwwOizOrow7VYMwHtwOXGHfXUBxbxMuW0xzhlNBw3PZ9LbEskMLpC6s3REhszncjH7OxQ/IdhNd3JbV9DcmZjwMD4MT16cI9pfND3NXx5SOc/ipaRHIxEt9flmVfVXm38aGAl5s2aVVg5AANfJRN/7Gvi/LNynHR21t18o9pru44SHKs6NpwCeqxqZDQ2zTS5BmF7BYVObTv5rQl4+vyqyEXjrwb9RyRyVM= + foreman-proxy@centos9-stream-katello-nightly.tanso.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"deb\",\"docker\",\"file\",\"python\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-09-04 + 05:14:25 UTC\",\"updated_at\":\"2024-09-04 05:14:25 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":2,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":3,\"created_at\":\"2024-09-04 + 06:20:57 UTC\",\"updated_at\":\"2024-09-04 06:20:57 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Empty + Organization\"},{\"id\":3,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":4,\"created_at\":\"2024-09-04 + 06:21:00 UTC\",\"updated_at\":\"2024-09-04 06:21:00 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-09-10 + 09:38:10 UTC\",\"updated_at\":\"2024-09-10 09:38:10 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Facts + Organization\"},{\"id\":6,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":7,\"created_at\":\"2024-09-26 + 17:32:15 UTC\",\"updated_at\":\"2024-09-26 17:32:15 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"delete_test\"},{\"id\":13,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":26,\"created_at\":\"2024-10-15 + 08:35:55 UTC\",\"updated_at\":\"2024-10-15 08:35:55 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org1\"},{\"id\":14,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":27,\"created_at\":\"2024-10-15 + 08:35:59 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org2\"}],\"features\":[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\",\"file\",\"python\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":22},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3774' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -524,15 +508,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 7; Test Org1 + - 26; Test Org1 Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -543,8 +525,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '914' status: code: 200 message: OK @@ -560,12 +540,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/7/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/26/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":7,"organization":{"name":"Test - Org1","label":"Test_Org1","id":7},"created_at":"2021-08-24 14:10:14 UTC","updated_at":"2021-08-24 - 14:10:14 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":1,"packages":0,"module_streams":0,"errata":{"security":null,"bugfix":0,"enhancement":0,"total":null},"yum_repositories":0,"docker_repositories":0,"ostree_repositories":0,"products":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":13,"name":"Library","label":"Library","description":null,"organization_id":26,"organization":{"name":"Test + Org1","label":"Test_Org1","id":26},"created_at":"2024-10-15 08:35:55 UTC","updated_at":"2024-10-15 + 08:35:55 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":1,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":0,"docker_repositories":0,"ostree_repositories":0,"products":0,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"my_content","id":15}]}]} ' headers: @@ -573,6 +553,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1015' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -584,15 +566,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 7; Test Org1 + - 26; Test Org1 Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -603,8 +583,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '927' status: code: 200 message: OK @@ -620,15 +598,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/7/content_views?environment_id=3&search=name%3D%22my_content%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/26/content_views?environment_id=13&search=name%3D%22my_content%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"my_content\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":5,"auto_publish":false,"solve_dependencies":false,"import_only":false,"repository_ids":[],"id":5,"name":"my_content","label":"my_content","description":null,"organization_id":7,"organization":{"name":"Test - Org1","label":"Test_Org1","id":7},"created_at":"2021-08-24 14:10:22 UTC","updated_at":"2021-08-24 - 14:10:24 UTC","last_task":{"id":"b71d204a-4f92-4e08-815d-ec30c28b580d","result":"successful","last_sync_words":"4 - minutes"},"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"environments":[{"id":3,"name":"Library","label":"Library","permissions":{"readable":true}}],"repositories":[],"versions":[{"id":5,"version":"1.0","published":"2021-08-24 - 14:10:24 UTC","environment_ids":[3]}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2021-08-24 - 14:10:24 UTC","permissions":{"view_content_views":true,"edit_content_views":true,"destroy_content_views":true,"publish_content_views":true,"promote_or_remove_content_views":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"my_content\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":15,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"repository_ids":[],"id":15,"name":"my_content","label":"my_content","description":null,"organization_id":26,"organization":{"name":"Test + Org1","label":"Test_Org1","id":26},"created_at":"2024-10-15 08:36:00 UTC","updated_at":"2024-10-15 + 08:36:01 UTC","last_task":{"id":"a6e9fc35-aacf-49c9-b58c-1e42280f87e5","started_at":"2024-10-15 + 08:36:01 UTC","result":"success","last_sync_words":"1 minute"},"latest_version_environments":[{"id":13,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":15,"version":"1.0","published":"2024-10-15 + 08:36:01 UTC","description":null,"environment_ids":[13],"filters_applied":false,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2024-10-15 + 08:36:01 UTC","environments":[{"id":13,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -636,6 +615,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1409' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -647,15 +628,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 7; Test Org1 + - 26; Test Org1 Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -666,8 +645,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1284' status: code: 200 message: OK @@ -675,8 +652,8 @@ interactions: body: '{"hostgroup": {"name": "New host group", "group_parameters_attributes": [{"name": "test_param_one", "parameter_type": "string", "value": "oneoneone"}, {"name": "kt_activation_keys", "parameter_type": "string", "value": "key_one"}], - "location_ids": [4, 9, 10], "organization_ids": [7, 11], "content_source_id": - 1, "content_view_id": 5, "lifecycle_environment_id": 3}}' + "location_ids": [23, 24, 25], "organization_ids": [26, 27], "content_source_id": + 1, "content_view_id": 15, "lifecycle_environment_id": 13}}' headers: Accept: - application/json;version=2 @@ -685,7 +662,7 @@ interactions: Connection: - keep-alive Content-Length: - - '366' + - '371' Content-Type: - application/json User-Agent: @@ -694,18 +671,22 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"key_one"},{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":6,"name":"test_param_one","parameter_type":"string","value":"oneoneone"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null},{"id":10,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"key_one"},{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":37,"name":"test_param_one","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"oneoneone"}],"template_combinations":[],"locations":[{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null},{"id":25,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2067' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -719,13 +700,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-1.yml b/tests/test_playbooks/fixtures/katello_hostgroup-1.yml index 7fd5c64df..c3c610c30 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-1.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,31 +68,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\"\ - :null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\"\ - :null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\"\ - :null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\"\ - :null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\"\ - :null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\"\ - :null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"\ - realm_name\":null,\"created_at\":\"2021-08-24 14:14:04 UTC\",\"updated_at\"\ - :\"2021-08-24 14:14:04 UTC\",\"id\":2,\"name\":\"New host group\",\"title\"\ - :\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\"\ - :null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\"\ - :null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_environment_id\"\ - :null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\"\ - :null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\"\ - :null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\"\ - :null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\"\ - :null,\"inherited_pxe_loader\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:36:42 UTC\",\"updated_at\":\"2024-10-15 08:36:42 UTC\",\"id\":30,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1380' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -108,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1457' status: code: 200 message: OK @@ -142,21 +123,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30?show_hidden_parameters=true response: body: - string: '{"content_source_id":1,"content_source_name":"centos7-katello-4-1.yatsu.example.com","content_view_id":5,"content_view_name":"my_content","lifecycle_environment_id":3,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"key_one"},{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":6,"name":"test_param_one","parameter_type":"string","value":"oneoneone"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":10,"name":"Bar","title":"Bar","description":null},{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"content_source_id":1,"content_source_name":"centos9-stream-katello-nightly.tanso.example.com","content_view_id":15,"content_view_name":"my_content","lifecycle_environment_id":13,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"key_one"},{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":37,"name":"test_param_one","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"oneoneone"}],"template_combinations":[],"locations":[{"id":25,"name":"Bar","title":"Bar","description":null},{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2316' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -170,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,8 +170,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2330' status: code: 200 message: OK @@ -207,17 +188,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -231,13 +213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -248,8 +228,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -268,17 +246,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org2\",\"created_at\":\"2021-08-24 14:13:58 UTC\",\"updated_at\":\"\ - 2021-08-24 14:14:00 UTC\",\"id\":11,\"name\":\"Test Org2\",\"title\":\"Test\ - \ Org2\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:35:58 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"id\":27,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -292,13 +271,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -309,8 +286,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -329,17 +304,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-08-24 14:10:05\ - \ UTC\",\"updated_at\":\"2021-08-24 14:10:05 UTC\",\"id\":4,\"name\":\"Foo\"\ - ,\"title\":\"Foo\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:35:50 UTC\",\"updated_at\":\"2024-10-15 08:35:50 UTC\",\"id\":23,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -353,13 +328,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -370,8 +343,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '354' status: code: 200 message: OK @@ -390,17 +361,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%2FBaz%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :\"4\",\"parent_id\":4,\"parent_name\":\"Foo\",\"created_at\":\"2021-08-24\ - \ 14:13:54 UTC\",\"updated_at\":\"2021-08-24 14:13:54 UTC\",\"id\":9,\"name\"\ - :\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"23\",\"parent_id\":23,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-15 + 08:35:52 UTC\",\"updated_at\":\"2024-10-15 08:35:52 UTC\",\"id\":24,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -414,13 +385,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -431,8 +400,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '359' status: code: 200 message: OK @@ -451,17 +418,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Bar%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-08-24 14:13:56\ - \ UTC\",\"updated_at\":\"2021-08-24 14:13:56 UTC\",\"id\":10,\"name\":\"Bar\"\ - ,\"title\":\"Bar\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:35:53 UTC\",\"updated_at\":\"2024-10-15 08:35:53 UTC\",\"id\":25,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -475,13 +442,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -492,8 +457,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -512,17 +475,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -536,13 +500,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -553,8 +515,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -570,28 +530,37 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?organization_id=7&search=name%3D%22centos7-katello-4-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?organization_id=26&search=name%3D%22centos9-stream-katello-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-katello-4-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2021-07-19 09:35:32 UTC\",\"updated_at\":\"2021-07-19\ - \ 09:35:32 UTC\",\"name\":\"centos7-katello-4-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-katello-4-1.yatsu.example.com:9090\",\"remote_execution_pubkey\"\ - :null,\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\"\ - :{\"supported_types\":[]},\"pulp3\":{\"supported_types\":[\"ansible_collection\"\ - ,\"deb\",\"docker\",\"file\",\"yum\"],\"overriden_to_pulp2\":[]}},\"features\"\ - :[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\"\ - ,\"file\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":4},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":10},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":9},{\"capabilities\":[],\"name\":\"Logs\",\"id\":14},{\"capabilities\"\ - :[],\"name\":\"Registration\",\"id\":17}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"centos9-stream-katello-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-09-04 05:16:16 UTC\",\"updated_at\":\"2024-09-17 07:05:17 + UTC\",\"hosts_count\":0,\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCq6I2A0Dgj/AZCjSXUdeY7BtxK65E66fgqNB83KMHHb1vzWXWyTtwebvN3C1F97Hg9LlFSnuW+xjnQb2JacrVSbvxRyvwHKIya5GGciCJpcDIF+07w6cw08zv7QMy9GYbkNggh5Xw7LK6dSfCYklkijIJHVLmrPWBsZNaDlybde/+RA7ZzFljpJdVsmlPvSDmHm4OC4t2oqbDL4vpd0i7kuDf+VwcJV5EZ2ZHBW9SGcbVGzKOa40PC7AshA7A0CkcbBzFLSWJsCoSXPE9vVwUFg8OcX41urwwOizOrow7VYMwHtwOXGHfXUBxbxMuW0xzhlNBw3PZ9LbEskMLpC6s3REhszncjH7OxQ/IdhNd3JbV9DcmZjwMD4MT16cI9pfND3NXx5SOc/ipaRHIxEt9flmVfVXm38aGAl5s2aVVg5AANfJRN/7Gvi/LNynHR21t18o9pru44SHKs6NpwCeqxqZDQ2zTS5BmF7BYVObTv5rQl4+vyqyEXjrwb9RyRyVM= + foreman-proxy@centos9-stream-katello-nightly.tanso.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"deb\",\"docker\",\"file\",\"python\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-09-04 + 05:14:25 UTC\",\"updated_at\":\"2024-09-04 05:14:25 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":2,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":3,\"created_at\":\"2024-09-04 + 06:20:57 UTC\",\"updated_at\":\"2024-09-04 06:20:57 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Empty + Organization\"},{\"id\":3,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":4,\"created_at\":\"2024-09-04 + 06:21:00 UTC\",\"updated_at\":\"2024-09-04 06:21:00 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-09-10 + 09:38:10 UTC\",\"updated_at\":\"2024-09-10 09:38:10 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Facts + Organization\"},{\"id\":6,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":7,\"created_at\":\"2024-09-26 + 17:32:15 UTC\",\"updated_at\":\"2024-09-26 17:32:15 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"delete_test\"},{\"id\":13,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":26,\"created_at\":\"2024-10-15 + 08:35:55 UTC\",\"updated_at\":\"2024-10-15 08:35:55 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org1\"},{\"id\":14,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":27,\"created_at\":\"2024-10-15 + 08:35:59 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org2\"}],\"features\":[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\",\"file\",\"python\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":22},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3774' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -603,15 +572,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 7; Test Org1 + - 26; Test Org1 Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -622,8 +589,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '914' status: code: 200 message: OK @@ -639,12 +604,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/7/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/26/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":7,"organization":{"name":"Test - Org1","label":"Test_Org1","id":7},"created_at":"2021-08-24 14:10:14 UTC","updated_at":"2021-08-24 - 14:10:14 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":1,"packages":0,"module_streams":0,"errata":{"security":null,"bugfix":0,"enhancement":0,"total":null},"yum_repositories":0,"docker_repositories":0,"ostree_repositories":0,"products":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":13,"name":"Library","label":"Library","description":null,"organization_id":26,"organization":{"name":"Test + Org1","label":"Test_Org1","id":26},"created_at":"2024-10-15 08:35:55 UTC","updated_at":"2024-10-15 + 08:35:55 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":1,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":0,"docker_repositories":0,"ostree_repositories":0,"products":0,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"my_content","id":15}]}]} ' headers: @@ -652,6 +617,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1015' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -663,15 +630,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 7; Test Org1 + - 26; Test Org1 Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -682,8 +647,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '927' status: code: 200 message: OK @@ -699,15 +662,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/7/content_views?environment_id=3&search=name%3D%22my_content%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/26/content_views?environment_id=13&search=name%3D%22my_content%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"my_content\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":5,"auto_publish":false,"solve_dependencies":false,"import_only":false,"repository_ids":[],"id":5,"name":"my_content","label":"my_content","description":null,"organization_id":7,"organization":{"name":"Test - Org1","label":"Test_Org1","id":7},"created_at":"2021-08-24 14:10:22 UTC","updated_at":"2021-08-24 - 14:10:24 UTC","last_task":{"id":"b71d204a-4f92-4e08-815d-ec30c28b580d","result":"successful","last_sync_words":"4 - minutes"},"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"environments":[{"id":3,"name":"Library","label":"Library","permissions":{"readable":true}}],"repositories":[],"versions":[{"id":5,"version":"1.0","published":"2021-08-24 - 14:10:24 UTC","environment_ids":[3]}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2021-08-24 - 14:10:24 UTC","permissions":{"view_content_views":true,"edit_content_views":true,"destroy_content_views":true,"publish_content_views":true,"promote_or_remove_content_views":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"my_content\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":15,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"repository_ids":[],"id":15,"name":"my_content","label":"my_content","description":null,"organization_id":26,"organization":{"name":"Test + Org1","label":"Test_Org1","id":26},"created_at":"2024-10-15 08:36:00 UTC","updated_at":"2024-10-15 + 08:36:01 UTC","last_task":{"id":"a6e9fc35-aacf-49c9-b58c-1e42280f87e5","started_at":"2024-10-15 + 08:36:01 UTC","result":"success","last_sync_words":"1 minute"},"latest_version_environments":[{"id":13,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":15,"version":"1.0","published":"2024-10-15 + 08:36:01 UTC","description":null,"environment_ids":[13],"filters_applied":false,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2024-10-15 + 08:36:01 UTC","environments":[{"id":13,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -715,6 +679,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1409' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -726,15 +692,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 7; Test Org1 + - 26; Test Org1 Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=89 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -745,8 +709,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1284' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-2.yml b/tests/test_playbooks/fixtures/katello_hostgroup-2.yml index 44597cdb2..6857d932d 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-2.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,31 +68,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\"\ - :null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\"\ - :null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\"\ - :null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\"\ - :null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\"\ - :null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\"\ - :null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"\ - realm_name\":null,\"created_at\":\"2021-08-24 14:14:04 UTC\",\"updated_at\"\ - :\"2021-08-24 14:14:04 UTC\",\"id\":2,\"name\":\"New host group\",\"title\"\ - :\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\"\ - :null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\"\ - :null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_environment_id\"\ - :null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\"\ - :null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\"\ - :null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\"\ - :null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\"\ - :null,\"inherited_pxe_loader\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:36:42 UTC\",\"updated_at\":\"2024-10-15 08:36:42 UTC\",\"id\":30,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1380' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -108,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1457' status: code: 200 message: OK @@ -142,21 +123,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30?show_hidden_parameters=true response: body: - string: '{"content_source_id":1,"content_source_name":"centos7-katello-4-1.yatsu.example.com","content_view_id":5,"content_view_name":"my_content","lifecycle_environment_id":3,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"key_one"},{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":6,"name":"test_param_one","parameter_type":"string","value":"oneoneone"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":10,"name":"Bar","title":"Bar","description":null},{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"content_source_id":1,"content_source_name":"centos9-stream-katello-nightly.tanso.example.com","content_view_id":15,"content_view_name":"my_content","lifecycle_environment_id":13,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"key_one"},{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":37,"name":"test_param_one","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"oneoneone"}],"template_combinations":[],"locations":[{"id":25,"name":"Bar","title":"Bar","description":null},{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2316' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -170,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,8 +170,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2330' status: code: 200 message: OK @@ -207,17 +188,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -231,13 +213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -248,8 +228,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -268,17 +246,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org2\",\"created_at\":\"2021-08-24 14:13:58 UTC\",\"updated_at\":\"\ - 2021-08-24 14:14:00 UTC\",\"id\":11,\"name\":\"Test Org2\",\"title\":\"Test\ - \ Org2\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:35:58 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"id\":27,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -292,13 +271,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -309,8 +286,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -329,17 +304,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -353,13 +329,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -370,8 +344,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-3.yml b/tests/test_playbooks/fixtures/katello_hostgroup-3.yml index 44597cdb2..6857d932d 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-3.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,31 +68,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\"\ - :null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\"\ - :null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\"\ - :null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\"\ - :null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\"\ - :null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\"\ - :null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"\ - realm_name\":null,\"created_at\":\"2021-08-24 14:14:04 UTC\",\"updated_at\"\ - :\"2021-08-24 14:14:04 UTC\",\"id\":2,\"name\":\"New host group\",\"title\"\ - :\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\"\ - :null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\"\ - :null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_environment_id\"\ - :null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\"\ - :null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\"\ - :null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\"\ - :null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\"\ - :null,\"inherited_pxe_loader\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:36:42 UTC\",\"updated_at\":\"2024-10-15 08:36:42 UTC\",\"id\":30,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1380' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -108,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1457' status: code: 200 message: OK @@ -142,21 +123,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30?show_hidden_parameters=true response: body: - string: '{"content_source_id":1,"content_source_name":"centos7-katello-4-1.yatsu.example.com","content_view_id":5,"content_view_name":"my_content","lifecycle_environment_id":3,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"key_one"},{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":6,"name":"test_param_one","parameter_type":"string","value":"oneoneone"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":10,"name":"Bar","title":"Bar","description":null},{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"content_source_id":1,"content_source_name":"centos9-stream-katello-nightly.tanso.example.com","content_view_id":15,"content_view_name":"my_content","lifecycle_environment_id":13,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"key_one"},{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":37,"name":"test_param_one","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"oneoneone"}],"template_combinations":[],"locations":[{"id":25,"name":"Bar","title":"Bar","description":null},{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2316' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -170,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,8 +170,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2330' status: code: 200 message: OK @@ -207,17 +188,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -231,13 +213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -248,8 +228,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -268,17 +246,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org2\",\"created_at\":\"2021-08-24 14:13:58 UTC\",\"updated_at\":\"\ - 2021-08-24 14:14:00 UTC\",\"id\":11,\"name\":\"Test Org2\",\"title\":\"Test\ - \ Org2\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:35:58 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"id\":27,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -292,13 +271,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -309,8 +286,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -329,17 +304,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -353,13 +329,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -370,8 +344,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-4.yml b/tests/test_playbooks/fixtures/katello_hostgroup-4.yml index 83630c5ae..197aac43e 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-4.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,31 +68,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\"\ - :null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\"\ - :null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\"\ - :null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\"\ - :null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\"\ - :null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\"\ - :null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"\ - realm_name\":null,\"created_at\":\"2021-08-24 14:14:04 UTC\",\"updated_at\"\ - :\"2021-08-24 14:14:04 UTC\",\"id\":2,\"name\":\"New host group\",\"title\"\ - :\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\"\ - :null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\"\ - :null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_environment_id\"\ - :null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\"\ - :null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\"\ - :null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\"\ - :null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\"\ - :null,\"inherited_pxe_loader\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:36:42 UTC\",\"updated_at\":\"2024-10-15 08:36:42 UTC\",\"id\":30,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1380' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -108,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1457' status: code: 200 message: OK @@ -142,21 +123,25 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30?show_hidden_parameters=true response: body: - string: '{"content_source_id":1,"content_source_name":"centos7-katello-4-1.yatsu.example.com","content_view_id":5,"content_view_name":"my_content","lifecycle_environment_id":3,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"key_one"},{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":6,"name":"test_param_one","parameter_type":"string","value":"oneoneone"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":10,"name":"Bar","title":"Bar","description":null},{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"content_source_id":1,"content_source_name":"centos9-stream-katello-nightly.tanso.example.com","content_view_id":15,"content_view_name":"my_content","lifecycle_environment_id":13,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"key_one"},{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":37,"name":"test_param_one","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"oneoneone"}],"template_combinations":[],"locations":[{"id":25,"name":"Bar","title":"Bar","description":null},{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2316' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -170,13 +155,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -187,8 +170,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2330' status: code: 200 message: OK @@ -207,17 +188,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -231,13 +213,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -248,8 +228,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -268,17 +246,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org2\",\"created_at\":\"2021-08-24 14:13:58 UTC\",\"updated_at\":\"\ - 2021-08-24 14:14:00 UTC\",\"id\":11,\"name\":\"Test Org2\",\"title\":\"Test\ - \ Org2\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:35:58 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"id\":27,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -292,13 +271,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -309,8 +286,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -329,17 +304,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -353,13 +329,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -370,8 +344,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -392,20 +364,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30 response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:08 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"new_key"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":10,"name":"Bar","title":"Bar","description":null},{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:44 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_key"}],"template_combinations":[],"locations":[{"id":25,"name":"Bar","title":"Bar","description":null},{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1842' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -419,13 +394,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -436,8 +409,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1923' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-5.yml b/tests/test_playbooks/fixtures/katello_hostgroup-5.yml index 4fee34279..dd13607ae 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-5.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,31 +68,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\"\ - :null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\"\ - :null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\"\ - :null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\"\ - :null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\"\ - :null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\"\ - :null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"\ - realm_name\":null,\"created_at\":\"2021-08-24 14:14:04 UTC\",\"updated_at\"\ - :\"2021-08-24 14:14:04 UTC\",\"id\":2,\"name\":\"New host group\",\"title\"\ - :\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\"\ - :null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\"\ - :null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_environment_id\"\ - :null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\"\ - :null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\"\ - :null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\"\ - :null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\"\ - :null,\"inherited_pxe_loader\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:36:42 UTC\",\"updated_at\":\"2024-10-15 08:36:42 UTC\",\"id\":30,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1380' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -108,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1457' status: code: 200 message: OK @@ -142,20 +123,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30?show_hidden_parameters=true response: body: - string: '{"content_source_id":1,"content_source_name":"centos7-katello-4-1.yatsu.example.com","content_view_id":5,"content_view_name":"my_content","lifecycle_environment_id":3,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:04 UTC","id":2,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2021-08-24 - 14:14:04 UTC","updated_at":"2021-08-24 14:14:08 UTC","id":7,"name":"kt_activation_keys","parameter_type":"string","value":"new_key"}],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":10,"name":"Bar","title":"Bar","description":null},{"id":4,"name":"Foo","title":"Foo","description":null},{"id":9,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":7,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":11,"name":"Test + string: '{"content_source_id":1,"content_source_name":"centos9-stream-katello-nightly.tanso.example.com","content_view_id":15,"content_view_name":"my_content","lifecycle_environment_id":13,"lifecycle_environment_name":"Library","kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:42 UTC","id":30,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2024-10-15 + 08:36:42 UTC","updated_at":"2024-10-15 08:36:44 UTC","id":38,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + group","hidden_value?":false,"value":"new_key"}],"template_combinations":[],"locations":[{"id":25,"name":"Bar","title":"Bar","description":null},{"id":23,"name":"Foo","title":"Foo","description":null},{"id":24,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":27,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2091' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -169,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -186,8 +168,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2159' status: code: 200 message: OK @@ -206,17 +186,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -230,13 +211,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -247,8 +226,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK @@ -267,17 +244,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org2\",\"created_at\":\"2021-08-24 14:13:58 UTC\",\"updated_at\":\"\ - 2021-08-24 14:14:00 UTC\",\"id\":11,\"name\":\"Test Org2\",\"title\":\"Test\ - \ Org2\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:35:58 UTC\",\"updated_at\":\"2024-10-15 08:35:59 UTC\",\"id\":27,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -291,13 +269,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -308,8 +284,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -328,17 +302,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Org1\",\"created_at\":\"2021-08-24 14:10:13 UTC\",\"updated_at\":\"\ - 2021-08-24 14:10:18 UTC\",\"id\":7,\"name\":\"Test Org1\",\"title\":\"Test\ - \ Org1\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -352,13 +327,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -369,8 +342,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '356' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-6.yml b/tests/test_playbooks/fixtures/katello_hostgroup-6.yml index fa0b50e5a..4c03fd647 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-6.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,31 +68,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\"\ - :null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\"\ - :null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\"\ - :null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\"\ - :null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\"\ - :null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\"\ - :null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"\ - realm_name\":null,\"created_at\":\"2021-08-24 14:14:04 UTC\",\"updated_at\"\ - :\"2021-08-24 14:14:04 UTC\",\"id\":2,\"name\":\"New host group\",\"title\"\ - :\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\"\ - :null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\"\ - :null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_environment_id\"\ - :null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\"\ - :null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\"\ - :null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\"\ - :null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\"\ - :null,\"inherited_pxe_loader\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:36:42 UTC\",\"updated_at\":\"2024-10-15 08:36:42 UTC\",\"id\":30,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1380' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -108,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -125,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1457' status: code: 200 message: OK @@ -144,17 +125,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/2 + uri: https://foreman.example.org/api/hostgroups/30 response: body: - string: '{"id":2,"name":"New host group","created_at":"2021-08-24T14:14:04.230Z","updated_at":"2021-08-24T14:14:04.230Z","environment_id":null,"operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New - host group","realm_id":null,"compute_profile_id":null,"grub_pass":"","lookup_value_matcher":"hostgroup=New - host group","subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null,"content_facet_attributes":{"id":2,"hostgroup_id":2,"kickstart_repository_id":null,"content_source_id":1,"content_view_id":5,"lifecycle_environment_id":3}}' + string: '{"id":30,"name":"New host group","created_at":"2024-10-15T08:36:42.179Z","updated_at":"2024-10-15T08:36:42.179Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New + host group","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New + host group","subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null,"salt_proxy_id":null,"salt_environment_id":null,"content_facet_attributes":{"id":1,"hostgroup_id":30,"kickstart_repository_id":null,"content_source_id":1,"content_view_id":15,"lifecycle_environment_id":13}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '786' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -168,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -185,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '754' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/katello_hostgroup-7.yml b/tests/test_playbooks/fixtures/katello_hostgroup-7.yml index 5e1671e4f..b758ecb58 100644 --- a/tests/test_playbooks/fixtures/katello_hostgroup-7.yml +++ b/tests/test_playbooks/fixtures/katello_hostgroup-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.2","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/hostgroups?search=title%3D%22New+host+group%22&per_page=4294967296 response: body: - string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.2 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '181' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/luna_hostgroup-0.yml b/tests/test_playbooks/fixtures/luna_hostgroup-0.yml index 1a673735f..2bfafa6b0 100644 --- a/tests/test_playbooks/fixtures/luna_hostgroup-0.yml +++ b/tests/test_playbooks/fixtures/luna_hostgroup-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -78,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '181' status: code: 200 message: OK @@ -128,16 +124,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2021-03-16 - 17:51:17 UTC\",\"updated_at\":\"2021-03-16 17:51:17 UTC\",\"id\":14,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -168,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -188,16 +182,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2021-03-16 - 17:51:19 UTC\",\"updated_at\":\"2021-03-16 17:51:19 UTC\",\"id\":15,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:38:41 UTC\",\"updated_at\":\"2024-10-15 08:38:44 UTC\",\"id\":31,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -211,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -228,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -250,13 +242,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 10:51:22 UTC\",\"updated_at\":\"2021-03-16 10:51:22 UTC\",\"id\":3,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:37 UTC\",\"updated_at\":\"2024-10-15 08:38:37 UTC\",\"id\":28,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -270,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -287,8 +279,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '354' status: code: 200 message: OK @@ -309,13 +299,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"3\",\"parent_id\":3,\"parent_name\":\"Foo\",\"created_at\":\"2021-03-16 - 17:51:14 UTC\",\"updated_at\":\"2021-03-16 17:51:14 UTC\",\"id\":12,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"28\",\"parent_id\":28,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-15 + 08:38:38 UTC\",\"updated_at\":\"2024-10-15 08:38:38 UTC\",\"id\":29,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -329,13 +321,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -346,8 +336,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '360' status: code: 200 message: OK @@ -368,13 +356,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 17:51:15 UTC\",\"updated_at\":\"2021-03-16 17:51:15 UTC\",\"id\":13,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:40 UTC\",\"updated_at\":\"2024-10-15 08:38:40 UTC\",\"id\":30,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -388,13 +378,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -405,8 +393,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -422,22 +408,37 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-luna.shu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos9-stream-katello-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos7-luna.shu.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"centos9-stream-katello-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2021-03-16 10:03:09 UTC\",\"updated_at\":\"2021-03-16 10:03:15 - UTC\",\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDR75cBKgge8EKlwZWAPjpdeE3uT/kV7c4NoGWButu5CwiOXV7tri8+af0DUi8wx9VjdPmxxJQDpo8NxA4dnEUlxDBsezKXdRj09da9c/fyI8no4AmcjgYyHpR2UnMLGXuxwVy9+fiLMhzeQWj6Mxp7mVv+73MfsYV+z3UFHW5H25YXiz2njbhG+gWAE8ozWWApt2QFyyKXS40be7sXVYwu6njIaUIoA9J7FxO4gTbT2/IpiPuDFJiotqmkqkQIBQEWco8Amj6OZAjhj9St3OaVSkLLZXv7HugecuQTkhbrFVzOj2rkwonfY8ZpjrdkBWD7cQVC4idKh9CHsmnLYqlZ - foreman-proxy@centos7-luna.shu.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[]},\"pulp3\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"yum\"],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Discovery\",\"id\":20},{\"capabilities\":[],\"name\":\"Dynflow\",\"id\":18},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":21},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":22},{\"capabilities\":[],\"name\":\"SSH\",\"id\":19},{\"capabilities\":[\"pulp_certguard\",\"pulp_container\",\"pulp_deb\",\"pulp_file\",\"pulp_rpm\",\"pulpcore\"],\"name\":\"Pulpcore\",\"id\":4},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":10},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":9},{\"capabilities\":[],\"name\":\"Logs\",\"id\":14},{\"capabilities\":[],\"name\":\"Registration\",\"id\":17}]}]\n}\n" + [{\"created_at\":\"2024-09-04 05:16:16 UTC\",\"updated_at\":\"2024-09-17 07:05:17 + UTC\",\"hosts_count\":2,\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCq6I2A0Dgj/AZCjSXUdeY7BtxK65E66fgqNB83KMHHb1vzWXWyTtwebvN3C1F97Hg9LlFSnuW+xjnQb2JacrVSbvxRyvwHKIya5GGciCJpcDIF+07w6cw08zv7QMy9GYbkNggh5Xw7LK6dSfCYklkijIJHVLmrPWBsZNaDlybde/+RA7ZzFljpJdVsmlPvSDmHm4OC4t2oqbDL4vpd0i7kuDf+VwcJV5EZ2ZHBW9SGcbVGzKOa40PC7AshA7A0CkcbBzFLSWJsCoSXPE9vVwUFg8OcX41urwwOizOrow7VYMwHtwOXGHfXUBxbxMuW0xzhlNBw3PZ9LbEskMLpC6s3REhszncjH7OxQ/IdhNd3JbV9DcmZjwMD4MT16cI9pfND3NXx5SOc/ipaRHIxEt9flmVfVXm38aGAl5s2aVVg5AANfJRN/7Gvi/LNynHR21t18o9pru44SHKs6NpwCeqxqZDQ2zTS5BmF7BYVObTv5rQl4+vyqyEXjrwb9RyRyVM= + foreman-proxy@centos9-stream-katello-nightly.tanso.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"deb\",\"docker\",\"file\",\"python\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-09-04 + 05:14:25 UTC\",\"updated_at\":\"2024-09-04 05:14:25 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":2,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":3,\"created_at\":\"2024-09-04 + 06:20:57 UTC\",\"updated_at\":\"2024-09-04 06:20:57 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Empty + Organization\"},{\"id\":3,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":4,\"created_at\":\"2024-09-04 + 06:21:00 UTC\",\"updated_at\":\"2024-09-04 06:21:00 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-09-10 + 09:38:10 UTC\",\"updated_at\":\"2024-09-10 09:38:10 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Facts + Organization\"},{\"id\":6,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":7,\"created_at\":\"2024-09-26 + 17:32:15 UTC\",\"updated_at\":\"2024-09-26 17:32:15 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"delete_test\"},{\"id\":13,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":26,\"created_at\":\"2024-10-15 + 08:35:55 UTC\",\"updated_at\":\"2024-10-15 08:35:55 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org1\"},{\"id\":15,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":31,\"created_at\":\"2024-10-15 + 08:38:42 UTC\",\"updated_at\":\"2024-10-15 08:38:42 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org2\"}],\"features\":[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\",\"file\",\"python\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":22},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":23},{\"capabilities\":[\"ansible-runner\",\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":20}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3882' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -451,13 +452,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -468,8 +467,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1530' status: code: 200 message: OK @@ -490,13 +487,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"thulium_drake.motd\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":1,\"name\":\"thulium_drake.motd\",\"created_at\":\"2021-03-16 - 10:23:34 UTC\",\"updated_at\":\"2021-03-16 10:23:34 UTC\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":1,\"name\":\"thulium_drake.motd\",\"created_at\":\"2024-10-15 + 08:49:29 UTC\",\"updated_at\":\"2024-10-15 08:49:29 UTC\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '298' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -510,13 +509,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -527,14 +524,12 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '298' status: code: 200 message: OK - request: body: '{"hostgroup": {"name": "New host group", "openscap_proxy_id": 1, "location_ids": - [3, 12, 13], "organization_ids": [14, 15]}}' + [28, 29, 30], "organization_ids": [26, 31]}}' headers: Accept: - application/json;version=2 @@ -543,7 +538,7 @@ interactions: Connection: - keep-alive Content-Length: - - '124' + - '125' Content-Type: - application/json User-Agent: @@ -552,16 +547,18 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-03-16 - 17:51:22 UTC","updated_at":"2021-03-16 17:51:22 UTC","id":10,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos7-luna.shu.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos7-luna.shu.example.com","id":1,"url":"https://centos7-luna.shu.example.com:9090"},"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":3,"name":"Foo","title":"Foo","description":null},{"id":12,"name":"Baz","title":"Foo/Baz","description":null},{"id":13,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":14,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":15,"name":"Test + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:49:57 UTC","updated_at":"2024-10-15 08:49:57 UTC","id":31,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos9-stream-katello-nightly.tanso.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos9-stream-katello-nightly.tanso.example.com","id":1,"url":"https://centos9-stream-katello-nightly.tanso.example.com:9090"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":28,"name":"Foo","title":"Foo","description":null},{"id":29,"name":"Baz","title":"Foo/Baz","description":null},{"id":30,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":31,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1865' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -575,13 +572,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -611,17 +606,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/api/hostgroups/10/assign_ansible_roles + uri: https://foreman.example.org/api/hostgroups/31/assign_ansible_roles response: body: - string: '{"id":10,"name":"New host group","created_at":"2021-03-16T17:51:22.493Z","updated_at":"2021-03-16T17:51:22.493Z","environment_id":null,"operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New - host group","realm_id":null,"compute_profile_id":null,"grub_pass":"","lookup_value_matcher":"hostgroup=New - host group","openscap_proxy_id":1,"subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null}' + string: '{"id":31,"name":"New host group","created_at":"2024-10-15T08:49:57.383Z","updated_at":"2024-10-15T08:49:57.383Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New + host group","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New + host group","subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null,"salt_proxy_id":null,"salt_environment_id":null,"openscap_proxy_id":1}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '650' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -635,15 +632,13 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Location: - - https://centos7-luna/hostgroups/10-New%20host%20group + - https://centos9-stream-katello-nightly.tanso.example.com/hostgroups/31-New%20host%20group Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/luna_hostgroup-1.yml b/tests/test_playbooks/fixtures/luna_hostgroup-1.yml index 4600788ce..8982874da 100644 --- a/tests/test_playbooks/fixtures/luna_hostgroup-1.yml +++ b/tests/test_playbooks/fixtures/luna_hostgroup-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -72,14 +70,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2021-03-16 - 17:51:22 UTC\",\"updated_at\":\"2021-03-16 17:51:22 UTC\",\"id\":10,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos7-luna.shu.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_environment_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:49:57 UTC\",\"updated_at\":\"2024-10-15 08:49:57 UTC\",\"id\":31,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1629' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -93,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -110,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1647' status: code: 200 message: OK @@ -127,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/31?show_hidden_parameters=true response: body: - string: '{"content_source_id":null,"content_source_name":null,"content_view_id":null,"content_view_name":null,"lifecycle_environment_id":null,"lifecycle_environment_name":null,"kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-03-16 - 17:51:22 UTC","updated_at":"2021-03-16 17:51:22 UTC","id":10,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos7-luna.shu.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos7-luna.shu.example.com","id":1,"url":"https://centos7-luna.shu.example.com:9090"},"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":13,"name":"Bar","title":"Bar","description":null},{"id":3,"name":"Foo","title":"Foo","description":null},{"id":12,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":14,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":15,"name":"Test + string: '{"content_source_id":null,"content_source_name":null,"content_view_id":null,"content_view_name":null,"lifecycle_environment_id":null,"lifecycle_environment_name":null,"kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:49:57 UTC","updated_at":"2024-10-15 08:49:57 UTC","id":31,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos9-stream-katello-nightly.tanso.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos9-stream-katello-nightly.tanso.example.com","id":1,"url":"https://centos9-stream-katello-nightly.tanso.example.com:9090"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":30,"name":"Bar","title":"Bar","description":null},{"id":28,"name":"Foo","title":"Foo","description":null},{"id":29,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":31,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2062' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2140' status: code: 200 message: OK @@ -190,16 +184,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2021-03-16 - 17:51:17 UTC\",\"updated_at\":\"2021-03-16 17:51:17 UTC\",\"id\":14,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +224,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -250,16 +242,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2021-03-16 - 17:51:19 UTC\",\"updated_at\":\"2021-03-16 17:51:19 UTC\",\"id\":15,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:38:41 UTC\",\"updated_at\":\"2024-10-15 08:38:44 UTC\",\"id\":31,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -273,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -290,8 +282,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -312,13 +302,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 10:51:22 UTC\",\"updated_at\":\"2021-03-16 10:51:22 UTC\",\"id\":3,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:37 UTC\",\"updated_at\":\"2024-10-15 08:38:37 UTC\",\"id\":28,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -332,13 +324,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -349,8 +339,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '354' status: code: 200 message: OK @@ -371,13 +359,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"3\",\"parent_id\":3,\"parent_name\":\"Foo\",\"created_at\":\"2021-03-16 - 17:51:14 UTC\",\"updated_at\":\"2021-03-16 17:51:14 UTC\",\"id\":12,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"28\",\"parent_id\":28,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-15 + 08:38:38 UTC\",\"updated_at\":\"2024-10-15 08:38:38 UTC\",\"id\":29,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -391,13 +381,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -408,8 +396,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '360' status: code: 200 message: OK @@ -430,13 +416,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 17:51:15 UTC\",\"updated_at\":\"2021-03-16 17:51:15 UTC\",\"id\":13,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:40 UTC\",\"updated_at\":\"2024-10-15 08:38:40 UTC\",\"id\":30,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +438,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -467,8 +453,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -484,22 +468,37 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-luna.shu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos9-stream-katello-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos7-luna.shu.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"centos9-stream-katello-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2021-03-16 10:03:09 UTC\",\"updated_at\":\"2021-03-16 10:03:15 - UTC\",\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDR75cBKgge8EKlwZWAPjpdeE3uT/kV7c4NoGWButu5CwiOXV7tri8+af0DUi8wx9VjdPmxxJQDpo8NxA4dnEUlxDBsezKXdRj09da9c/fyI8no4AmcjgYyHpR2UnMLGXuxwVy9+fiLMhzeQWj6Mxp7mVv+73MfsYV+z3UFHW5H25YXiz2njbhG+gWAE8ozWWApt2QFyyKXS40be7sXVYwu6njIaUIoA9J7FxO4gTbT2/IpiPuDFJiotqmkqkQIBQEWco8Amj6OZAjhj9St3OaVSkLLZXv7HugecuQTkhbrFVzOj2rkwonfY8ZpjrdkBWD7cQVC4idKh9CHsmnLYqlZ - foreman-proxy@centos7-luna.shu.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[]},\"pulp3\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"yum\"],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Discovery\",\"id\":20},{\"capabilities\":[],\"name\":\"Dynflow\",\"id\":18},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":21},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":22},{\"capabilities\":[],\"name\":\"SSH\",\"id\":19},{\"capabilities\":[\"pulp_certguard\",\"pulp_container\",\"pulp_deb\",\"pulp_file\",\"pulp_rpm\",\"pulpcore\"],\"name\":\"Pulpcore\",\"id\":4},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":10},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":9},{\"capabilities\":[],\"name\":\"Logs\",\"id\":14},{\"capabilities\":[],\"name\":\"Registration\",\"id\":17}]}]\n}\n" + [{\"created_at\":\"2024-09-04 05:16:16 UTC\",\"updated_at\":\"2024-09-17 07:05:17 + UTC\",\"hosts_count\":2,\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCq6I2A0Dgj/AZCjSXUdeY7BtxK65E66fgqNB83KMHHb1vzWXWyTtwebvN3C1F97Hg9LlFSnuW+xjnQb2JacrVSbvxRyvwHKIya5GGciCJpcDIF+07w6cw08zv7QMy9GYbkNggh5Xw7LK6dSfCYklkijIJHVLmrPWBsZNaDlybde/+RA7ZzFljpJdVsmlPvSDmHm4OC4t2oqbDL4vpd0i7kuDf+VwcJV5EZ2ZHBW9SGcbVGzKOa40PC7AshA7A0CkcbBzFLSWJsCoSXPE9vVwUFg8OcX41urwwOizOrow7VYMwHtwOXGHfXUBxbxMuW0xzhlNBw3PZ9LbEskMLpC6s3REhszncjH7OxQ/IdhNd3JbV9DcmZjwMD4MT16cI9pfND3NXx5SOc/ipaRHIxEt9flmVfVXm38aGAl5s2aVVg5AANfJRN/7Gvi/LNynHR21t18o9pru44SHKs6NpwCeqxqZDQ2zTS5BmF7BYVObTv5rQl4+vyqyEXjrwb9RyRyVM= + foreman-proxy@centos9-stream-katello-nightly.tanso.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"deb\",\"docker\",\"file\",\"python\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-09-04 + 05:14:25 UTC\",\"updated_at\":\"2024-09-04 05:14:25 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":2,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":3,\"created_at\":\"2024-09-04 + 06:20:57 UTC\",\"updated_at\":\"2024-09-04 06:20:57 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Empty + Organization\"},{\"id\":3,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":4,\"created_at\":\"2024-09-04 + 06:21:00 UTC\",\"updated_at\":\"2024-09-04 06:21:00 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-09-10 + 09:38:10 UTC\",\"updated_at\":\"2024-09-10 09:38:10 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Facts + Organization\"},{\"id\":6,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":7,\"created_at\":\"2024-09-26 + 17:32:15 UTC\",\"updated_at\":\"2024-09-26 17:32:15 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"delete_test\"},{\"id\":13,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":26,\"created_at\":\"2024-10-15 + 08:35:55 UTC\",\"updated_at\":\"2024-10-15 08:35:55 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org1\"},{\"id\":15,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":31,\"created_at\":\"2024-10-15 + 08:38:42 UTC\",\"updated_at\":\"2024-10-15 08:38:42 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org2\"}],\"features\":[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\",\"file\",\"python\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":22},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":23},{\"capabilities\":[\"ansible-runner\",\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":20}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3882' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -513,13 +512,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -530,8 +527,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1530' status: code: 200 message: OK @@ -552,13 +547,15 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"thulium_drake.motd\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":1,\"name\":\"thulium_drake.motd\",\"created_at\":\"2021-03-16 - 10:23:34 UTC\",\"updated_at\":\"2021-03-16 10:23:34 UTC\"}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"id\":1,\"name\":\"thulium_drake.motd\",\"created_at\":\"2024-10-15 + 08:49:29 UTC\",\"updated_at\":\"2024-10-15 08:49:29 UTC\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '298' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -572,13 +569,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -589,8 +584,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '298' status: code: 200 message: OK @@ -606,16 +599,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10/ansible_roles + uri: https://foreman.example.org/api/hostgroups/31/ansible_roles response: body: - string: '[{"id":1,"name":"thulium_drake.motd","created_at":"2021-03-16 10:23:34 - UTC","updated_at":"2021-03-16 10:23:34 UTC"}]' + string: '[{"id":1,"name":"thulium_drake.motd","created_at":"2024-10-15 08:49:29 + UTC","updated_at":"2024-10-15 08:49:29 UTC","inherited":false,"directly_assigned":true}]' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '159' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -629,13 +624,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -646,8 +639,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '116' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/luna_hostgroup-2.yml b/tests/test_playbooks/fixtures/luna_hostgroup-2.yml index e3847e0a0..687e163ae 100644 --- a/tests/test_playbooks/fixtures/luna_hostgroup-2.yml +++ b/tests/test_playbooks/fixtures/luna_hostgroup-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -72,14 +70,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2021-03-16 - 17:51:22 UTC\",\"updated_at\":\"2021-03-16 17:51:22 UTC\",\"id\":10,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos7-luna.shu.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_environment_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:49:57 UTC\",\"updated_at\":\"2024-10-15 08:49:57 UTC\",\"id\":31,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1629' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -93,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -110,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1647' status: code: 200 message: OK @@ -127,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/31?show_hidden_parameters=true response: body: - string: '{"content_source_id":null,"content_source_name":null,"content_view_id":null,"content_view_name":null,"lifecycle_environment_id":null,"lifecycle_environment_name":null,"kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-03-16 - 17:51:22 UTC","updated_at":"2021-03-16 17:51:22 UTC","id":10,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos7-luna.shu.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos7-luna.shu.example.com","id":1,"url":"https://centos7-luna.shu.example.com:9090"},"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":13,"name":"Bar","title":"Bar","description":null},{"id":3,"name":"Foo","title":"Foo","description":null},{"id":12,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":14,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":15,"name":"Test + string: '{"content_source_id":null,"content_source_name":null,"content_view_id":null,"content_view_name":null,"lifecycle_environment_id":null,"lifecycle_environment_name":null,"kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:49:57 UTC","updated_at":"2024-10-15 08:49:57 UTC","id":31,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos9-stream-katello-nightly.tanso.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos9-stream-katello-nightly.tanso.example.com","id":1,"url":"https://centos9-stream-katello-nightly.tanso.example.com:9090"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":30,"name":"Bar","title":"Bar","description":null},{"id":28,"name":"Foo","title":"Foo","description":null},{"id":29,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":31,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2062' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2140' status: code: 200 message: OK @@ -190,16 +184,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2021-03-16 - 17:51:17 UTC\",\"updated_at\":\"2021-03-16 17:51:17 UTC\",\"id\":14,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +224,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -250,16 +242,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2021-03-16 - 17:51:19 UTC\",\"updated_at\":\"2021-03-16 17:51:19 UTC\",\"id\":15,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:38:41 UTC\",\"updated_at\":\"2024-10-15 08:38:44 UTC\",\"id\":31,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -273,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -290,8 +282,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -312,13 +302,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 10:51:22 UTC\",\"updated_at\":\"2021-03-16 10:51:22 UTC\",\"id\":3,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:37 UTC\",\"updated_at\":\"2024-10-15 08:38:37 UTC\",\"id\":28,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -332,13 +324,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -349,8 +339,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '354' status: code: 200 message: OK @@ -371,13 +359,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"3\",\"parent_id\":3,\"parent_name\":\"Foo\",\"created_at\":\"2021-03-16 - 17:51:14 UTC\",\"updated_at\":\"2021-03-16 17:51:14 UTC\",\"id\":12,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"28\",\"parent_id\":28,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-15 + 08:38:38 UTC\",\"updated_at\":\"2024-10-15 08:38:38 UTC\",\"id\":29,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -391,13 +381,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -408,8 +396,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '360' status: code: 200 message: OK @@ -430,13 +416,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 17:51:15 UTC\",\"updated_at\":\"2021-03-16 17:51:15 UTC\",\"id\":13,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:40 UTC\",\"updated_at\":\"2024-10-15 08:38:40 UTC\",\"id\":30,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +438,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -467,8 +453,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -484,22 +468,37 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-luna.shu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos9-stream-katello-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos7-luna.shu.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"centos9-stream-katello-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2021-03-16 10:03:09 UTC\",\"updated_at\":\"2021-03-16 10:03:15 - UTC\",\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDR75cBKgge8EKlwZWAPjpdeE3uT/kV7c4NoGWButu5CwiOXV7tri8+af0DUi8wx9VjdPmxxJQDpo8NxA4dnEUlxDBsezKXdRj09da9c/fyI8no4AmcjgYyHpR2UnMLGXuxwVy9+fiLMhzeQWj6Mxp7mVv+73MfsYV+z3UFHW5H25YXiz2njbhG+gWAE8ozWWApt2QFyyKXS40be7sXVYwu6njIaUIoA9J7FxO4gTbT2/IpiPuDFJiotqmkqkQIBQEWco8Amj6OZAjhj9St3OaVSkLLZXv7HugecuQTkhbrFVzOj2rkwonfY8ZpjrdkBWD7cQVC4idKh9CHsmnLYqlZ - foreman-proxy@centos7-luna.shu.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[]},\"pulp3\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"yum\"],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Discovery\",\"id\":20},{\"capabilities\":[],\"name\":\"Dynflow\",\"id\":18},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":21},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":22},{\"capabilities\":[],\"name\":\"SSH\",\"id\":19},{\"capabilities\":[\"pulp_certguard\",\"pulp_container\",\"pulp_deb\",\"pulp_file\",\"pulp_rpm\",\"pulpcore\"],\"name\":\"Pulpcore\",\"id\":4},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":10},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":9},{\"capabilities\":[],\"name\":\"Logs\",\"id\":14},{\"capabilities\":[],\"name\":\"Registration\",\"id\":17}]}]\n}\n" + [{\"created_at\":\"2024-09-04 05:16:16 UTC\",\"updated_at\":\"2024-09-17 07:05:17 + UTC\",\"hosts_count\":2,\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCq6I2A0Dgj/AZCjSXUdeY7BtxK65E66fgqNB83KMHHb1vzWXWyTtwebvN3C1F97Hg9LlFSnuW+xjnQb2JacrVSbvxRyvwHKIya5GGciCJpcDIF+07w6cw08zv7QMy9GYbkNggh5Xw7LK6dSfCYklkijIJHVLmrPWBsZNaDlybde/+RA7ZzFljpJdVsmlPvSDmHm4OC4t2oqbDL4vpd0i7kuDf+VwcJV5EZ2ZHBW9SGcbVGzKOa40PC7AshA7A0CkcbBzFLSWJsCoSXPE9vVwUFg8OcX41urwwOizOrow7VYMwHtwOXGHfXUBxbxMuW0xzhlNBw3PZ9LbEskMLpC6s3REhszncjH7OxQ/IdhNd3JbV9DcmZjwMD4MT16cI9pfND3NXx5SOc/ipaRHIxEt9flmVfVXm38aGAl5s2aVVg5AANfJRN/7Gvi/LNynHR21t18o9pru44SHKs6NpwCeqxqZDQ2zTS5BmF7BYVObTv5rQl4+vyqyEXjrwb9RyRyVM= + foreman-proxy@centos9-stream-katello-nightly.tanso.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"deb\",\"docker\",\"file\",\"python\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-09-04 + 05:14:25 UTC\",\"updated_at\":\"2024-09-04 05:14:25 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":2,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":3,\"created_at\":\"2024-09-04 + 06:20:57 UTC\",\"updated_at\":\"2024-09-04 06:20:57 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Empty + Organization\"},{\"id\":3,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":4,\"created_at\":\"2024-09-04 + 06:21:00 UTC\",\"updated_at\":\"2024-09-04 06:21:00 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-09-10 + 09:38:10 UTC\",\"updated_at\":\"2024-09-10 09:38:10 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Facts + Organization\"},{\"id\":6,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":7,\"created_at\":\"2024-09-26 + 17:32:15 UTC\",\"updated_at\":\"2024-09-26 17:32:15 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"delete_test\"},{\"id\":13,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":26,\"created_at\":\"2024-10-15 + 08:35:55 UTC\",\"updated_at\":\"2024-10-15 08:35:55 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org1\"},{\"id\":15,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":31,\"created_at\":\"2024-10-15 + 08:38:42 UTC\",\"updated_at\":\"2024-10-15 08:38:42 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org2\"}],\"features\":[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\",\"file\",\"python\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":22},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":23},{\"capabilities\":[\"ansible-runner\",\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":20}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3882' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -513,13 +512,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -530,8 +527,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1530' status: code: 200 message: OK @@ -547,16 +542,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10/ansible_roles + uri: https://foreman.example.org/api/hostgroups/31/ansible_roles response: body: - string: '[{"id":1,"name":"thulium_drake.motd","created_at":"2021-03-16 10:23:34 - UTC","updated_at":"2021-03-16 10:23:34 UTC"}]' + string: '[{"id":1,"name":"thulium_drake.motd","created_at":"2024-10-15 08:49:29 + UTC","updated_at":"2024-10-15 08:49:29 UTC","inherited":false,"directly_assigned":true}]' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '159' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -570,13 +567,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -587,8 +582,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '116' status: code: 200 message: OK @@ -608,17 +601,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/api/hostgroups/10/assign_ansible_roles + uri: https://foreman.example.org/api/hostgroups/31/assign_ansible_roles response: body: - string: '{"id":10,"name":"New host group","created_at":"2021-03-16T17:51:22.493Z","updated_at":"2021-03-16T17:51:22.493Z","environment_id":null,"operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New - host group","realm_id":null,"compute_profile_id":null,"grub_pass":"","lookup_value_matcher":"hostgroup=New - host group","openscap_proxy_id":1,"subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null}' + string: '{"id":31,"name":"New host group","created_at":"2024-10-15T08:49:57.383Z","updated_at":"2024-10-15T08:49:57.383Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New + host group","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New + host group","subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null,"salt_proxy_id":null,"salt_environment_id":null,"openscap_proxy_id":1}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '650' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -632,15 +627,13 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=90 Location: - - https://centos7-luna/hostgroups/10-New%20host%20group + - https://centos9-stream-katello-nightly.tanso.example.com/hostgroups/31-New%20host%20group Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/luna_hostgroup-3.yml b/tests/test_playbooks/fixtures/luna_hostgroup-3.yml index f86f3d070..188fc3062 100644 --- a/tests/test_playbooks/fixtures/luna_hostgroup-3.yml +++ b/tests/test_playbooks/fixtures/luna_hostgroup-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -72,14 +70,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2021-03-16 - 17:51:22 UTC\",\"updated_at\":\"2021-03-16 17:51:22 UTC\",\"id\":10,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos7-luna.shu.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_environment_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:49:57 UTC\",\"updated_at\":\"2024-10-15 08:49:57 UTC\",\"id\":31,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1629' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -93,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -110,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1647' status: code: 200 message: OK @@ -127,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/31?show_hidden_parameters=true response: body: - string: '{"content_source_id":null,"content_source_name":null,"content_view_id":null,"content_view_name":null,"lifecycle_environment_id":null,"lifecycle_environment_name":null,"kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"environment_id":null,"environment_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2021-03-16 - 17:51:22 UTC","updated_at":"2021-03-16 17:51:22 UTC","id":10,"name":"New host - group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos7-luna.shu.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos7-luna.shu.example.com","id":1,"url":"https://centos7-luna.shu.example.com:9090"},"inherited_compute_profile_id":null,"inherited_environment_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"locations":[{"id":13,"name":"Bar","title":"Bar","description":null},{"id":3,"name":"Foo","title":"Foo","description":null},{"id":12,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":14,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":15,"name":"Test + string: '{"content_source_id":null,"content_source_name":null,"content_view_id":null,"content_view_name":null,"lifecycle_environment_id":null,"lifecycle_environment_name":null,"kickstart_repository_id":null,"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2024-10-15 + 08:49:57 UTC","updated_at":"2024-10-15 08:49:57 UTC","id":31,"name":"New host + group","title":"New host group","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"openscap_proxy_id":1,"openscap_proxy_name":"centos9-stream-katello-nightly.tanso.example.com","puppet_proxy":null,"puppet_ca_proxy":null,"openscap_proxy":{"name":"centos9-stream-katello-nightly.tanso.example.com","id":1,"url":"https://centos9-stream-katello-nightly.tanso.example.com:9090"},"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[],"template_combinations":[],"locations":[{"id":30,"name":"Bar","title":"Bar","description":null},{"id":28,"name":"Foo","title":"Foo","description":null},{"id":29,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":26,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":31,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2062' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2140' status: code: 200 message: OK @@ -190,16 +184,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2021-03-16 - 17:51:17 UTC\",\"updated_at\":\"2021-03-16 17:51:17 UTC\",\"id\":14,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org1\",\"created_at\":\"2024-10-15 + 08:35:54 UTC\",\"updated_at\":\"2024-10-15 08:35:57 UTC\",\"id\":26,\"name\":\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -230,8 +224,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -250,16 +242,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + string: "{\n \"total\": 7,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2021-03-16 - 17:51:19 UTC\",\"updated_at\":\"2021-03-16 17:51:19 UTC\",\"id\":15,\"name\":\"Test + null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Org2\",\"created_at\":\"2024-10-15 + 08:38:41 UTC\",\"updated_at\":\"2024-10-15 08:38:44 UTC\",\"id\":31,\"name\":\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '357' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -273,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -290,8 +282,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '357' status: code: 200 message: OK @@ -312,13 +302,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 10:51:22 UTC\",\"updated_at\":\"2021-03-16 10:51:22 UTC\",\"id\":3,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:37 UTC\",\"updated_at\":\"2024-10-15 08:38:37 UTC\",\"id\":28,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -332,13 +324,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -349,8 +339,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '354' status: code: 200 message: OK @@ -371,13 +359,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"3\",\"parent_id\":3,\"parent_name\":\"Foo\",\"created_at\":\"2021-03-16 - 17:51:14 UTC\",\"updated_at\":\"2021-03-16 17:51:14 UTC\",\"id\":12,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"28\",\"parent_id\":28,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-15 + 08:38:38 UTC\",\"updated_at\":\"2024-10-15 08:38:38 UTC\",\"id\":29,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -391,13 +381,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -408,8 +396,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '360' status: code: 200 message: OK @@ -430,13 +416,15 @@ interactions: body: string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2021-03-16 - 17:51:15 UTC\",\"updated_at\":\"2021-03-16 17:51:15 UTC\",\"id\":13,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-15 + 08:38:40 UTC\",\"updated_at\":\"2024-10-15 08:38:40 UTC\",\"id\":30,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -450,13 +438,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -467,8 +453,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -484,22 +468,37 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-luna.shu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos9-stream-katello-nightly.tanso.example.com%22&per_page=4294967296 response: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"centos7-luna.shu.example.com\\\"\",\n + 4294967296,\n \"search\": \"name=\\\"centos9-stream-katello-nightly.tanso.example.com\\\"\",\n \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"created_at\":\"2021-03-16 10:03:09 UTC\",\"updated_at\":\"2021-03-16 10:03:15 - UTC\",\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDR75cBKgge8EKlwZWAPjpdeE3uT/kV7c4NoGWButu5CwiOXV7tri8+af0DUi8wx9VjdPmxxJQDpo8NxA4dnEUlxDBsezKXdRj09da9c/fyI8no4AmcjgYyHpR2UnMLGXuxwVy9+fiLMhzeQWj6Mxp7mVv+73MfsYV+z3UFHW5H25YXiz2njbhG+gWAE8ozWWApt2QFyyKXS40be7sXVYwu6njIaUIoA9J7FxO4gTbT2/IpiPuDFJiotqmkqkQIBQEWco8Amj6OZAjhj9St3OaVSkLLZXv7HugecuQTkhbrFVzOj2rkwonfY8ZpjrdkBWD7cQVC4idKh9CHsmnLYqlZ - foreman-proxy@centos7-luna.shu.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":{\"pulp2\":{\"supported_types\":[]},\"pulp3\":{\"supported_types\":[\"deb\",\"docker\",\"file\",\"yum\"],\"overriden_to_pulp2\":[]}},\"features\":[{\"capabilities\":[],\"name\":\"Discovery\",\"id\":20},{\"capabilities\":[],\"name\":\"Dynflow\",\"id\":18},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":21},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":22},{\"capabilities\":[],\"name\":\"SSH\",\"id\":19},{\"capabilities\":[\"pulp_certguard\",\"pulp_container\",\"pulp_deb\",\"pulp_file\",\"pulp_rpm\",\"pulpcore\"],\"name\":\"Pulpcore\",\"id\":4},{\"capabilities\":[],\"name\":\"Puppet - CA\",\"id\":10},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":9},{\"capabilities\":[],\"name\":\"Logs\",\"id\":14},{\"capabilities\":[],\"name\":\"Registration\",\"id\":17}]}]\n}\n" + [{\"created_at\":\"2024-09-04 05:16:16 UTC\",\"updated_at\":\"2024-09-17 07:05:17 + UTC\",\"hosts_count\":2,\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\",\"remote_execution_pubkey\":\"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQCq6I2A0Dgj/AZCjSXUdeY7BtxK65E66fgqNB83KMHHb1vzWXWyTtwebvN3C1F97Hg9LlFSnuW+xjnQb2JacrVSbvxRyvwHKIya5GGciCJpcDIF+07w6cw08zv7QMy9GYbkNggh5Xw7LK6dSfCYklkijIJHVLmrPWBsZNaDlybde/+RA7ZzFljpJdVsmlPvSDmHm4OC4t2oqbDL4vpd0i7kuDf+VwcJV5EZ2ZHBW9SGcbVGzKOa40PC7AshA7A0CkcbBzFLSWJsCoSXPE9vVwUFg8OcX41urwwOizOrow7VYMwHtwOXGHfXUBxbxMuW0xzhlNBw3PZ9LbEskMLpC6s3REhszncjH7OxQ/IdhNd3JbV9DcmZjwMD4MT16cI9pfND3NXx5SOc/ipaRHIxEt9flmVfVXm38aGAl5s2aVVg5AANfJRN/7Gvi/LNynHR21t18o9pru44SHKs6NpwCeqxqZDQ2zTS5BmF7BYVObTv5rQl4+vyqyEXjrwb9RyRyVM= + foreman-proxy@centos9-stream-katello-nightly.tanso.example.com\",\"download_policy\":\"on_demand\",\"supported_pulp_types\":[\"ansible_collection\",\"deb\",\"docker\",\"file\",\"python\",\"yum\"],\"lifecycle_environments\":[{\"id\":1,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":1,\"created_at\":\"2024-09-04 + 05:14:25 UTC\",\"updated_at\":\"2024-09-04 05:14:25 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Default + Organization\"},{\"id\":2,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":3,\"created_at\":\"2024-09-04 + 06:20:57 UTC\",\"updated_at\":\"2024-09-04 06:20:57 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Empty + Organization\"},{\"id\":3,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":4,\"created_at\":\"2024-09-04 + 06:21:00 UTC\",\"updated_at\":\"2024-09-04 06:21:00 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Organization\"},{\"id\":5,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":6,\"created_at\":\"2024-09-10 + 09:38:10 UTC\",\"updated_at\":\"2024-09-10 09:38:10 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Facts + Organization\"},{\"id\":6,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":7,\"created_at\":\"2024-09-26 + 17:32:15 UTC\",\"updated_at\":\"2024-09-26 17:32:15 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"delete_test\"},{\"id\":13,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":26,\"created_at\":\"2024-10-15 + 08:35:55 UTC\",\"updated_at\":\"2024-10-15 08:35:55 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org1\"},{\"id\":15,\"name\":\"Library\",\"description\":null,\"library\":true,\"organization_id\":31,\"created_at\":\"2024-10-15 + 08:38:42 UTC\",\"updated_at\":\"2024-10-15 08:38:42 UTC\",\"label\":\"Library\",\"registry_name_pattern\":null,\"registry_unauthenticated_pull\":false,\"prior\":null,\"prior_id\":null,\"organization\":\"Test + Org2\"}],\"features\":[{\"capabilities\":[\"ansible\",\"certguard\",\"container\",\"core\",\"deb\",\"file\",\"python\",\"rpm\"],\"name\":\"Pulpcore\",\"id\":3},{\"capabilities\":[],\"name\":\"Logs\",\"id\":13},{\"capabilities\":[\"cockpit\"],\"name\":\"Script\",\"id\":19},{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":9},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":22},{\"capabilities\":[],\"name\":\"DNS\",\"id\":7},{\"capabilities\":[],\"name\":\"Openscap\",\"id\":23},{\"capabilities\":[\"ansible-runner\",\"single\",\"ssh\"],\"name\":\"Dynflow\",\"id\":17},{\"capabilities\":[],\"name\":\"Ansible\",\"id\":20}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '3882' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -513,13 +512,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -530,8 +527,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1530' status: code: 200 message: OK @@ -547,7 +542,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/hostgroups/10/ansible_roles + uri: https://foreman.example.org/api/hostgroups/31/ansible_roles response: body: string: '[]' @@ -556,6 +551,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '2' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -569,13 +566,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -586,8 +581,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '2' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/luna_hostgroup-4.yml b/tests/test_playbooks/fixtures/luna_hostgroup-4.yml index b71e17dc9..e23fb21be 100644 --- a/tests/test_playbooks/fixtures/luna_hostgroup-4.yml +++ b/tests/test_playbooks/fixtures/luna_hostgroup-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -72,14 +70,16 @@ interactions: body: string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"title=\\\"New host group\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"environment_id\":null,\"environment_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2021-03-16 - 17:51:22 UTC\",\"updated_at\":\"2021-03-16 17:51:22 UTC\",\"id\":10,\"name\":\"New - host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos7-luna.shu.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos7-luna.shu.example.com\",\"id\":1,\"url\":\"https://centos7-luna.shu.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_environment_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"subnet_id\":null,\"subnet_name\":null,\"operatingsystem_id\":null,\"operatingsystem_name\":null,\"domain_id\":null,\"domain_name\":null,\"compute_profile_id\":null,\"compute_profile_name\":null,\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"ptable_id\":null,\"ptable_name\":null,\"medium_id\":null,\"medium_name\":null,\"pxe_loader\":null,\"subnet6_id\":null,\"subnet6_name\":null,\"compute_resource_id\":null,\"compute_resource_name\":null,\"architecture_id\":null,\"architecture_name\":null,\"realm_id\":null,\"realm_name\":null,\"created_at\":\"2024-10-15 + 08:49:57 UTC\",\"updated_at\":\"2024-10-15 08:49:57 UTC\",\"id\":31,\"name\":\"New + host group\",\"title\":\"New host group\",\"description\":null,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"openscap_proxy_id\":1,\"openscap_proxy_name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"openscap_proxy\":{\"name\":\"centos9-stream-katello-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://centos9-stream-katello-nightly.tanso.example.com:9090\"},\"inherited_compute_profile_id\":null,\"inherited_domain_id\":null,\"inherited_puppet_proxy_id\":null,\"inherited_puppet_ca_proxy_id\":null,\"inherited_compute_resource_id\":null,\"inherited_operatingsystem_id\":null,\"inherited_architecture_id\":null,\"inherited_medium_id\":null,\"inherited_ptable_id\":null,\"inherited_subnet_id\":null,\"inherited_subnet6_id\":null,\"inherited_realm_id\":null,\"inherited_pxe_loader\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1629' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -93,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -110,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1647' status: code: 200 message: OK @@ -129,17 +125,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/hostgroups/10 + uri: https://foreman.example.org/api/hostgroups/31 response: body: - string: '{"id":10,"name":"New host group","created_at":"2021-03-16T17:51:22.493Z","updated_at":"2021-03-16T17:51:22.493Z","environment_id":null,"operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New - host group","realm_id":null,"compute_profile_id":null,"grub_pass":"","lookup_value_matcher":"hostgroup=New - host group","openscap_proxy_id":1,"subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null}' + string: '{"id":31,"name":"New host group","created_at":"2024-10-15T08:49:57.383Z","updated_at":"2024-10-15T08:49:57.383Z","operatingsystem_id":null,"architecture_id":null,"medium_id":null,"ptable_id":null,"root_pass":null,"puppet_ca_proxy_id":null,"use_image":null,"image_file":"","ancestry":null,"vm_defaults":null,"subnet_id":null,"domain_id":null,"puppet_proxy_id":null,"title":"New + host group","realm_id":null,"compute_profile_id":null,"grub_pass":null,"lookup_value_matcher":"hostgroup=New + host group","subnet6_id":null,"pxe_loader":null,"description":null,"compute_resource_id":null,"salt_proxy_id":null,"salt_environment_id":null,"openscap_proxy_id":1}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '650' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '622' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/luna_hostgroup-5.yml b/tests/test_playbooks/fixtures/luna_hostgroup-5.yml index 424569ee6..b758ecb58 100644 --- a/tests/test_playbooks/fixtures/luna_hostgroup-5.yml +++ b/tests/test_playbooks/fixtures/luna_hostgroup-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.5.0-develop","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '70' status: code: 200 message: OK @@ -78,6 +76,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '181' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.5.0-develop + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '181' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/resource_info-0.yml b/tests/test_playbooks/fixtures/resource_info-0.yml index 8085be329..966ae8ca7 100644 --- a/tests/test_playbooks/fixtures/resource_info-0.yml +++ b/tests/test_playbooks/fixtures/resource_info-0.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:43 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=a126f6c4c85f96d4b8c4d538838d449c; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - a2cdb87f-2061-4eb0-ab7b-a6a895c5e057 - x-runtime: - - '0.105805' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,52 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=a126f6c4c85f96d4b8c4d538838d449c User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/settings?per_page=4294967296&search=name+%3D+http_proxy + uri: https://foreman.example.org/api/settings?search=name+%3D+http_proxy&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 135,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name = http_proxy\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"value\":null,\"description\":\"Sets - a proxy for all outgoing HTTP connections.\",\"category\":\"Setting::General\",\"settings_type\":null,\"default\":null,\"created_at\":\"2019-10-18 - 08:35:25 UTC\",\"updated_at\":\"2019-10-18 08:35:25 UTC\",\"id\":11,\"name\":\"http_proxy\",\"full_name\":\"HTTP(S) - proxy\",\"category_name\":\"General\"}]\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name = http_proxy\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"description\":\"Set a + proxy for all outgoing HTTP(S) connections from Foreman. System-wide proxies + must be configured at the operating system level.\",\"settings_type\":null,\"default\":null,\"updated_at\":null,\"id\":\"http_proxy\",\"name\":\"http_proxy\",\"full_name\":\"HTTP(S) + proxy\",\"value\":null,\"category\":\"general\",\"category_name\":\"General\",\"readonly\":false,\"config_file\":null,\"encrypted\":false,\"select_values\":null}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '480' - content-security-policy: + Content-Length: + - '579' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:43 GMT - etag: - - W/"2c9ad527f2fde387381ba7e9b3cf97c6-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 75384dfa-3738-47c6-aa81-841a93fe775d - x-runtime: - - '0.017151' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-1.yml b/tests/test_playbooks/fixtures/resource_info-1.yml index 6d68da70a..00a93f457 100644 --- a/tests/test_playbooks/fixtures/resource_info-1.yml +++ b/tests/test_playbooks/fixtures/resource_info-1.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=9019c95e4f41ab6ce2a6328805e6430b; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 56967311-f69f-48a2-8e4c-8b55f049d2af - x-runtime: - - '0.104241' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,67 +62,49 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=9019c95e4f41ab6ce2a6328805e6430b User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/subnets?per_page=4294967296&search= + uri: https://foreman.example.org/api/http_proxies?per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": []\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '157' - content-security-policy: + Content-Length: + - '159' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"40a0449a96292ac57dbe10f6cd6b803f-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 46b4d8c8-5b8f-498c-99f4-309e49d4e259 - x-runtime: - - '0.014897' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-2.yml b/tests/test_playbooks/fixtures/resource_info-2.yml index 3fdc4fd62..caf59a26a 100644 --- a/tests/test_playbooks/fixtures/resource_info-2.yml +++ b/tests/test_playbooks/fixtures/resource_info-2.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=71f8f43250e23094d5efa700350f0f82; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - c4cb2a52-3b5e-4fdc-9a85-33561a87b5e5 - x-runtime: - - '0.103725' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,51 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=71f8f43250e23094d5efa700350f0f82 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations?per_page=4294967296&search=name%3D%22Test+Organization%22 + uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-29 - 12:01:40 UTC\",\"updated_at\":\"2019-11-29 12:01:40 UTC\",\"id\":47,\"name\":\"Test + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-09-10 + 09:43:47 UTC\",\"updated_at\":\"2024-09-10 09:43:47 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '413' - content-security-policy: + Content-Length: + - '412' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"b9429d1d6ba5f213c78314f2e086bca4-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 687e73d9-d361-473d-8e37-2f5d60aca46c - x-runtime: - - '0.016046' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -155,90 +120,163 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=71f8f43250e23094d5efa700350f0f82 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations/47 + uri: https://foreman.example.org/api/organizations/5 response: body: - string: !!python/unicode '{"select_all_types":[],"description":"A test organization","created_at":"2019-11-29 - 12:01:40 UTC","updated_at":"2019-11-29 12:01:40 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":47,"name":"Test - Organization","title":"Test Organization","users":[],"smart_proxies":[],"subnets":[],"compute_resources":[],"media":[],"config_templates":[],"ptables":[{"os_family":"Suse","created_at":"2019-10-18 - 08:35:40 UTC","updated_at":"2019-10-18 08:35:40 UTC","name":"AutoYaST entire - SCSI disk","id":97},{"os_family":"Suse","created_at":"2019-10-18 08:35:40 - UTC","updated_at":"2019-10-18 08:35:40 UTC","name":"AutoYaST entire virtual - disk","id":98},{"os_family":"Suse","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"AutoYaST LVM","id":99},{"os_family":"Coreos","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"CoreOS default - fake","id":100},{"os_family":"Rancheros","created_at":"2019-10-18 08:35:41 - UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Empty","id":101},{"os_family":"Freebsd","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"FreeBSD default - fake","id":102},{"os_family":"Solaris","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"Jumpstart default","id":103},{"os_family":"Solaris","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Jumpstart mirrored","id":104},{"os_family":"Junos","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Junos default - fake","id":105},{"os_family":"Redhat","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"Kickstart default","id":106},{"os_family":"Redhat","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Kickstart default - thin","id":107},{"os_family":"NXOS","created_at":"2019-10-18 08:35:41 UTC","updated_at":"2019-10-18 - 08:35:41 UTC","name":"NX-OS default fake","id":108},{"os_family":"Debian","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Preseed default","id":109},{"os_family":"Debian","created_at":"2019-10-18 - 08:35:41 UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"Preseed default - LVM","id":110},{"os_family":"Xenserver","created_at":"2019-10-18 08:35:41 - UTC","updated_at":"2019-10-18 08:35:41 UTC","name":"XenServer default","id":111}],"provisioning_templates":[],"domains":[{"id":12,"name":"test.invalid"}],"realms":[],"environments":[],"hostgroups":[],"locations":[{"id":2,"name":"Default - Location","title":"Default Location","description":null}],"hosts_count":0,"parameters":[]}' + string: '{"select_all_types":[],"description":"A test organization","created_at":"2024-09-10 + 09:43:47 UTC","updated_at":"2024-09-10 09:43:47 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":5,"name":"Test + Organization","title":"Test Organization","users":[],"smart_proxies":[],"subnets":[],"compute_resources":[],"media":[],"ptables":[{"description":null,"os_family":"Suse","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"AutoYaST entire + SCSI disk","id":132,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"AutoYaST entire + virtual disk","id":133,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"AutoYaST LVM","id":134,"inherited":false},{"description":null,"os_family":"Coreos","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"CoreOS default + fake","id":135,"inherited":false},{"description":null,"os_family":"Rancheros","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Empty","id":136,"inherited":false},{"description":null,"os_family":"Freebsd","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"FreeBSD default + fake","id":137,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Jumpstart default","id":138,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Jumpstart mirrored","id":139,"inherited":false},{"description":null,"os_family":"Junos","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Junos default + fake","id":140,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart custom","id":141,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart default","id":142,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart default + encrypted","id":143,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart default + thin","id":144,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Kickstart dynamic","id":145,"inherited":false},{"description":null,"os_family":"NXOS","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"NX-OS default + fake","id":146,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default","id":147,"inherited":false},{"description":"Preseed + Autoinstall default storage snippet configures drives automatically\nwith + LVM. The snippet is automatically indented by 2 spaces. For reference:\nhttps://ubuntu.com/server/docs/install/autoinstall-reference","os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default + autoinstall","id":148,"inherited":false},{"description":"Preseed Autoinstall + default storage snippet configures drives automatically\nwith LVM and disk + encryption.\nRequires Ubuntu >= 22.04.3.\nThe snippet is automatically indented + by 2 spaces. For reference:\nhttps://ubuntu.com/server/docs/install/autoinstall-reference","os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default + autoinstall encrypted","id":149,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Preseed default + LVM","id":150,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Windows default + GPT EFI partition table","id":152,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"Windows default + partition table","id":151,"inherited":false},{"description":null,"os_family":"Xenserver","created_at":"2024-08-29 + 12:25:02 UTC","updated_at":"2024-08-29 12:25:02 UTC","name":"XenServer default","id":153,"inherited":false}],"provisioning_templates":[{"id":50,"name":"Alterator + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":32,"name":"Alterator + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":13,"name":"Alterator + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":69,"name":"alterator_pkglist","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":71,"name":"ansible_provisioning_callback","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":73,"name":"ansible_tower_callback_script","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":75,"name":"ansible_tower_callback_service","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":51,"name":"AutoYaST + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":41,"name":"AutoYaST + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":2,"name":"AutoYaST + default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":7,"name":"AutoYaST + default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":14,"name":"AutoYaST + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":125,"name":"AutoYaST + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":52,"name":"AutoYaST + SLES default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":77,"name":"blacklist_kernel_modules","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":78,"name":"bmc_nic_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":79,"name":"built","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":80,"name":"ca_registration","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":81,"name":"chef_client","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":31,"name":"CloudInit + default","template_kind_id":12,"template_kind_name":"cloud-init","inherited":false},{"id":82,"name":"coreos_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":53,"name":"CoreOS + provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":15,"name":"CoreOS + PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":83,"name":"create_users","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":84,"name":"csr_attributes.yaml","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":85,"name":"disk_enc_clevis_tang","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":86,"name":"efibootmgr_netboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":87,"name":"eject_cdrom","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":88,"name":"epel","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":89,"name":"fips_packages","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":90,"name":"fix_hosts","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":63,"name":"foreman_ca_refresh","template_kind_id":16,"template_kind_name":"public","inherited":false},{"id":64,"name":"foreman_raw_ca","template_kind_id":16,"template_kind_name":"public","inherited":false},{"id":33,"name":"FreeBSD + (mfsBSD) finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":54,"name":"FreeBSD + (mfsBSD) provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":16,"name":"FreeBSD + (mfsBSD) PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":91,"name":"freeipa_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":65,"name":"Global + Registration","template_kind_id":13,"template_kind_name":"registration","inherited":false},{"id":67,"name":"Grubby + default","template_kind_id":8,"template_kind_name":"script","inherited":false},{"id":92,"name":"http_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":93,"name":"insights","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":42,"name":"iPXE + default local boot","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":43,"name":"iPXE + global default","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":44,"name":"iPXE + intermediate script","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":55,"name":"Jumpstart + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":34,"name":"Jumpstart + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":3,"name":"Jumpstart + default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":35,"name":"Junos + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":56,"name":"Junos + default SLAX","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":30,"name":"Junos + default ZTP config","template_kind_id":10,"template_kind_name":"ZTP","inherited":false},{"id":57,"name":"Kickstart + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":36,"name":"Kickstart + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":45,"name":"Kickstart + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":4,"name":"Kickstart + default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":8,"name":"Kickstart + default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":17,"name":"Kickstart + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":126,"name":"Kickstart + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":97,"name":"kickstart_ifcfg_bonded_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":95,"name":"kickstart_ifcfg_bond_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":99,"name":"kickstart_ifcfg_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":101,"name":"kickstart_ifcfg_get_identifier_names","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":102,"name":"kickstart_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":104,"name":"kickstart_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":103,"name":"kickstart_network_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":58,"name":"Kickstart + oVirt-RHVH","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":18,"name":"Kickstart + oVirt-RHVH PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":105,"name":"kickstart_rhsm","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":40,"name":"Linux + host_init_config default","template_kind_id":1,"template_kind_name":"host_init_config","inherited":false},{"id":106,"name":"ntp","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":1,"name":"NX-OS + default POAP setup","template_kind_id":11,"template_kind_name":"POAP","inherited":false},{"id":107,"name":"pkg_manager","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":108,"name":"preseed_autoinstall_clevis_tang_wrapper","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":127,"name":"Preseed + Autoinstall cloud-init user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":59,"name":"Preseed + default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":37,"name":"Preseed + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":46,"name":"Preseed + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":47,"name":"Preseed + default iPXE Autoinstall","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":9,"name":"Preseed + default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":10,"name":"Preseed + default PXEGrub2 Autoinstall","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":19,"name":"Preseed + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":20,"name":"Preseed + default PXELinux Autoinstall","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":128,"name":"Preseed + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":109,"name":"preseed_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":111,"name":"preseed_kernel_options_autoinstall","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":113,"name":"preseed_netplan_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":114,"name":"preseed_netplan_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":115,"name":"preseed_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":116,"name":"puppet.conf","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":118,"name":"puppetlabs_repo","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":117,"name":"puppet_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":98,"name":"pxegrub2_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":11,"name":"PXEGrub2 + default local boot","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":96,"name":"pxegrub2_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":12,"name":"PXEGrub2 + global default","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":100,"name":"pxegrub2_mac","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":110,"name":"pxegrub_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":5,"name":"PXEGrub + default local boot","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":112,"name":"pxegrub_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":6,"name":"PXEGrub + global default","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":21,"name":"PXELinux + chain iPXE","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":22,"name":"PXELinux + chain iPXE UNDI","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":70,"name":"pxelinux_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":23,"name":"PXELinux + default local boot","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":24,"name":"PXELinux + default memdisk","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":72,"name":"pxelinux_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":25,"name":"PXELinux + global default","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":74,"name":"rancheros_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":60,"name":"RancherOS + provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":26,"name":"RancherOS + PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":119,"name":"redhat_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":66,"name":"remote_execution_pull_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":120,"name":"remote_execution_ssh_keys","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":121,"name":"saltstack_minion","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":122,"name":"saltstack_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":123,"name":"schedule_reboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":124,"name":"subscription_manager_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":129,"name":"UserData + default","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":130,"name":"UserData + open-vm-tools","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":27,"name":"WAIK + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":38,"name":"Windows + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":48,"name":"Windows + default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":49,"name":"Windows + default iPXE httpboot","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":61,"name":"Windows + default provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":28,"name":"Windows + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":131,"name":"Windows + default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":76,"name":"windows_network","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":68,"name":"Windows + peSetup.cmd","template_kind_id":8,"template_kind_name":"script","inherited":false},{"id":62,"name":"XenServer + default answerfile","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":39,"name":"XenServer + default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":29,"name":"XenServer + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":94,"name":"yum_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false}],"domains":[{"id":4,"name":"test.invalid","inherited":false}],"realms":[],"hostgroups":[],"locations":[{"id":2,"name":"Default + Location","title":"Default Location","description":null}],"hosts_count":0,"parameters":[],"deprecations":{"environments":"Environments + got deprecated from this endpoint."}}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '2675' - content-security-policy: + Content-Length: + - '19581' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:44 GMT - etag: - - W/"8f57b0e8e6f05268ba2119503fb4c478-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=98 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=98 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - e3a682d3-43a9-47cb-9fd8-b2df7d4456c6 - x-runtime: - - '0.050641' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-3.yml b/tests/test_playbooks/fixtures/resource_info-3.yml index d230e798f..41a373003 100644 --- a/tests/test_playbooks/fixtures/resource_info-3.yml +++ b/tests/test_playbooks/fixtures/resource_info-3.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=0167d8d957fbfda5a2a4e53bc4b26f47; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 1f10448c-f2e9-483c-ac89-d49b7b38a1bc - x-runtime: - - '0.105797' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,51 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=0167d8d957fbfda5a2a4e53bc4b26f47 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations?per_page=4294967296&search=name%3D%22Facts+Organization%22 + uri: https://foreman.example.org/api/organizations?search=name%3D%22Facts+Organization%22&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-29 - 12:01:41 UTC\",\"updated_at\":\"2019-11-29 12:01:41 UTC\",\"id\":48,\"name\":\"Facts + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-09-10 + 09:43:48 UTC\",\"updated_at\":\"2024-09-10 09:43:48 UTC\",\"id\":6,\"name\":\"Facts Organization\",\"title\":\"Facts Organization\",\"description\":\"A test organization\"}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '416' - content-security-policy: + Content-Length: + - '415' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"aa4fd744f20c7214225557e6a00911ae-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - a6d6592f-9a38-4d5e-a1b6-776844cb05c1 - x-runtime: - - '0.015348' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -155,68 +120,50 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=0167d8d957fbfda5a2a4e53bc4b26f47 User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations/48/domains?per_page=4294967296&search= + uri: https://foreman.example.org/api/organizations/6/domains?per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2019-11-29 - 12:01:42 UTC\",\"updated_at\":\"2019-11-29 12:01:42 UTC\",\"id\":13,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-09-10 + 09:43:49 UTC\",\"updated_at\":\"2024-09-10 09:43:49 UTC\",\"id\":5,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '308' - content-security-policy: + Content-Length: + - '309' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"6b83030626ae6723434e1a35470bb412-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: - - 48; Facts Organization - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=98 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_current_organization: + - 6; Facts Organization + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=98 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - bb3c4385-24f3-4082-a1b4-a18c4caaaf34 - x-runtime: - - '0.030504' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-4.yml b/tests/test_playbooks/fixtures/resource_info-4.yml index 83d24c673..6fb71190d 100644 --- a/tests/test_playbooks/fixtures/resource_info-4.yml +++ b/tests/test_playbooks/fixtures/resource_info-4.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:45 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=57e22429830a3888a1cee6f6b4927e9d; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - cb7813be-2c86-47a6-9106-df1f48b4c0a6 - x-runtime: - - '0.103520' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,70 +62,51 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=57e22429830a3888a1cee6f6b4927e9d User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations?per_page=4294967296&search=name%3D%22Facts+Organization%22 + uri: https://foreman.example.org/api/organizations?search=name%3D%22Facts+Organization%22&per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n - \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": - [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2019-11-29 - 12:01:41 UTC\",\"updated_at\":\"2019-11-29 12:01:41 UTC\",\"id\":48,\"name\":\"Facts + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Facts Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-09-10 + 09:43:48 UTC\",\"updated_at\":\"2024-09-10 09:43:48 UTC\",\"id\":6,\"name\":\"Facts Organization\",\"title\":\"Facts Organization\",\"description\":\"A test organization\"}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '416' - content-security-policy: + Content-Length: + - '415' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:46 GMT - etag: - - W/"aa4fd744f20c7214225557e6a00911ae-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - e7bf5bd4-8691-4b76-a1e6-7a22c764670e - x-runtime: - - '0.016235' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-5.yml b/tests/test_playbooks/fixtures/resource_info-5.yml index 6131355e5..8e98e0550 100644 --- a/tests/test_playbooks/fixtures/resource_info-5.yml +++ b/tests/test_playbooks/fixtures/resource_info-5.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:46 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=2f16a9a9469b1af2a9c7a5378520836a; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 6c6386b0-0b3a-4781-802e-a65b03455651 - x-runtime: - - '0.103576' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 @@ -78,68 +62,50 @@ interactions: - gzip, deflate Connection: - keep-alive - Cookie: - - _session_id=2f16a9a9469b1af2a9c7a5378520836a User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/organizations/48/domains?per_page=4294967296&search= + uri: https://foreman.example.org/api/organizations/6/domains?per_page=4294967296 response: body: - string: !!python/unicode "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": - 1,\n \"per_page\": 4294967296,\n \"search\": \"\",\n \"sort\": {\n \"by\": - null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2019-11-29 - 12:01:42 UTC\",\"updated_at\":\"2019-11-29 12:01:42 UTC\",\"id\":13,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": null,\n \"sort\": {\n \"by\": null,\n \"order\": + null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-09-10 + 09:43:49 UTC\",\"updated_at\":\"2024-09-10 09:43:49 UTC\",\"id\":5,\"name\":\"facts.invalid\",\"dns_id\":null,\"dns\":null}]\n}\n" headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '308' - content-security-policy: + Content-Length: + - '309' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:46 GMT - etag: - - W/"6b83030626ae6723434e1a35470bb412-gzip" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: - - 48; Facts Organization - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=99 - server: - - Apache - status: - - 200 OK - strict-transport-security: + Foreman_current_organization: + - 6; Facts Organization + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=99 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - vary: - - Accept-Encoding - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - f8716811-8a0f-470b-b53b-29e6bc179b9e - x-runtime: - - '0.030529' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/resource_info-6.yml b/tests/test_playbooks/fixtures/resource_info-6.yml index 6079ed89d..a2f9d5701 100644 --- a/tests/test_playbooks/fixtures/resource_info-6.yml +++ b/tests/test_playbooks/fixtures/resource_info-6.yml @@ -11,60 +11,44 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://centos7-foreman-1-23.yatsu.example.com/api/status + uri: https://foreman.example.org/api/status response: body: - string: !!python/unicode '{"result":"ok","status":200,"version":"1.23.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: - cache-control: + Cache-Control: - max-age=0, private, must-revalidate - connection: + Connection: - Keep-Alive - content-length: - - '63' - content-security-policy: + Content-Length: + - '71' + Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data: *.gravatar.com; script-src ''unsafe-eval'' ''unsafe-inline'' - ''self''; style-src ''unsafe-inline'' ''self''' - content-type: + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + Content-Type: - application/json; charset=utf-8 - date: - - Fri, 29 Nov 2019 12:01:47 GMT - etag: - - W/"f26fab35869f9a602399f2f56dc6b2ef" - foreman_api_version: + Foreman_api_version: - '2' - foreman_current_location: + Foreman_current_location: - ; ANY - foreman_current_organization: + Foreman_current_organization: - ; ANY - foreman_version: - - 1.23.1 - keep-alive: - - timeout=5, max=100 - server: - - Apache - set-cookie: - - _session_id=db59188effe0a762ff761883f5410c2e; path=/; secure; HttpOnly; SameSite=Lax - status: - - 200 OK - strict-transport-security: + Foreman_version: + - 3.13.0-develop + Keep-Alive: + - timeout=15, max=100 + Strict-Transport-Security: - max-age=631139040; includeSubdomains - x-content-type-options: + X-Content-Type-Options: - nosniff - x-download-options: + X-Download-Options: - noopen - x-frame-options: + X-Frame-Options: - sameorigin - x-permitted-cross-domain-policies: + X-Permitted-Cross-Domain-Policies: - none - x-powered-by: - - Phusion Passenger 4.0.53 - x-request-id: - - 08de75b2-017f-4b50-ade1-9424c7b88875 - x-runtime: - - '0.104098' - x-xss-protection: + X-XSS-Protection: - 1; mode=block status: code: 200 diff --git a/tests/test_playbooks/fixtures/subnet-0.yml b/tests/test_playbooks/fixtures/subnet-0.yml index 74918c4f0..aa0abae2a 100644 --- a/tests/test_playbooks/fixtures/subnet-0.yml +++ b/tests/test_playbooks/fixtures/subnet-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK @@ -136,16 +132,18 @@ interactions: uri: https://foreman.example.org/api/subnets response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":48,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":49,"name":"subnet_param2","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value2"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1261' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -159,13 +157,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/subnet-1.yml b/tests/test_playbooks/fixtures/subnet-1.yml index 7bc6f2d28..41b3dfdd5 100644 --- a/tests/test_playbooks/fixtures/subnet-1.yml +++ b/tests/test_playbooks/fixtures/subnet-1.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:10 UTC\",\"updated_at\":\"2020-09-03 06:57:10 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":30,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:43 UTC\",\"updated_at\":\"2024-10-08 14:38:43 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":10,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -135,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":48,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":49,"name":"subnet_param2","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value2"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1261' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1105' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-10.yml b/tests/test_playbooks/fixtures/subnet-10.yml index 4212e4092..8527896b0 100644 --- a/tests/test_playbooks/fixtures/subnet-10.yml +++ b/tests/test_playbooks/fixtures/subnet-10.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:16 UTC\",\"updated_at\":\"2020-09-03 06:57:16 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":31,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:47 UTC\",\"updated_at\":\"2024-10-08 14:38:47 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":11,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -137,17 +125,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/subnets/31 + uri: https://foreman.example.org/api/subnets/11 response: body: - string: '{"id":31,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test - Subnet","vlanid":null,"created_at":"2020-09-03T06:57:16.731Z","updated_at":"2020-09-03T06:57:16.731Z","dhcp_id":null,"tftp_id":null,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":null,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"to_label":"Test + string: '{"id":11,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test + Subnet","vlanid":null,"created_at":"2024-10-08T14:38:47.738Z","updated_at":"2024-10-08T14:38:47.738Z","dhcp_id":null,"tftp_id":null,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":null,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"bmc_id":null,"to_label":"Test Subnet (192.168.200.0/27)","type":"Subnet::Ipv4"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '559' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '545' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-11.yml b/tests/test_playbooks/fixtures/subnet-11.yml index 4678aa943..1e0b30d86 100644 --- a/tests/test_playbooks/fixtures/subnet-11.yml +++ b/tests/test_playbooks/fixtures/subnet-11.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-12.yml b/tests/test_playbooks/fixtures/subnet-12.yml index e6e8ce029..27152ea8c 100644 --- a/tests/test_playbooks/fixtures/subnet-12.yml +++ b/tests/test_playbooks/fixtures/subnet-12.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK @@ -125,25 +121,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -157,13 +150,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -174,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK @@ -191,25 +180,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -223,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -240,8 +224,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK @@ -257,25 +239,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -289,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -306,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK @@ -332,14 +307,16 @@ interactions: uri: https://foreman.example.org/api/subnets response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:19 UTC","updated_at":"2020-09-03 06:57:19 UTC","ipam":"DHCP","boot_mode":"DHCP","id":32,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":1,"tftp_name":"centos7-foreman-2-1.yatsu.example.com","httpboot_id":1,"httpboot_name":"centos7-foreman-2-1.yatsu.example.com","externalipam_id":null,"externalipam_name":null,"dns_id":1,"template_id":null,"template_name":null,"dhcp":null,"tftp":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"httpboot":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"externalipam":null,"dns":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:49 UTC","updated_at":"2024-10-08 14:38:49 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":12,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":1,"tftp_name":"almalinux8-foreman-nightly.tanso.example.com","httpboot_id":1,"httpboot_name":"almalinux8-foreman-nightly.tanso.example.com","externalipam_id":null,"externalipam_name":null,"dns_id":1,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"httpboot":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"externalipam":null,"dns":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1275' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -353,13 +330,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/subnet-13.yml b/tests/test_playbooks/fixtures/subnet-13.yml index f26d22b49..52f9f5d80 100644 --- a/tests/test_playbooks/fixtures/subnet-13.yml +++ b/tests/test_playbooks/fixtures/subnet-13.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,30 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:19 UTC\",\"updated_at\":\"2020-09-03 06:57:19 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":32,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":1,\"tftp_name\":\"centos7-foreman-2-1.yatsu.example.com\"\ - ,\"httpboot_id\":1,\"httpboot_name\":\"centos7-foreman-2-1.yatsu.example.com\"\ - ,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":1,\"template_id\"\ - :null,\"template_name\":null,\"dhcp\":null,\"tftp\":{\"name\":\"centos7-foreman-2-1.yatsu.example.com\"\ - ,\"id\":1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"},\"\ - httpboot\":{\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"\ - url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"},\"externalipam\"\ - :null,\"dns\":{\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"\ - url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"},\"template\"\ - :null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:49 UTC\",\"updated_at\":\"2024-10-08 14:38:49 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":12,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":1,\"tftp_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"httpboot_id\":1,\"httpboot_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":1,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"httpboot\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"externalipam\":null,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1373' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -107,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1259' status: code: 200 message: OK @@ -141,17 +123,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/32 + uri: https://foreman.example.org/api/subnets/12?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:19 UTC","updated_at":"2020-09-03 06:57:19 UTC","ipam":"DHCP","boot_mode":"DHCP","id":32,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":1,"tftp_name":"centos7-foreman-2-1.yatsu.example.com","httpboot_id":1,"httpboot_name":"centos7-foreman-2-1.yatsu.example.com","externalipam_id":null,"externalipam_name":null,"dns_id":1,"template_id":null,"template_name":null,"dhcp":null,"tftp":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"httpboot":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"externalipam":null,"dns":{"name":"centos7-foreman-2-1.yatsu.example.com","id":1,"url":"https://centos7-foreman-2-1.yatsu.example.com:8443"},"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:49 UTC","updated_at":"2024-10-08 14:38:49 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":12,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":1,"tftp_name":"almalinux8-foreman-nightly.tanso.example.com","httpboot_id":1,"httpboot_name":"almalinux8-foreman-nightly.tanso.example.com","externalipam_id":null,"externalipam_name":null,"dns_id":1,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"httpboot":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"externalipam":null,"dns":{"name":"almalinux8-foreman-nightly.tanso.example.com","id":1,"url":"https://almalinux8-foreman-nightly.tanso.example.com:8443"},"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1275' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -165,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -182,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1161' status: code: 200 message: OK @@ -199,25 +179,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -231,13 +208,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -248,8 +223,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK @@ -265,25 +238,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -297,13 +267,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -314,8 +282,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK @@ -331,25 +297,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22centos7-foreman-2-1.yatsu.example.com%22&per_page=4294967296 + uri: https://foreman.example.org/api/smart_proxies?search=name%3D%22almalinux8-foreman-nightly.tanso.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"centos7-foreman-2-1.yatsu.example.com\\\ - \"\",\n \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\"\ - : [{\"created_at\":\"2020-07-15 11:31:50 UTC\",\"updated_at\":\"2020-07-15\ - \ 11:31:50 UTC\",\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\"\ - :1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\",\"features\"\ - :[{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2},{\"capabilities\":[],\"\ - name\":\"Puppet CA\",\"id\":6},{\"capabilities\":[],\"name\":\"Puppet\",\"\ - id\":5},{\"capabilities\":[],\"name\":\"Logs\",\"id\":10},{\"capabilities\"\ - :[],\"name\":\"HTTPBoot\",\"id\":11},{\"capabilities\":[],\"name\":\"DNS\"\ - ,\"id\":3}]}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"almalinux8-foreman-nightly.tanso.example.com\\\"\",\n + \ \"sort\": {\n \"by\": null,\n \"order\": null\n },\n \"results\": + [{\"created_at\":\"2024-10-04 11:20:48 UTC\",\"updated_at\":\"2024-10-04 11:20:48 + UTC\",\"hosts_count\":1,\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\",\"features\":[{\"capabilities\":[],\"name\":\"Puppet + CA\",\"id\":5},{\"capabilities\":[],\"name\":\"Puppet\",\"id\":13},{\"capabilities\":[],\"name\":\"Logs\",\"id\":9},{\"capabilities\":[],\"name\":\"DNS\",\"id\":3},{\"capabilities\":[],\"name\":\"HTTPBoot\",\"id\":10},{\"capabilities\":[],\"name\":\"TFTP\",\"id\":2}]}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '703' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -363,13 +326,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -380,8 +341,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '666' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-14.yml b/tests/test_playbooks/fixtures/subnet-14.yml index ae4579450..df4e5f80d 100644 --- a/tests/test_playbooks/fixtures/subnet-14.yml +++ b/tests/test_playbooks/fixtures/subnet-14.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,30 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:19 UTC\",\"updated_at\":\"2020-09-03 06:57:19 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":32,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":1,\"tftp_name\":\"centos7-foreman-2-1.yatsu.example.com\"\ - ,\"httpboot_id\":1,\"httpboot_name\":\"centos7-foreman-2-1.yatsu.example.com\"\ - ,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":1,\"template_id\"\ - :null,\"template_name\":null,\"dhcp\":null,\"tftp\":{\"name\":\"centos7-foreman-2-1.yatsu.example.com\"\ - ,\"id\":1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"},\"\ - httpboot\":{\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"\ - url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"},\"externalipam\"\ - :null,\"dns\":{\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"\ - url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"},\"template\"\ - :null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:49 UTC\",\"updated_at\":\"2024-10-08 14:38:49 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":12,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":1,\"tftp_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"httpboot_id\":1,\"httpboot_name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":1,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"httpboot\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"externalipam\":null,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"},\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1373' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -107,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -124,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1259' status: code: 200 message: OK @@ -143,17 +125,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/subnets/32 + uri: https://foreman.example.org/api/subnets/12 response: body: - string: '{"id":32,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test - Subnet","vlanid":null,"created_at":"2020-09-03T06:57:19.388Z","updated_at":"2020-09-03T06:57:19.388Z","dhcp_id":null,"tftp_id":1,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":1,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":1,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"to_label":"Test + string: '{"id":12,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test + Subnet","vlanid":null,"created_at":"2024-10-08T14:38:49.907Z","updated_at":"2024-10-08T14:38:49.907Z","dhcp_id":null,"tftp_id":1,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":1,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":1,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"bmc_id":null,"to_label":"Test Subnet (192.168.200.0/27)","type":"Subnet::Ipv4"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '550' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -167,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -184,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '536' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-15.yml b/tests/test_playbooks/fixtures/subnet-15.yml index 4678aa943..1e0b30d86 100644 --- a/tests/test_playbooks/fixtures/subnet-15.yml +++ b/tests/test_playbooks/fixtures/subnet-15.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-16.yml b/tests/test_playbooks/fixtures/subnet-16.yml index 97b0f1007..12c912b7c 100644 --- a/tests/test_playbooks/fixtures/subnet-16.yml +++ b/tests/test_playbooks/fixtures/subnet-16.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22My+test+subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"My test subnet\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"My test subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '180' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '180' status: code: 200 message: OK @@ -134,14 +130,16 @@ interactions: uri: https://foreman.example.org/api/subnets response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:22 UTC","updated_at":"2020-09-03 06:57:22 UTC","ipam":"DHCP","boot_mode":"DHCP","id":33,"name":"My - test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:52 UTC","updated_at":"2024-10-08 14:38:52 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":13,"name":"My + test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '831' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -155,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/subnet-17.yml b/tests/test_playbooks/fixtures/subnet-17.yml index f161b14a6..7dd1290b7 100644 --- a/tests/test_playbooks/fixtures/subnet-17.yml +++ b/tests/test_playbooks/fixtures/subnet-17.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22My+test+subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"My test subnet\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:22 UTC\",\"updated_at\":\"2020-09-03 06:57:22 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":33,\"name\":\"My test subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"My test subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:52 UTC\",\"updated_at\":\"2024-10-08 14:38:52 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":13,\"name\":\"My + test subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '932' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '874' status: code: 200 message: OK @@ -135,17 +123,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/33 + uri: https://foreman.example.org/api/subnets/13?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:22 UTC","updated_at":"2020-09-03 06:57:22 UTC","ipam":"DHCP","boot_mode":"DHCP","id":33,"name":"My - test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:52 UTC","updated_at":"2024-10-08 14:38:52 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":13,"name":"My + test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '831' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -159,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -176,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '773' status: code: 200 message: OK @@ -197,17 +183,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/subnets/33 + uri: https://foreman.example.org/api/subnets/13 response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:22 UTC","updated_at":"2020-09-03 06:57:22 UTC","ipam":"DHCP","boot_mode":"DHCP","id":33,"name":"My - new test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:52 UTC","updated_at":"2024-10-08 14:38:52 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":13,"name":"My + new test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '835' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -221,13 +209,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -238,8 +224,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '777' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-18.yml b/tests/test_playbooks/fixtures/subnet-18.yml index 3d283786a..9aac5d64e 100644 --- a/tests/test_playbooks/fixtures/subnet-18.yml +++ b/tests/test_playbooks/fixtures/subnet-18.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22My+new+test+subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"My new test subnet\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:22 UTC\",\"updated_at\":\"2020-09-03 06:57:22 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":33,\"name\":\"My new test subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"My new test subnet\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:52 UTC\",\"updated_at\":\"2024-10-08 14:38:52 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":13,\"name\":\"My + new test subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '940' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '882' status: code: 200 message: OK @@ -135,17 +123,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/33 + uri: https://foreman.example.org/api/subnets/13?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:22 UTC","updated_at":"2020-09-03 06:57:22 UTC","ipam":"DHCP","boot_mode":"DHCP","id":33,"name":"My - new test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:52 UTC","updated_at":"2024-10-08 14:38:52 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":13,"name":"My + new test subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '835' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -159,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -176,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '777' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-19.yml b/tests/test_playbooks/fixtures/subnet-19.yml index 514c2bb0d..5f0a83122 100644 --- a/tests/test_playbooks/fixtures/subnet-19.yml +++ b/tests/test_playbooks/fixtures/subnet-19.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22My+new+test+subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"My new test subnet\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:22 UTC\",\"updated_at\":\"2020-09-03 06:57:22 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":33,\"name\":\"My new test subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"My new test subnet\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:52 UTC\",\"updated_at\":\"2024-10-08 14:38:52 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":13,\"name\":\"My + new test subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '940' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '882' status: code: 200 message: OK @@ -137,17 +125,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/subnets/33 + uri: https://foreman.example.org/api/subnets/13 response: body: - string: '{"id":33,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"My - new test subnet","vlanid":null,"created_at":"2020-09-03T06:57:22.052Z","updated_at":"2020-09-03T06:57:22.738Z","dhcp_id":null,"tftp_id":null,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":null,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"to_label":"My + string: '{"id":13,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"My + new test subnet","vlanid":null,"created_at":"2024-10-08T14:38:52.122Z","updated_at":"2024-10-08T14:38:52.719Z","dhcp_id":null,"tftp_id":null,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":null,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"bmc_id":null,"to_label":"My new test subnet (192.168.200.0/27)","type":"Subnet::Ipv4"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '573' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '559' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-2.yml b/tests/test_playbooks/fixtures/subnet-2.yml index 7bc6f2d28..41b3dfdd5 100644 --- a/tests/test_playbooks/fixtures/subnet-2.yml +++ b/tests/test_playbooks/fixtures/subnet-2.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:10 UTC\",\"updated_at\":\"2020-09-03 06:57:10 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":30,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:43 UTC\",\"updated_at\":\"2024-10-08 14:38:43 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":10,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -135,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":48,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":49,"name":"subnet_param2","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value2"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1261' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1105' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-20.yml b/tests/test_playbooks/fixtures/subnet-20.yml index 0a3674b8d..2774662a0 100644 --- a/tests/test_playbooks/fixtures/subnet-20.yml +++ b/tests/test_playbooks/fixtures/subnet-20.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet+2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\":\ - \ {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '179' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '179' status: code: 200 message: OK @@ -128,18 +124,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03\ - \ 06:57:05 UTC\",\"updated_at\":\"2020-09-03 06:57:05 UTC\",\"id\":41,\"name\"\ - :\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"\ - }]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:43 UTC\",\"updated_at\":\"2024-10-08 14:31:43 UTC\",\"id\":21,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -153,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '389' status: code: 200 message: OK @@ -190,18 +182,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03\ - \ 06:57:07 UTC\",\"updated_at\":\"2020-09-03 06:57:07 UTC\",\"id\":42,\"name\"\ - :\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"\ - }]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:44 UTC\",\"updated_at\":\"2024-10-08 14:31:44 UTC\",\"id\":22,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -215,13 +207,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -232,8 +222,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '389' status: code: 200 message: OK @@ -252,17 +240,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03 06:57:02\ - \ UTC\",\"updated_at\":\"2020-09-03 06:57:02 UTC\",\"id\":38,\"name\":\"Foo\"\ - ,\"title\":\"Foo\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:40 UTC\",\"updated_at\":\"2024-10-08 14:31:40 UTC\",\"id\":18,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -276,13 +264,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -293,8 +279,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -313,17 +297,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%2FBaz%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :\"38\",\"parent_id\":38,\"parent_name\":\"Foo\",\"created_at\":\"2020-09-03\ - \ 06:57:03 UTC\",\"updated_at\":\"2020-09-03 06:57:03 UTC\",\"id\":39,\"name\"\ - :\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"18\",\"parent_id\":18,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 14:31:41 UTC\",\"updated_at\":\"2024-10-08 14:31:41 UTC\",\"id\":19,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -337,13 +321,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -354,8 +336,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '362' status: code: 200 message: OK @@ -374,17 +354,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Bar%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03 06:57:04\ - \ UTC\",\"updated_at\":\"2020-09-03 06:57:04 UTC\",\"id\":40,\"name\":\"Bar\"\ - ,\"title\":\"Bar\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:42 UTC\",\"updated_at\":\"2024-10-08 14:31:42 UTC\",\"id\":20,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -398,13 +378,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -415,8 +393,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -435,18 +411,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22foo.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-09-03 06:57:08 UTC\",\"updated_at\":\"2020-09-03\ - \ 06:57:08 UTC\",\"id\":12,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\"\ - :{\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"\ - }}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"foo.example.com\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:31:45 UTC\",\"updated_at\":\"2024-10-08 14:31:45 UTC\",\"id\":8,\"name\":\"foo.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -460,13 +435,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -477,8 +450,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '441' status: code: 200 message: OK @@ -497,18 +468,17 @@ interactions: uri: https://foreman.example.org/api/domains?search=name%3D%22bar.example.com%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"bar.example.com\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\"\ - :null,\"created_at\":\"2020-09-03 06:57:09 UTC\",\"updated_at\":\"2020-09-03\ - \ 06:57:09 UTC\",\"id\":13,\"name\":\"bar.example.com\",\"dns_id\":1,\"dns\"\ - :{\"name\":\"centos7-foreman-2-1.yatsu.example.com\",\"id\":1,\"url\":\"https://centos7-foreman-2-1.yatsu.example.com:8443\"\ - }}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"bar.example.com\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"fullname\":null,\"created_at\":\"2024-10-08 + 14:31:45 UTC\",\"updated_at\":\"2024-10-08 14:31:45 UTC\",\"id\":9,\"name\":\"bar.example.com\",\"dns_id\":1,\"dns\":{\"name\":\"almalinux8-foreman-nightly.tanso.example.com\",\"id\":1,\"url\":\"https://almalinux8-foreman-nightly.tanso.example.com:8443\"}}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '454' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -522,13 +492,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -539,8 +507,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '441' status: code: 200 message: OK @@ -549,8 +515,8 @@ interactions: "network_type": "IPv4", "network": "192.168.200.0", "cidr": 27, "mask": "255.255.255.224", "gateway": "192.168.200.1", "dns_primary": "1.1.1.1", "dns_secondary": "1.1.1.2", "ipam": "Internal DB", "from": "192.168.200.10", "to": "192.168.200.20", "vlanid": - 42, "mtu": 9000, "domain_ids": [12, 13], "boot_mode": "Static", "location_ids": - [38, 39, 40], "organization_ids": [41, 42]}}' + 42, "mtu": 9000, "domain_ids": [8, 9], "boot_mode": "Static", "location_ids": + [18, 19, 20], "organization_ids": [21, 22]}}' headers: Accept: - application/json;version=2 @@ -559,7 +525,7 @@ interactions: Connection: - keep-alive Content-Length: - - '457' + - '455' Content-Type: - application/json User-Agent: @@ -568,16 +534,18 @@ interactions: uri: https://foreman.example.org/api/subnets response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2020-09-03 - 06:57:24 UTC","updated_at":"2020-09-03 06:57:24 UTC","ipam":"Internal DB","boot_mode":"Static","id":34,"name":"Test - Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[{"id":12,"name":"foo.example.com"},{"id":13,"name":"bar.example.com"}],"interfaces":[],"parameters":[],"locations":[{"id":38,"name":"Foo","title":"Foo","description":null},{"id":39,"name":"Baz","title":"Foo/Baz","description":null},{"id":40,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":41,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":42,"name":"Test + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2024-10-08 + 14:38:54 UTC","updated_at":"2024-10-08 14:38:54 UTC","ipam":"Internal DB","boot_mode":"Static","nic_delay":null,"id":14,"name":"Test + Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[{"id":8,"name":"foo.example.com"},{"id":9,"name":"bar.example.com"}],"interfaces":[],"parameters":[],"locations":[{"id":18,"name":"Foo","title":"Foo","description":null},{"id":19,"name":"Baz","title":"Foo/Baz","description":null},{"id":20,"name":"Bar","title":"Bar","description":null}],"organizations":[{"id":21,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":22,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1308' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -591,13 +559,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=91 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/subnet-21.yml b/tests/test_playbooks/fixtures/subnet-21.yml index b47efb6eb..917995282 100644 --- a/tests/test_playbooks/fixtures/subnet-21.yml +++ b/tests/test_playbooks/fixtures/subnet-21.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,25 +68,19 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet+2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\":\ - \ {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":42,\"mtu\":9000,\"gateway\":\"192.168.200.1\"\ - ,\"dns_primary\":\"1.1.1.1\",\"dns_secondary\":\"1.1.1.2\",\"from\":\"192.168.200.10\"\ - ,\"to\":\"192.168.200.20\",\"created_at\":\"2020-09-03 06:57:24 UTC\",\"updated_at\"\ - :\"2020-09-03 06:57:24 UTC\",\"ipam\":\"Internal DB\",\"boot_mode\":\"Static\"\ - ,\"id\":34,\"name\":\"Test Subnet 2\",\"description\":\"My subnet description\"\ - ,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"\ - tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"\ - externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\"\ - :null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"\ - externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":42,\"mtu\":9000,\"gateway\":\"192.168.200.1\",\"dns_primary\":\"1.1.1.1\",\"dns_secondary\":\"1.1.1.2\",\"from\":\"192.168.200.10\",\"to\":\"192.168.200.20\",\"created_at\":\"2024-10-08 + 14:38:54 UTC\",\"updated_at\":\"2024-10-08 14:38:54 UTC\",\"ipam\":\"Internal + DB\",\"boot_mode\":\"Static\",\"nic_delay\":null,\"id\":14,\"name\":\"Test + Subnet 2\",\"description\":\"My subnet description\",\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1001' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -102,13 +94,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -119,8 +109,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -136,19 +124,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/34 + uri: https://foreman.example.org/api/subnets/14?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2020-09-03 - 06:57:24 UTC","updated_at":"2020-09-03 06:57:24 UTC","ipam":"Internal DB","boot_mode":"Static","id":34,"name":"Test - Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[{"id":13,"name":"bar.example.com"},{"id":12,"name":"foo.example.com"}],"interfaces":[],"parameters":[],"locations":[{"id":40,"name":"Bar","title":"Bar","description":null},{"id":38,"name":"Foo","title":"Foo","description":null},{"id":39,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":41,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":42,"name":"Test + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2024-10-08 + 14:38:54 UTC","updated_at":"2024-10-08 14:38:54 UTC","ipam":"Internal DB","boot_mode":"Static","nic_delay":null,"id":14,"name":"Test + Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[{"id":9,"name":"bar.example.com"},{"id":8,"name":"foo.example.com"}],"interfaces":[],"parameters":[],"locations":[{"id":20,"name":"Bar","title":"Bar","description":null},{"id":18,"name":"Foo","title":"Foo","description":null},{"id":19,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":21,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":22,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1308' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -162,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -179,8 +167,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1252' status: code: 200 message: OK @@ -199,18 +185,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03\ - \ 06:57:05 UTC\",\"updated_at\":\"2020-09-03 06:57:05 UTC\",\"id\":41,\"name\"\ - :\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"\ - }]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:43 UTC\",\"updated_at\":\"2024-10-08 14:31:43 UTC\",\"id\":21,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -224,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -241,8 +225,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '389' status: code: 200 message: OK @@ -261,18 +243,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03\ - \ 06:57:07 UTC\",\"updated_at\":\"2020-09-03 06:57:07 UTC\",\"id\":42,\"name\"\ - :\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"\ - }]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:44 UTC\",\"updated_at\":\"2024-10-08 14:31:44 UTC\",\"id\":22,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -286,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '389' status: code: 200 message: OK @@ -323,17 +301,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03 06:57:02\ - \ UTC\",\"updated_at\":\"2020-09-03 06:57:02 UTC\",\"id\":38,\"name\":\"Foo\"\ - ,\"title\":\"Foo\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:40 UTC\",\"updated_at\":\"2024-10-08 14:31:40 UTC\",\"id\":18,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -347,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -364,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -384,17 +358,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%2FBaz%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :\"38\",\"parent_id\":38,\"parent_name\":\"Foo\",\"created_at\":\"2020-09-03\ - \ 06:57:03 UTC\",\"updated_at\":\"2020-09-03 06:57:03 UTC\",\"id\":39,\"name\"\ - :\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"18\",\"parent_id\":18,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 14:31:41 UTC\",\"updated_at\":\"2024-10-08 14:31:41 UTC\",\"id\":19,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -408,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -425,8 +397,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '362' status: code: 200 message: OK @@ -445,17 +415,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Bar%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03 06:57:04\ - \ UTC\",\"updated_at\":\"2020-09-03 06:57:04 UTC\",\"id\":40,\"name\":\"Bar\"\ - ,\"title\":\"Bar\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:42 UTC\",\"updated_at\":\"2024-10-08 14:31:42 UTC\",\"id\":20,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -469,13 +439,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -486,8 +454,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -507,19 +473,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/subnets/34 + uri: https://foreman.example.org/api/subnets/14 response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2020-09-03 - 06:57:24 UTC","updated_at":"2020-09-03 06:57:24 UTC","ipam":"Internal DB","boot_mode":"Static","id":34,"name":"Test - Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[{"id":40,"name":"Bar","title":"Bar","description":null},{"id":38,"name":"Foo","title":"Foo","description":null},{"id":39,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":41,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":42,"name":"Test + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2024-10-08 + 14:38:54 UTC","updated_at":"2024-10-08 14:38:54 UTC","ipam":"Internal DB","boot_mode":"Static","nic_delay":null,"id":14,"name":"Test + Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[{"id":20,"name":"Bar","title":"Bar","description":null},{"id":18,"name":"Foo","title":"Foo","description":null},{"id":19,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":21,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":22,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1241' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -533,13 +501,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=92 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -550,8 +516,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1183' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-22.yml b/tests/test_playbooks/fixtures/subnet-22.yml index f2b977e91..ea753da7b 100644 --- a/tests/test_playbooks/fixtures/subnet-22.yml +++ b/tests/test_playbooks/fixtures/subnet-22.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,25 +68,19 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet+2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\":\ - \ {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":42,\"mtu\":9000,\"gateway\":\"192.168.200.1\"\ - ,\"dns_primary\":\"1.1.1.1\",\"dns_secondary\":\"1.1.1.2\",\"from\":\"192.168.200.10\"\ - ,\"to\":\"192.168.200.20\",\"created_at\":\"2020-09-03 06:57:24 UTC\",\"updated_at\"\ - :\"2020-09-03 06:57:24 UTC\",\"ipam\":\"Internal DB\",\"boot_mode\":\"Static\"\ - ,\"id\":34,\"name\":\"Test Subnet 2\",\"description\":\"My subnet description\"\ - ,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"\ - tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"\ - externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\"\ - :null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"\ - externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":42,\"mtu\":9000,\"gateway\":\"192.168.200.1\",\"dns_primary\":\"1.1.1.1\",\"dns_secondary\":\"1.1.1.2\",\"from\":\"192.168.200.10\",\"to\":\"192.168.200.20\",\"created_at\":\"2024-10-08 + 14:38:54 UTC\",\"updated_at\":\"2024-10-08 14:38:54 UTC\",\"ipam\":\"Internal + DB\",\"boot_mode\":\"Static\",\"nic_delay\":null,\"id\":14,\"name\":\"Test + Subnet 2\",\"description\":\"My subnet description\",\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1001' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -102,13 +94,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -119,8 +109,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -136,19 +124,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/34 + uri: https://foreman.example.org/api/subnets/14?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2020-09-03 - 06:57:24 UTC","updated_at":"2020-09-03 06:57:24 UTC","ipam":"Internal DB","boot_mode":"Static","id":34,"name":"Test - Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[{"id":40,"name":"Bar","title":"Bar","description":null},{"id":38,"name":"Foo","title":"Foo","description":null},{"id":39,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":41,"name":"Test - Org1","title":"Test Org1","description":"A test organization"},{"id":42,"name":"Test + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":42,"mtu":9000,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","created_at":"2024-10-08 + 14:38:54 UTC","updated_at":"2024-10-08 14:38:54 UTC","ipam":"Internal DB","boot_mode":"Static","nic_delay":null,"id":14,"name":"Test + Subnet 2","description":"My subnet description","network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[{"id":20,"name":"Bar","title":"Bar","description":null},{"id":18,"name":"Foo","title":"Foo","description":null},{"id":19,"name":"Baz","title":"Foo/Baz","description":null}],"organizations":[{"id":21,"name":"Test + Org1","title":"Test Org1","description":"A test organization"},{"id":22,"name":"Test Org2","title":"Test Org2","description":"A test organization"}]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1241' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -162,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -179,8 +167,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1183' status: code: 200 message: OK @@ -199,18 +185,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Org1%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03\ - \ 06:57:05 UTC\",\"updated_at\":\"2020-09-03 06:57:05 UTC\",\"id\":41,\"name\"\ - :\"Test Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"\ - }]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org1\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:43 UTC\",\"updated_at\":\"2024-10-08 14:31:43 UTC\",\"id\":21,\"name\":\"Test + Org1\",\"title\":\"Test Org1\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -224,13 +210,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -241,8 +225,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '389' status: code: 200 message: OK @@ -261,18 +243,18 @@ interactions: uri: https://foreman.example.org/api/organizations?search=name%3D%22Test+Org2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03\ - \ 06:57:07 UTC\",\"updated_at\":\"2020-09-03 06:57:07 UTC\",\"id\":42,\"name\"\ - :\"Test Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"\ - }]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Org2\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:44 UTC\",\"updated_at\":\"2024-10-08 14:31:44 UTC\",\"id\":22,\"name\":\"Test + Org2\",\"title\":\"Test Org2\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '389' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -286,13 +268,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -303,8 +283,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '389' status: code: 200 message: OK @@ -323,17 +301,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03 06:57:02\ - \ UTC\",\"updated_at\":\"2020-09-03 06:57:02 UTC\",\"id\":38,\"name\":\"Foo\"\ - ,\"title\":\"Foo\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:40 UTC\",\"updated_at\":\"2024-10-08 14:31:40 UTC\",\"id\":18,\"name\":\"Foo\",\"title\":\"Foo\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -347,13 +325,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -364,8 +340,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK @@ -384,17 +358,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Foo%2FBaz%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\"\ - :\"38\",\"parent_id\":38,\"parent_name\":\"Foo\",\"created_at\":\"2020-09-03\ - \ 06:57:03 UTC\",\"updated_at\":\"2020-09-03 06:57:03 UTC\",\"id\":39,\"name\"\ - :\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Foo/Baz\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":\"18\",\"parent_id\":18,\"parent_name\":\"Foo\",\"created_at\":\"2024-10-08 + 14:31:41 UTC\",\"updated_at\":\"2024-10-08 14:31:41 UTC\",\"id\":19,\"name\":\"Baz\",\"title\":\"Foo/Baz\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '362' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -408,13 +382,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=94 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -425,8 +397,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '362' status: code: 200 message: OK @@ -445,17 +415,17 @@ interactions: uri: https://foreman.example.org/api/locations?search=title%3D%22Bar%22&per_page=4294967296 response: body: - string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"\ - by\": null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"\ - parent_id\":null,\"parent_name\":null,\"created_at\":\"2020-09-03 06:57:04\ - \ UTC\",\"updated_at\":\"2020-09-03 06:57:04 UTC\",\"id\":40,\"name\":\"Bar\"\ - ,\"title\":\"Bar\",\"description\":null}]\n}\n" + string: "{\n \"total\": 4,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"title=\\\"Bar\\\"\",\n \"sort\": {\n \"by\": + null,\n \"order\": null\n },\n \"results\": [{\"ancestry\":null,\"parent_id\":null,\"parent_name\":null,\"created_at\":\"2024-10-08 + 14:31:42 UTC\",\"updated_at\":\"2024-10-08 14:31:42 UTC\",\"id\":20,\"name\":\"Bar\",\"title\":\"Bar\",\"description\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '355' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -469,13 +439,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=93 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -486,8 +454,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '355' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-23.yml b/tests/test_playbooks/fixtures/subnet-23.yml index bfe82dd69..8fd5c1997 100644 --- a/tests/test_playbooks/fixtures/subnet-23.yml +++ b/tests/test_playbooks/fixtures/subnet-23.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,25 +68,19 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet+2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\":\ - \ {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":42,\"mtu\":9000,\"gateway\":\"192.168.200.1\"\ - ,\"dns_primary\":\"1.1.1.1\",\"dns_secondary\":\"1.1.1.2\",\"from\":\"192.168.200.10\"\ - ,\"to\":\"192.168.200.20\",\"created_at\":\"2020-09-03 06:57:24 UTC\",\"updated_at\"\ - :\"2020-09-03 06:57:24 UTC\",\"ipam\":\"Internal DB\",\"boot_mode\":\"Static\"\ - ,\"id\":34,\"name\":\"Test Subnet 2\",\"description\":\"My subnet description\"\ - ,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"\ - tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"\ - externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\"\ - :null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"\ - externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":42,\"mtu\":9000,\"gateway\":\"192.168.200.1\",\"dns_primary\":\"1.1.1.1\",\"dns_secondary\":\"1.1.1.2\",\"from\":\"192.168.200.10\",\"to\":\"192.168.200.20\",\"created_at\":\"2024-10-08 + 14:38:54 UTC\",\"updated_at\":\"2024-10-08 14:38:54 UTC\",\"ipam\":\"Internal + DB\",\"boot_mode\":\"Static\",\"nic_delay\":null,\"id\":14,\"name\":\"Test + Subnet 2\",\"description\":\"My subnet description\",\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1001' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -102,13 +94,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -119,8 +109,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '943' status: code: 200 message: OK @@ -138,18 +126,20 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/subnets/34 + uri: https://foreman.example.org/api/subnets/14 response: body: - string: '{"id":34,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test - Subnet 2","vlanid":42,"created_at":"2020-09-03T06:57:24.893Z","updated_at":"2020-09-03T06:57:24.893Z","dhcp_id":null,"tftp_id":null,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","dns_id":null,"boot_mode":"Static","ipam":"Internal - DB","description":"My subnet description","mtu":9000,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"to_label":"Test + string: '{"id":14,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test + Subnet 2","vlanid":42,"created_at":"2024-10-08T14:38:54.672Z","updated_at":"2024-10-08T14:38:54.672Z","dhcp_id":null,"tftp_id":null,"gateway":"192.168.200.1","dns_primary":"1.1.1.1","dns_secondary":"1.1.1.2","from":"192.168.200.10","to":"192.168.200.20","dns_id":null,"boot_mode":"Static","ipam":"Internal + DB","description":"My subnet description","mtu":9000,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"bmc_id":null,"to_label":"Test Subnet 2 (192.168.200.0/27)","type":"Subnet::Ipv4"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '634' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -163,13 +153,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -180,8 +168,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '620' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-24.yml b/tests/test_playbooks/fixtures/subnet-24.yml index 482fc0d18..0165c48cf 100644 --- a/tests/test_playbooks/fixtures/subnet-24.yml +++ b/tests/test_playbooks/fixtures/subnet-24.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet+2%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\":\ - \ {\n \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet 2\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '179' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '179' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-3.yml b/tests/test_playbooks/fixtures/subnet-3.yml index 22d609cd8..55d5f0032 100644 --- a/tests/test_playbooks/fixtures/subnet-3.yml +++ b/tests/test_playbooks/fixtures/subnet-3.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:10 UTC\",\"updated_at\":\"2020-09-03 06:57:10 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":30,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:43 UTC\",\"updated_at\":\"2024-10-08 14:38:43 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":10,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -135,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","id":48,"name":"subnet_param2","parameter_type":"string","value":"value2"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","id":49,"name":"subnet_param2","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value2"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1261' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1105' status: code: 200 message: OK @@ -201,19 +187,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10 response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:12 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:12 UTC","updated_at":"2020-09-03 06:57:12 UTC","id":49,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:45 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"new_value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:45 UTC","updated_at":"2024-10-08 14:38:45 UTC","id":50,"name":"subnet_param3","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value3"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1265' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -227,13 +215,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -244,8 +230,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1109' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-4.yml b/tests/test_playbooks/fixtures/subnet-4.yml index 27e38b9d7..485f7caed 100644 --- a/tests/test_playbooks/fixtures/subnet-4.yml +++ b/tests/test_playbooks/fixtures/subnet-4.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:10 UTC\",\"updated_at\":\"2020-09-03 06:57:10 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":30,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:43 UTC\",\"updated_at\":\"2024-10-08 14:38:43 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":10,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -135,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:12 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:12 UTC","updated_at":"2020-09-03 06:57:12 UTC","id":49,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:45 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"new_value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:45 UTC","updated_at":"2024-10-08 14:38:45 UTC","id":50,"name":"subnet_param3","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value3"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1265' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1109' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-5.yml b/tests/test_playbooks/fixtures/subnet-5.yml index d968236cd..171690657 100644 --- a/tests/test_playbooks/fixtures/subnet-5.yml +++ b/tests/test_playbooks/fixtures/subnet-5.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:10 UTC\",\"updated_at\":\"2020-09-03 06:57:10 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":30,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:43 UTC\",\"updated_at\":\"2024-10-08 14:38:43 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":10,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -135,19 +123,21 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:12 UTC","id":47,"name":"subnet_param1","parameter_type":"string","value":"new_value1"},{"priority":40,"created_at":"2020-09-03 - 06:57:12 UTC","updated_at":"2020-09-03 06:57:12 UTC","id":49,"name":"subnet_param3","parameter_type":"string","value":"value3"}],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[{"priority":40,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:45 UTC","id":48,"name":"subnet_param1","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"new_value1"},{"priority":40,"created_at":"2024-10-08 + 14:38:45 UTC","updated_at":"2024-10-08 14:38:45 UTC","id":50,"name":"subnet_param3","parameter_type":"string","associated_type":"subnet","hidden_value?":false,"value":"value3"}],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1265' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '1109' status: code: 200 message: OK @@ -199,17 +185,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10 response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:10 UTC","updated_at":"2020-09-03 06:57:10 UTC","ipam":"DHCP","boot_mode":"DHCP","id":30,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:43 UTC","updated_at":"2024-10-08 14:38:43 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":10,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '828' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -223,13 +211,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -240,8 +226,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '770' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-6.yml b/tests/test_playbooks/fixtures/subnet-6.yml index 19851a2bf..3df17a4c3 100644 --- a/tests/test_playbooks/fixtures/subnet-6.yml +++ b/tests/test_playbooks/fixtures/subnet-6.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:10 UTC\",\"updated_at\":\"2020-09-03 06:57:10 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":30,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:43 UTC\",\"updated_at\":\"2024-10-08 14:38:43 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":10,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -137,17 +125,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/api/subnets/30 + uri: https://foreman.example.org/api/subnets/10 response: body: - string: '{"id":30,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test - Subnet","vlanid":null,"created_at":"2020-09-03T06:57:10.685Z","updated_at":"2020-09-03T06:57:10.685Z","dhcp_id":null,"tftp_id":null,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":null,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"to_label":"Test + string: '{"id":10,"network":"192.168.200.0","mask":"255.255.255.224","priority":null,"name":"Test + Subnet","vlanid":null,"created_at":"2024-10-08T14:38:43.533Z","updated_at":"2024-10-08T14:38:43.533Z","dhcp_id":null,"tftp_id":null,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"dns_id":null,"boot_mode":"DHCP","ipam":"DHCP","description":null,"mtu":1500,"template_id":null,"httpboot_id":null,"nic_delay":null,"externalipam_id":null,"externalipam_group":null,"bmc_id":null,"to_label":"Test Subnet (192.168.200.0/27)","type":"Subnet::Ipv4"}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '559' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -161,13 +151,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -178,8 +166,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '545' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-7.yml b/tests/test_playbooks/fixtures/subnet-7.yml index 4678aa943..1e0b30d86 100644 --- a/tests/test_playbooks/fixtures/subnet-7.yml +++ b/tests/test_playbooks/fixtures/subnet-7.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/subnet-8.yml b/tests/test_playbooks/fixtures/subnet-8.yml index e92a33555..db1f8656c 100644 --- a/tests/test_playbooks/fixtures/subnet-8.yml +++ b/tests/test_playbooks/fixtures/subnet-8.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,14 +68,16 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" + string: "{\n \"total\": 0,\n \"subtotal\": 0,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": []\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '177' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -91,13 +91,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -108,8 +106,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '177' status: code: 200 message: OK @@ -133,14 +129,16 @@ interactions: uri: https://foreman.example.org/api/subnets response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:16 UTC","updated_at":"2020-09-03 06:57:16 UTC","ipam":"DHCP","boot_mode":"DHCP","id":31,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:47 UTC","updated_at":"2024-10-08 14:38:47 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":11,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '828' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -154,13 +152,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: diff --git a/tests/test_playbooks/fixtures/subnet-9.yml b/tests/test_playbooks/fixtures/subnet-9.yml index ad832d41f..4b15b829f 100644 --- a/tests/test_playbooks/fixtures/subnet-9.yml +++ b/tests/test_playbooks/fixtures/subnet-9.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.1.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,24 +68,18 @@ interactions: uri: https://foreman.example.org/api/subnets?search=name%3D%22Test+Subnet%22&per_page=4294967296 response: body: - string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n\ - \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\"\ - :\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\"\ - ,\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\"\ - :null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2020-09-03\ - \ 06:57:16 UTC\",\"updated_at\":\"2020-09-03 06:57:16 UTC\",\"ipam\":\"DHCP\"\ - ,\"boot_mode\":\"DHCP\",\"id\":31,\"name\":\"Test Subnet\",\"description\"\ - :null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\"\ - :null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\"\ - :null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"\ - template_id\":null,\"template_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\"\ - :null,\"externalipam\":null,\"dns\":null,\"template\":null}]\n}\n" + string: "{\n \"total\": 1,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Subnet\\\"\",\n \"sort\": {\n + \ \"by\": null,\n \"order\": null\n },\n \"results\": [{\"network\":\"192.168.200.0\",\"network_type\":\"IPv4\",\"cidr\":27,\"mask\":\"255.255.255.224\",\"priority\":null,\"vlanid\":null,\"mtu\":1500,\"gateway\":null,\"dns_primary\":null,\"dns_secondary\":null,\"from\":null,\"to\":null,\"created_at\":\"2024-10-08 + 14:38:47 UTC\",\"updated_at\":\"2024-10-08 14:38:47 UTC\",\"ipam\":\"DHCP\",\"boot_mode\":\"DHCP\",\"nic_delay\":null,\"id\":11,\"name\":\"Test + Subnet\",\"description\":null,\"network_address\":\"192.168.200.0/27\",\"dhcp_id\":null,\"dhcp_name\":null,\"tftp_id\":null,\"tftp_name\":null,\"httpboot_id\":null,\"httpboot_name\":null,\"externalipam_id\":null,\"externalipam_name\":null,\"dns_id\":null,\"template_id\":null,\"template_name\":null,\"bmc_id\":null,\"bmc_name\":null,\"dhcp\":null,\"tftp\":null,\"httpboot\":null,\"externalipam\":null,\"dns\":null,\"template\":null,\"bmc\":null}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '926' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -101,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -118,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '868' status: code: 200 message: OK @@ -135,17 +123,19 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/api/subnets/31 + uri: https://foreman.example.org/api/subnets/11?show_hidden_parameters=true response: body: - string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2020-09-03 - 06:57:16 UTC","updated_at":"2020-09-03 06:57:16 UTC","ipam":"DHCP","boot_mode":"DHCP","id":31,"name":"Test - Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' + string: '{"network":"192.168.200.0","network_type":"IPv4","cidr":27,"mask":"255.255.255.224","priority":null,"vlanid":null,"mtu":1500,"gateway":null,"dns_primary":null,"dns_secondary":null,"from":null,"to":null,"created_at":"2024-10-08 + 14:38:47 UTC","updated_at":"2024-10-08 14:38:47 UTC","ipam":"DHCP","boot_mode":"DHCP","nic_delay":null,"id":11,"name":"Test + Subnet","description":null,"network_address":"192.168.200.0/27","dhcp_id":null,"dhcp_name":null,"tftp_id":null,"tftp_name":null,"httpboot_id":null,"httpboot_name":null,"externalipam_id":null,"externalipam_name":null,"dns_id":null,"template_id":null,"template_name":null,"bmc_id":null,"bmc_name":null,"dhcp":null,"tftp":null,"httpboot":null,"externalipam":null,"dns":null,"template":null,"bmc":null,"domains":[],"interfaces":[],"parameters":[],"locations":[],"organizations":[]}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '828' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -159,13 +149,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.1.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -176,8 +164,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '770' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/sync_plans_role-0.yml b/tests/test_playbooks/fixtures/sync_plans_role-0.yml index a2ff133e3..760c1362f 100644 --- a/tests/test_playbooks/fixtures/sync_plans_role-0.yml +++ b/tests/test_playbooks/fixtures/sync_plans_role-0.yml @@ -14,12 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.13.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '71' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -33,13 +35,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=100 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -50,8 +50,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '62' status: code: 200 message: OK @@ -70,17 +68,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2020-11-01 23:21:05 UTC\",\"updated_at\"\ - :\"2020-11-18 01:36:09 UTC\",\"id\":3,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 3,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2024-09-04 + 06:20:59 UTC\",\"updated_at\":\"2024-09-06 18:26:54 UTC\",\"id\":4,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '388' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -94,13 +93,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=99 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -111,8 +108,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '388' status: code: 200 message: OK @@ -128,10 +123,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/3/sync_plans?search=name%3D%22Weekly+Sync%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/4/sync_plans?search=name%3D%22Weekly+Sync%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Weekly + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Weekly Sync\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -140,6 +135,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '166' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -151,15 +148,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 3; Test Organization + - 4; Test Organization Foreman_version: - - 2.2.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=98 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -170,8 +165,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '151' status: code: 200 message: OK @@ -187,14 +180,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Red+Hat+Enterprise+Linux+Server%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22CentOS+Stream+9%22&per_page=4294967296 response: body: - string: '{"total":291,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Red - Hat Enterprise Linux Server\"","sort":{"by":"name","order":"asc"},"results":[{"id":126,"cp_id":"69","name":"Red - Hat Enterprise Linux Server","label":"Red_Hat_Enterprise_Linux_Server","description":null,"provider_id":4,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2020-11-18 - 01:41:16 UTC","last_sync_words":"about 13 hours","organization_id":3,"organization":{"name":"Test - Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":2}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"CentOS + Stream 9\"","sort":{"by":"name","order":"asc"},"results":[{"id":2,"cp_id":"333600040080","name":"CentOS + Stream 9","label":"CentOS_Stream_9","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test + Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} ' headers: @@ -202,6 +194,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '611' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -213,15 +207,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 3; Test Organization + - 4; Test Organization Foreman_version: - - 2.2.0 + - 3.13.0-develop Keep-Alive: - timeout=15, max=97 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -232,70 +224,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '671' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/3/products?search=name%3D%22Red+Hat+Enterprise+Linux+for+x86_64%22&per_page=4294967296 - response: - body: - string: '{"total":291,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Red - Hat Enterprise Linux for x86_64\"","sort":{"by":"name","order":"asc"},"results":[{"id":21,"cp_id":"479","name":"Red - Hat Enterprise Linux for x86_64","label":"Red_Hat_Enterprise_Linux_for_x86_64","description":null,"provider_id":4,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2020-11-18 - 01:41:23 UTC","last_sync_words":"about 13 hours","organization_id":3,"organization":{"name":"Test - Organization","label":"Test_Organization","id":3},"sync_plan":null,"repository_count":1}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 3; Test Organization - Foreman_version: - - 2.2.0 - Keep-Alive: - - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Frame-Options: - - sameorigin - X-Permitted-Cross-Domain-Policies: - - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '683' status: code: 200 message: OK @@ -316,12 +244,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/organizations/3/sync_plans + uri: https://foreman.example.org/katello/api/organizations/4/sync_plans response: body: - string: ' {"id":2,"organization_id":3,"name":"Weekly Sync","description":null,"interval":"weekly","next_sync":"2020-11-19 - 00:00:00 UTC","sync_date":"2020-11-19 00:00:00 UTC","created_at":"2020-11-18 - 14:38:58 UTC","updated_at":"2020-11-18 14:38:58 UTC","enabled":true,"foreman_tasks_recurring_logic_id":2,"cron_expression":null,"products":[],"permissions":{"view_sync_plans":true,"edit_sync_plans":true,"destroy_sync_plans":true}} + string: ' {"id":1,"organization_id":4,"name":"Weekly Sync","description":null,"interval":"weekly","next_sync":"2024-09-12 + 00:00:00 UTC","sync_date":"2020-11-19 00:00:00 +0000","created_at":"2024-09-06 + 18:27:00 UTC","updated_at":"2024-09-06 18:27:00 UTC","enabled":true,"foreman_tasks_recurring_logic_id":4,"cron_expression":null,"products":[],"permissions":{"view_sync_plans":true,"edit_sync_plans":true,"destroy_sync_plans":true}} ' headers: @@ -329,6 +257,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '424' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -340,15 +270,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 3; Test Organization + - 4; Test Organization Foreman_version: - - 2.2.0 + - 3.13.0-develop Keep-Alive: - - timeout=15, max=95 + - timeout=15, max=96 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked X-Content-Type-Options: - nosniff X-Download-Options: @@ -363,7 +291,7 @@ interactions: code: 201 message: Created - request: - body: '{"product_ids": [21, 126]}' + body: '{"product_ids": [2]}' headers: Accept: - application/json;version=2 @@ -372,22 +300,19 @@ interactions: Connection: - keep-alive Content-Length: - - '26' + - '20' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/organizations/3/sync_plans/2/add_products + uri: https://foreman.example.org/katello/api/organizations/4/sync_plans/1/add_products response: body: - string: ' {"id":2,"organization_id":3,"name":"Weekly Sync","description":null,"interval":"weekly","next_sync":"2020-11-19 - 00:00:00 UTC","sync_date":"2020-11-19 00:00:00 UTC","created_at":"2020-11-18 - 14:38:58 UTC","updated_at":"2020-11-18 14:38:58 UTC","enabled":true,"foreman_tasks_recurring_logic_id":2,"cron_expression":null,"products":[{"id":21,"cp_id":"479","name":"Red - Hat Enterprise Linux for x86_64","label":"Red_Hat_Enterprise_Linux_for_x86_64","description":null,"sync_state":null,"last_sync":"2020-11-18 - 01:41:23 UTC","last_sync_words":"about 13 hours","repository_count":1},{"id":126,"cp_id":"69","name":"Red - Hat Enterprise Linux Server","label":"Red_Hat_Enterprise_Linux_Server","description":null,"sync_state":null,"last_sync":"2020-11-18 - 01:41:16 UTC","last_sync_words":"about 13 hours","repository_count":2}],"permissions":{"view_sync_plans":true,"edit_sync_plans":true,"destroy_sync_plans":true}} + string: ' {"id":1,"organization_id":4,"name":"Weekly Sync","description":null,"interval":"weekly","next_sync":"2024-09-12 + 00:00:00 UTC","sync_date":"2020-11-19 00:00:00 +0000","created_at":"2024-09-06 + 18:27:00 UTC","updated_at":"2024-09-06 18:27:00 UTC","enabled":true,"foreman_tasks_recurring_logic_id":4,"cron_expression":null,"products":[{"id":2,"cp_id":"333600040080","name":"CentOS + Stream 9","label":"CentOS_Stream_9","description":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"repository_count":1}],"permissions":{"view_sync_plans":true,"edit_sync_plans":true,"destroy_sync_plans":true}} ' headers: @@ -395,6 +320,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '604' Content-Security-Policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -406,15 +333,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 3; Test Organization + - 4; Test Organization Foreman_version: - - 2.2.0 + - 3.13.0-develop Keep-Alive: - - timeout=15, max=94 + - timeout=15, max=95 Strict-Transport-Security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff X-Download-Options: @@ -425,8 +350,6 @@ interactions: - none X-XSS-Protection: - 1; mode=block - content-length: - - '905' status: code: 200 message: OK diff --git a/tests/test_playbooks/hostgroup.yml b/tests/test_playbooks/hostgroup.yml index 9a566712d..e1e8d473f 100644 --- a/tests/test_playbooks/hostgroup.yml +++ b/tests/test_playbooks/hostgroup.yml @@ -99,6 +99,22 @@ - include_tasks: tasks/hostgroup.yml vars: hostgroup_state: absent + - include_tasks: tasks/hostgroup.yml + vars: + hostgroup_state: absent + hostgroup_name: "{{ item }}" + loop: + - "Nested New host group" + - "New host group/Nested New host group 1" + - "New host group/Nested New host group 10" + - "New host group/Nested New host group 2" + - "New host group/Nested New host group/New host group with nested parent" + - "New host group/Whatever Child" + - "New host group" + - "New host group with nested parent" + - "New host group with puppet classes" + - "Super New host group" + - "Super New host group 2" - hosts: tests collections: @@ -132,6 +148,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: present expected_change: true @@ -161,6 +183,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: present expected_change: true @@ -189,6 +217,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: present expected_change: false @@ -218,6 +252,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: present expected_change: true @@ -246,6 +286,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: present expected_change: true @@ -274,6 +320,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: present expected_change: false @@ -302,6 +354,12 @@ value: value1 - name: subnet_param2 value: value2 + - name: hidden_secret + value: super_secret + hidden_value: true + - name: excplicit_text + value: not_secret + hidden_value: false hostgroup_state: absent expected_change: true @@ -575,6 +633,22 @@ - vars/server.yml - vars/hostgroup.yml tasks: + - include_tasks: tasks/hostgroup.yml + vars: + hostgroup_state: absent + hostgroup_name: "{{ item }}" + loop: + - "Nested New host group" + - "New host group/Nested New host group 1" + - "New host group/Nested New host group 10" + - "New host group/Nested New host group 2" + - "New host group/Nested New host group/New host group with nested parent" + - "New host group/Whatever Child" + - "New host group" + - "New host group with nested parent" + - "New host group with puppet classes" + - "Super New host group" + - "Super New host group 2" - include_tasks: tasks/config_group.yml vars: config_group_name: "{{ item }}" diff --git a/tests/test_playbooks/inventory_plugin.yml b/tests/test_playbooks/inventory_plugin.yml index e3de08a13..76598d525 100644 --- a/tests/test_playbooks/inventory_plugin.yml +++ b/tests/test_playbooks/inventory_plugin.yml @@ -1,5 +1,7 @@ --- - hosts: container + vars_files: + - vars/inventory.yml vars: foreman_groups: - name: group_a @@ -13,14 +15,13 @@ testhost1.example.com: group_a testhost2.example.com: group_b/group_c foreman_container: "quay.io/foreman/foreman" - foreman_version: "3.7-stable" + foreman_version: "3.12-stable" foreman_host: "foreman" foreman_port: "3000" - postgres_version: "12" + postgres_version: "13" postgres_host: "postgres" postgres_port: 5432 collections: - - community.docker - redhat.satellite tasks: - name: test inventory diff --git a/tests/test_playbooks/inventory_plugin_ansible.yml b/tests/test_playbooks/inventory_plugin_ansible.yml index 6b5b62163..99c8c1793 100644 --- a/tests/test_playbooks/inventory_plugin_ansible.yml +++ b/tests/test_playbooks/inventory_plugin_ansible.yml @@ -1,5 +1,7 @@ --- - hosts: container + vars_files: + - vars/inventory.yml vars: foreman_groups: - name: group_a @@ -13,14 +15,13 @@ testhost1.example.com: group_a testhost2.example.com: group_b/group_c foreman_container: "quay.io/evgeni/foreman-ansible" - foreman_version: "3.7-ansible" + foreman_version: "3.12-ansible" foreman_host: "foremanansible" foreman_port: "3001" - postgres_version: "12" + postgres_version: "13" postgres_host: "postgresansible" postgres_port: 5433 collections: - - community.docker - redhat.satellite tasks: - name: test inventory diff --git a/tests/test_playbooks/luna_hostgroup.yml b/tests/test_playbooks/luna_hostgroup.yml index b16615d75..09a2e972f 100644 --- a/tests/test_playbooks/luna_hostgroup.yml +++ b/tests/test_playbooks/luna_hostgroup.yml @@ -1,4 +1,5 @@ -# `ansible-galaxy role install thulium_drake.motd -p /usr/share/ansible/roles` +# ansible-galaxy role install thulium_drake.motd -p /usr/share/ansible/roles +# hammer ansible roles sync --proxy-id 1 --role-names thulium_drake.motd --- - hosts: localhost collections: diff --git a/tests/test_playbooks/resource_info.yml b/tests/test_playbooks/resource_info.yml index b00154ca8..628837e8d 100644 --- a/tests/test_playbooks/resource_info.yml +++ b/tests/test_playbooks/resource_info.yml @@ -35,7 +35,7 @@ return_length: 1 - include_tasks: tasks/search_facts.yml vars: - resource: subnets + resource: http_proxies return_length: 0 - include_tasks: tasks/search_facts.yml vars: @@ -74,7 +74,7 @@ ignore_errors: true - fail: msg: "{{ result.msg }} should have contained all available resources" - when: "'config_groups' not in result.msg" + when: "'hostgroups' not in result.msg" - hosts: localhost collections: diff --git a/tests/test_playbooks/subnet.yml b/tests/test_playbooks/subnet.yml index e5c6d22b3..9bcfff553 100644 --- a/tests/test_playbooks/subnet.yml +++ b/tests/test_playbooks/subnet.yml @@ -1,6 +1,6 @@ --- ## Requires the following: -## foreman-installer --foreman-proxy-dns true --foreman-proxy-httpboot +## foreman-installer --foreman-proxy-dns true --foreman-proxy-httpboot true --foreman-proxy-tftp - hosts: localhost collections: diff --git a/tests/test_playbooks/sync_plans_role.yml b/tests/test_playbooks/sync_plans_role.yml index 5bf5718f6..067617542 100644 --- a/tests/test_playbooks/sync_plans_role.yml +++ b/tests/test_playbooks/sync_plans_role.yml @@ -11,20 +11,17 @@ vars: organization_name: "Test Organization" organization_state: "present" - roles: - - role: repositories + - name: create products and repos + include_role: + name: repositories vars: satellite_organization: "Test Organization" satellite_products: - - name: Red Hat Enterprise Linux Server - repository_sets: - - name: Red Hat Satellite Tools 6.7 (for RHEL 7 Server) (RPMs) - basearch: x86_64 - - name: Red Hat Enterprise Linux 7 Server - Extras (RPMs) - basearch: x86_64 - - name: Red Hat Enterprise Linux for x86_64 - repository_sets: - - name: Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (RPMs) + - name: CentOS Stream 9 + repositories: + - name: BaseOS x86_64 + content_type: yum + url: https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/ - hosts: tests collections: @@ -41,5 +38,17 @@ interval: weekly sync_date: 2020-11-19 00:00:00 UTC products: - - Red Hat Enterprise Linux Server - - Red Hat Enterprise Linux for x86_64 + - CentOS Stream 9 + +- hosts: localhost + collections: + - redhat.satellite + gather_facts: false + vars_files: + - vars/server.yml + tasks: + - name: delete test organization + include_tasks: tasks/organization.yml + vars: + organization_name: "Test Organization" + organization_state: "absent" diff --git a/tests/test_playbooks/tasks/inventory_plugin.yml b/tests/test_playbooks/tasks/inventory_plugin.yml index 093f6c4e5..fff954c9b 100644 --- a/tests/test_playbooks/tasks/inventory_plugin.yml +++ b/tests/test_playbooks/tasks/inventory_plugin.yml @@ -1,6 +1,11 @@ --- -- name: setup - include_tasks: inventory_plugin_setup.yml +- name: setup containers + include_tasks: inventory_plugin_setup_container.yml + when: + - inventory_use_container | bool + +- name: setup data + include_tasks: inventory_plugin_setup_data.yml - name: Refresh inventory to ensure new instances exist in inventory meta: refresh_inventory @@ -11,10 +16,6 @@ include_tasks: inventory_plugin_tests.yml always: - name: remove containers - docker_container: - name: "{{ item }}" - state: absent - loop: - - "{{ foreman_host }}" - - "{{ foreman_host }}dynflow" - - "{{ postgres_host }}" + include_tasks: inventory_plugin_teardown_container.yml + when: + - inventory_use_container | bool diff --git a/tests/test_playbooks/tasks/inventory_plugin_setup.yml b/tests/test_playbooks/tasks/inventory_plugin_setup_container.yml similarity index 50% rename from tests/test_playbooks/tasks/inventory_plugin_setup.yml rename to tests/test_playbooks/tasks/inventory_plugin_setup_container.yml index 9d4a4b699..51b16ef08 100644 --- a/tests/test_playbooks/tasks/inventory_plugin_setup.yml +++ b/tests/test_playbooks/tasks/inventory_plugin_setup_container.yml @@ -1,16 +1,16 @@ --- - name: fetch PostgreSQL container - docker_image: + community.docker.docker_image: name: docker.io/library/postgres:{{ postgres_version }} source: pull - name: fetch Foreman container - docker_image: + community.docker.docker_image: name: "{{ foreman_container }}:{{ foreman_version }}" source: pull - name: start PostgreSQL container - docker_container: + community.docker.docker_container: name: "{{ postgres_host }}" image: docker.io/library/postgres:{{ postgres_version }} env: @@ -22,12 +22,12 @@ - "0.0.0.0:{{ postgres_port }}:5432" - name: start Foreman container - docker_container: + community.docker.docker_container: name: "{{ foreman_host }}" image: "{{ foreman_container }}:{{ foreman_version }}" command: bash -c "bundle exec bin/rails db:create db:migrate && bundle exec bin/rails db:seed && bundle exec bin/rails server -b 0.0.0.0" env: - SEED_ADMIN_PASSWORD: changeme + SEED_ADMIN_PASSWORD: "{{ inventory_password }}" RAILS_ENV: production DATABASE_URL: postgres://foreman:foreman@{{ ansible_default_ipv4['address'] }}:{{ postgres_port }}/foreman?pool=5 published_ports: @@ -35,9 +35,9 @@ - name: wait for foreman to start status_info: - username: admin - password: changeme - server_url: http://127.0.0.1:{{ foreman_port }}/ + username: "{{ inventory_username }}" + password: "{{ inventory_password }}" + server_url: "{{ inventory_foreman_url }}" register: result until: - result is success @@ -46,62 +46,10 @@ delay: 10 - name: start dynflow container - docker_container: + community.docker.docker_container: name: "{{ foreman_host }}dynflow" image: "{{ foreman_container }}:{{ foreman_version }}" command: bash -c "bundle exec rake dynflow:executor" env: RAILS_ENV: production DATABASE_URL: postgres://foreman:foreman@{{ ansible_default_ipv4['address'] }}:{{ postgres_port }}/foreman?pool=5 - -- name: create test hostgroups - hostgroup: - username: admin - password: changeme - server_url: http://127.0.0.1:{{ foreman_port }}/ - name: "{{ item.name }}" - parent: "{{ item.parent | default(omit) }}" - organizations: - - Default Organization - locations: - - Default Location - with_items: "{{ foreman_groups }}" - -- name: create test hosts - host: - username: admin - password: changeme - server_url: http://127.0.0.1:{{ foreman_port }}/ - name: "{{ item.key }}" - hostgroup: "{{ item.value }}" - build: false - organization: Default Organization - location: Default Location - managed: false - parameters: - - name: testparam1 - value: testvalue1 - - name: testparam2 - value: testvalue2 - with_dict: "{{ foreman_hosts }}" - -- name: submit facts for hosts - uri: - url: http://127.0.0.1:{{ foreman_port }}/api/hosts/facts - url_username: admin - url_password: changeme - validate_certs: false - method: POST - body: - name: "{{ item.key }}" - facts: - fqdn: "{{ item.key }}" - domain: example.com - famtesthost: true - operatingsystem: CentOS - operatingsystemrelease: "7.7" - force_basic_auth: true - status_code: 201 - body_format: json - with_dict: "{{ foreman_hosts }}" - ignore_errors: true diff --git a/tests/test_playbooks/tasks/inventory_plugin_setup_data.yml b/tests/test_playbooks/tasks/inventory_plugin_setup_data.yml new file mode 100644 index 000000000..3df312790 --- /dev/null +++ b/tests/test_playbooks/tasks/inventory_plugin_setup_data.yml @@ -0,0 +1,54 @@ +--- +- name: create test hostgroups + hostgroup: + username: "{{ inventory_username }}" + password: "{{ inventory_password }}" + server_url: "{{ inventory_foreman_url }}" + validate_certs: false + name: "{{ item.name }}" + parent: "{{ item.parent | default(omit) }}" + organizations: + - Default Organization + locations: + - Default Location + with_items: "{{ foreman_groups }}" + +- name: create test hosts + host: + username: "{{ inventory_username }}" + password: "{{ inventory_password }}" + server_url: "{{ inventory_foreman_url }}" + validate_certs: false + name: "{{ item.key }}" + hostgroup: "{{ item.value }}" + build: false + organization: Default Organization + location: Default Location + managed: false + parameters: + - name: testparam1 + value: testvalue1 + - name: testparam2 + value: testvalue2 + with_dict: "{{ foreman_hosts }}" + +- name: submit facts for hosts + uri: + url: "{{ inventory_foreman_url }}/api/hosts/facts" + url_username: "{{ inventory_username }}" + url_password: "{{ inventory_password }}" + validate_certs: false + method: POST + body: + name: "{{ item.key }}" + facts: + fqdn: "{{ item.key }}" + domain: example.com + famtesthost: true + operatingsystem: CentOS + operatingsystemrelease: "7.7" + force_basic_auth: true + status_code: 201 + body_format: json + with_dict: "{{ foreman_hosts }}" + ignore_errors: true diff --git a/tests/test_playbooks/tasks/inventory_plugin_teardown_container.yml b/tests/test_playbooks/tasks/inventory_plugin_teardown_container.yml new file mode 100644 index 000000000..1ca5b0a99 --- /dev/null +++ b/tests/test_playbooks/tasks/inventory_plugin_teardown_container.yml @@ -0,0 +1,9 @@ +--- +- name: remove containers + community.docker.docker_container: + name: "{{ item }}" + state: absent + loop: + - "{{ foreman_host }}" + - "{{ foreman_host }}dynflow" + - "{{ postgres_host }}" diff --git a/tests/test_playbooks/vars/inventory.yml b/tests/test_playbooks/vars/inventory.yml new file mode 100644 index 000000000..d4858b2a8 --- /dev/null +++ b/tests/test_playbooks/vars/inventory.yml @@ -0,0 +1,5 @@ +--- +inventory_use_container: true +inventory_foreman_url: http://127.0.0.1:{{ foreman_port }} +inventory_username: admin +inventory_password: changeme diff --git a/vendor.py b/vendor.py index 219012d3b..e6128d8c4 100644 --- a/vendor.py +++ b/vendor.py @@ -56,6 +56,8 @@ typing_imports.update([element.strip(',') for element in line.split('#')[0].strip().split(' ')[3:] if not element.strip(',') == 'TYPE_CHECKING']) if ('pass' in line or 'TYPE_CHECKING =' in line or ('from apypie' in line and 'if TYPE_CHECKING:' in buffer_lines)) and ('from typing' in buffer_lines[1] or 'from apypie' in buffer_lines[1]): buffer_lines.clear() + elif "from typing" in line: + typing_imports.update([element.strip(',') for element in line.split('#')[0].strip().split(' ')[3:] if not element.strip(',') == 'TYPE_CHECKING']) else: # inject a blank line before class or import statements if (line.startswith('class ') or line.startswith('import ') or line.startswith('def ')) and not output_lines[-1].startswith('import '): @@ -67,5 +69,5 @@ output_lines.extend(buffer_lines) buffer_lines.clear() -typing_lines = ['try:', ' from typing import {} # pylint: disable=unused-import # noqa: F401'.format(', '.join(sorted(typing_imports))), 'except ImportError:', ' pass'] +typing_lines = ['from typing import {} # pylint: disable=unused-import # noqa: F401'.format(', '.join(sorted(typing_imports)))] print("\n".join(header_lines + typing_lines + output_lines))