kojismokydingo.cli.clients¶
Koji Smoky Dingo - CLI Client Commands
- author:
Christopher O'Brien <obriencj@gmail.com>
- license:
GPL v3
- class ClientConfig(name=None)[source]¶
Bases:
AnonSmokyDingo
- Parameters:
name (str) -- The name that this command is being represented as
- activate()[source]¶
Activate our session. This is triggered after validate, before pre_handle and handle
The session and goptions attributes will have been set just prior.
- arguments(parser)[source]¶
Override to add relevant arguments to the given parser instance. May return an alternative parser instance or None.
- Parameters:
parser -- the parser to decorate with additional arguments
- description: str = 'Show client profile settings'¶
Short description of this command, for use in the help output
- class ClientOpen(name=None)[source]¶
Bases:
AnonSmokyDingo
- Parameters:
name (str) -- The name that this command is being represented as
- arguments(parser)[source]¶
Override to add relevant arguments to the given parser instance. May return an alternative parser instance or None.
- Parameters:
parser -- the parser to decorate with additional arguments
- description: str = 'Launch web UI for koji data elements'¶
Short description of this command, for use in the help output
- cli_client_config(session, goptions, only=(), quiet=False, config=False, json=False)[source]¶
Implements the
koji client-config
command
- cli_open(session, goptions, datatype, element, command=None)[source]¶
Implements the
koji open
command
- get_open_command(profile=None, err=True)[source]¶
Determine the command used to open URLs. Attempts to load profile-specific plugin configuration under the heading 'open' and the key 'command' first. If that doesn't find a command, then fall back to the per-platform mappings in the
OPEN_CMD
dict.
- get_open_url(session, goptions, datatype, element)[source]¶
Given a client configuration, datatype, and element identifier, produce a URL referencing the hub or topdir path for that record.
- Parameters:
session (ClientSession) -- an active koji client session
goptions (GOptions | None) -- koji client options. If None, an appropriate object will be reconstructed from the session opts.
datatype (str) -- name of the data type
element (str | int | Dict) -- identifier for an element of the given data type, or the loaded element itself
- Since:
2.0
- Return type: