From eefac8c23516bd044fbcd8a809832d3620423415 Mon Sep 17 00:00:00 2001 From: David Moore Date: Thu, 30 May 2024 11:34:55 -0400 Subject: [PATCH] no docstrings --- robottelo/host_helpers/api_factory.py | 78 +-------------------------- 1 file changed, 1 insertion(+), 77 deletions(-) diff --git a/robottelo/host_helpers/api_factory.py b/robottelo/host_helpers/api_factory.py index d3d4fc4fa2..dbac4d1a36 100644 --- a/robottelo/host_helpers/api_factory.py +++ b/robottelo/host_helpers/api_factory.py @@ -723,83 +723,7 @@ def register_host_and_needed_setup( force=False, loc=None, ): - """ - Helper will setup desired entities to host content. Then, register the - host client to the entities, using associated activation-key. - - Attempt to make needed associations between detached entities. - - Add desired repos to the content-view prior to calling this helper. - Or, add them to content-view after calling, then publish/promote. - - The host will be registered to location: None (visible to all locations). - - Parameters: - client : instance - An instance of a RHEL content host to register. - enable_repos : bool, optional - Enable all available repos on the client after registration? Default is False. - Be sure to enable any repo(s) for the client after calling this method. - rex_key : bool, optional - Add a Remote Execution Key to the client for satellite? Default is False. - force : bool, optional - Force registration of the client to bypass? Default is False. - A reused fixture content host will fail if already registered. - loc : object, optional - Pass a location object to limit host visibility. Default is None, - making the client available to all locations. - - The following arguments can be any of the following types: - - int: pass the id of the entity to be read - - str: pass the name of the entity to be searched - - entity: pass an entity instance - - organization : int, str, or entity - Pass an Organization instance, name, or id to use. - activation_key : int, str, or entity - Pass an Activation-Key instance, name, or id. - environment : int, str, or entity - Pass a Lifecycle-Environment instance, name, or id. - Example: can pass string name 'Library'. - content_view : int, str, or entity - Pass a Content-View instance, name, or id. - Example: can pass string name 'Default Organization View'. - - Notes: - 1. Will fail if passed entities do not exist in the same organization and satellite. - 2. Use param `enable_repos` to try enabling any repositories on the client - that were added to the content-view prior. But if there are no - repositories added/made available, this will fail. - 3. The 'Default Organization View' cannot be published, promoted, edited, or deleted, - but you can register the client to it. - - Steps: - 1. Get needed entities from arguments (id, name, or instance). Read all as instance. - 2. Publish the content-view if no versions exist or needs_publish. - 3. Promote the newest content-view-version if not in the environment already. Skip for 'Library'. - 4. Assign environment and content-view to the activation-key if not associated. - 5. If desired, enable all repositories from content-view for activation-key. - 6. Register the host using the activation-key associated with the content. - 7. Add a rex_key to the client if desired. - - Returns: dict - If succeeded: - { - 'result': 'success', - 'client': client, - 'organization': entities['Organization'], - 'activation_key': entities['ActivationKey'], - 'environment': entities['LifecycleEnvironment'], - 'content_view': entities['ContentView'], - } - - If failed: - { - 'result': 'error', - 'client': None, unless registration was successful, - 'message': Details of the failure encountered, - } - """ + # docstrings will be written in a future commit method_error = { 'result': 'error',