From b01a804fd2d5beaa2b7385cda7b5da0734ecfa82 Mon Sep 17 00:00:00 2001 From: David Moore Date: Thu, 13 Jun 2024 11:05:17 -0400 Subject: [PATCH] docstrings --- robottelo/host_helpers/api_factory.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/robottelo/host_helpers/api_factory.py b/robottelo/host_helpers/api_factory.py index 19840ffd0f5..b7a67292c3b 100644 --- a/robottelo/host_helpers/api_factory.py +++ b/robottelo/host_helpers/api_factory.py @@ -485,8 +485,8 @@ def register_host_and_needed_setup( param force : bool, optional Force registration of the client to bypass? Default is False. A reused fixture content host will fail if already registered. - param loc : object, optional - Pass a location object to limit host visibility. Default is None, + param loc : instance, optional + Pass a location to limit host visibility. Default is None, making the client available to all locations. Required arguments below, can be any of the following type: @@ -505,6 +505,9 @@ def register_host_and_needed_setup( Pass a Content-View instance, name, or id. Example: can pass string name 'Default Organization View'. + Note: The Default Organization View cannot be published, promoted, edited etc, + but you can register the client to it. Use the 'Library' environment. + 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. @@ -514,20 +517,19 @@ def register_host_and_needed_setup( 6. Register the host using the activation-key associated with the content. 7. Add a rex_key to the client if desired. - Return: dict containing following entries - if succeeeded: - result: success - client: client + Return: dictionary containing the following entries + if succeeded: + result: 'success' + client: registered host client organization: entities['Organization'] activation_key: entities['ActivationKey'] environment: entities['LifecycleEnvironment'] content_view: entities['ContentView'] if failed: - result: error + result: 'error' client: None, unless registration was successful message: Details of the failure encountered - """ method_error = {