buildtest.menu.buildspec

Module Contents

Functions

func_buildspec_edit(args)

This method implement buildtest buildspec edit which

func_buildspec_find(args)

Entry point for buildtest buildspec find. This method

func_buildspec_view(args)

This method implements buildtest buildspec view which shows

func_buildspec_view_edit(buildspec, view=False, edit=False)

This is a shared method for buildtest buildspec view and

get_all_tags(cache)

get_buildspecfiles(cache)

rebuild_buildspec_cache(paths)

buildtest.menu.buildspec.func_buildspec_edit(args)

This method implement buildtest buildspec edit which allows one to edit a Buildspec file with one of the editors set in buildtest settings.

buildtest.menu.buildspec.func_buildspec_find(args)

Entry point for buildtest buildspec find. This method will attempt to read for buildspec cache file (BUILDSPEC_CACHE_FILE) if found and print a list of all buildspecs. Otherwise, it will read the repo file (REPO_FILE) and find all buildspecs and validate them via BuildspecParser. BuildspecParser will raise SystemError or ValidationError if a buildspec is invalid which will be added to list of invalid buildspecs. Finally we print a list of all valid buildspecs and any invalid buildspecs are written to file along with error message.

Parameters

Parameters

args – Input argument from command line passed from argparse

Returns

A list of valid buildspecs found in all repositories.

buildtest.menu.buildspec.func_buildspec_view(args)

This method implements buildtest buildspec view which shows content of a buildspec file

buildtest.menu.buildspec.func_buildspec_view_edit(buildspec, view=False, edit=False)

This is a shared method for buildtest buildspec view and buildtest buildspec edit.

Parameters: :param buildspec: buildspec file section to view or edit. :param view: boolean to determine if we want to view buildspec file :param edit: boolean to control if we want to edit buildspec file in editor. :return: Shows the content of buildspec or let’s user interactively edit buildspec. An exception can be raised if it’s unable to find buildspec

buildtest.menu.buildspec.get_all_tags(cache)
buildtest.menu.buildspec.get_buildspecfiles(cache)
buildtest.menu.buildspec.rebuild_buildspec_cache(paths)