kojismokydingo.cli.tags

Koji Smoky Dingo - CLI Tag and Target Commands

author:

Christopher O'Brien <obriencj@gmail.com>

license:

GPL v3

class AffectedTargets(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 = 'Show targets impacted by changes to the given tag(s)'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

exception BadArch[source]

Bases: BadDingo

complaint: str = 'Architecture problem'
exception BadSwap[source]

Bases: BadDingo

complaint: str = 'Wonky inheritance swap requested'
class BlockEnvVar(name=None)[source]

Bases: TagSmokyDingo

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 = 'Block a mock environment variable from a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class BlockRPMMacro(name=None)[source]

Bases: TagSmokyDingo

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 = 'Block an RPM Macro from a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class CheckRepo(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 = "Check the freshness of a tag's repo"

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class FilterTags(name=None)[source]

Bases: AnonSmokyDingo, TagSifting

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 = 'Filter a list of tags'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class ListEnvVars(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 = 'Show mock environment variables for a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class ListRPMMacros(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 = 'Show RPM Macros for a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class ListTagExtras(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 = 'Show extra settings for a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

exception NoSuchEnvVar[source]

Bases: NoSuchTagExtra

complaint: str = 'Environment variable is not defined at this tag'
exception NoSuchInheritance[source]

Bases: BadDingo

complaint: str = 'No such inheritance link'
exception NoSuchMacro[source]

Bases: NoSuchTagExtra

complaint: str = 'Macro is not defined at this tag'
exception NoSuchTagExtra[source]

Bases: BadDingo

complaint: str = 'Extra setting is not defined at this tag'
class RemoveEnvVar(name=None)[source]

Bases: TagSmokyDingo

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 = 'Remove a mock environment variable from a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class RemoveRPMMacro(name=None)[source]

Bases: TagSmokyDingo

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 = 'Remove an RPM Macro from a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class RenumTagInheritance(name=None)[source]

Bases: TagSmokyDingo

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 = 'Renumbers inheritance priorities of a tag, preserving order'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

validate(parser, options)[source]

Override to perform validation on options values. Return value is ignored, use parser.error if needed.

class RepoQuery(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 = "Query the contents of a tag's repo"

Short description of this command, for use in the help output

property enabled
handle(options)[source]

Perform the full set of actions for this command.

validate(parser, options)[source]

Override to perform validation on options values. Return value is ignored, use parser.error if needed.

class SetEnvVar(name=None)[source]

Bases: TagSmokyDingo

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 = 'Set a mock environment variable on a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

validate(parser, options)[source]

Override to perform validation on options values. Return value is ignored, use parser.error if needed.

class SetRPMMacro(name=None)[source]

Bases: TagSmokyDingo

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 = 'Set an RPM Macro on a tag'

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

class SwapTagInheritance(name=None)[source]

Bases: TagSmokyDingo

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 = "Swap a tag's inheritance"

Short description of this command, for use in the help output

handle(options)[source]

Perform the full set of actions for this command.

cli_affected_targets(session, tag_list, build_tags=False, info=False, quiet=None)[source]

Implements the koji affected-targets command

Parameters:
  • session (ClientSession) -- an active koji client session

  • tag_list (List[int | str | TagInfo]) -- list of tags by name or ID

  • build_tags (bool) -- output the names of the child build tags rather than the impacted targets

  • info (bool) -- print the info for impacted targets rather than just the name

  • quiet (bool | None) -- suppress summary output

Raises:

NoSuchTag -- if any of the tags in tag_list could not be found

Returns:

0 indicating there were impacted targets, or 1 if no impacted targets were found

Since:

1.0

Return type:

int

cli_check_repo(session, tagname, target=False, quiet=False, verbose=False, show_events=False, utc=False)[source]

Implements the koji check-repo command

Since:

2.0

Parameters:
Return type:

int

cli_filter_tags(session, tag_list, search=None, regex=None, tag_sifter=None, sorting=None, outputs=None, strict=False)[source]

Implements the koji filter-tags command

Since:

1.0

Parameters:
  • session (ClientSession)

  • tag_list (List[int | str])

  • search (str | None)

  • regex (str | None)

  • tag_sifter (Sifter | None)

  • sorting (str | None)

  • outputs (dict | None)

  • strict (bool)

cli_list_env_vars(session, tagname, target=False, quiet=None, defn=False, json=False)[source]
Parameters:
cli_list_rpm_macros(session, tagname, target=False, quiet=None, defn=False, json=False)[source]
Parameters:
cli_list_tag_extras(session, tagname, target=False, blocked=False, quiet=None, json=False)[source]
Parameters:
cli_renum_tag(session, tagname, begin=10, step=10, verbose=False, test=False)[source]
Parameters:
cli_repoquery(session, goptions, tagname, target=False, arch=None, cachedir=None, cacheonly=False, quiet=False, queryformat=None, keys=None, filterms=None)[source]
Parameters:
Return type:

int

cli_set_env_var(session, tagname, var, value=None, remove=False, block=False, target=False)[source]

If remove is True, value and block are ignored. The setting will be removed from the tag's extra settings.

If block is True, value is ignored. A block entry will be added to the tag's extra settings.

If remove and block are both False, then the value will be assigned to the tag's extra settings.

If target is True, then tagname is actually the name of a target. That target's build tag will be the tag that is therefore modified.

Parameters:
cli_set_rpm_macro(session, tagname, macro, value=None, remove=False, block=False, target=False)[source]

If remove is True, value and block are ignored. The setting will be removed from the tag's extra settings.

If block is True, value is ignored. A block entry will be added to the tag's extra settings.

If remove and block are both False, then the value will be assigned to the tag's extra settings.

If target is True, then tagname is actually the name of a target. That target's build tag will be the tag that is therefore modified.

Parameters:
cli_swap_inheritance(session, tagname, old_parent, new_parent, verbose=False, test=False)[source]
Parameters: