noc.commands.beef

Module Contents

class noc.commands.beef.Command

Bases: noc.core.management.base.BaseCommand

CLI_ENCODING = quopri
DEFAULT_BEEF_PATH_TEMPLATE = ad-hoc/{0.profile.name}/{0.pool.name}/{0.address}.beef.json.bz2
DEFAULT_BEEF_IMPORT_PATH_TEMPLATE = imports/{0.box.profile}/{0.uuid}.beef.json.bz2
DEFAULT_TEST_CASE_TEMPLATE = ad-hoc/{0.profile.name}/{0.uuid}/
rx_arg
add_arguments(self, parser)
handle(self, cmd, *args, **options)
handle_collect(self, storage, path, spec, force, objects, description=None, *args, **options)
handle_view(self, storage, path=None, *args, **options)
handle_export(self, storage, path, export_path=None, *args, **options)

Export Beef to yaml file :param storage: :param path: :param export_path: :return:

handle_import(self, storage, path=None, paths=None, *args, **options)

Importing yaml file to beef :param storage: :param path: :param paths: :return:

handle_list(self, storage=None, *args, **options)
handle_run(self, path, storage, script, pretty=False, yaml=False, access_preference='SC', arguments=None, *args, **options)
handle_create_test_case(self, storage=None, path=None, config_storage=None, config_path=None, test_storage=None, test_path=None, build=False, *args, **options)
handle_build_test_case(self, test_storage, test_path, cfg=None, *args, **options)
get_storage(self, name, beef=False, beef_test=False, beef_test_config=False)

Get beef storage by name :param name: :type name: str :param beef: :type beef: bool :param beef_test: :type beef_test: bool :param beef_test_config: :type beef_test_config: bool :return: :rtype: ExtStorage

get_beef(self, storage, path)

Get beef :param storage: Storage instance :param path: Beef path :return:

get_config(self, storage=None, path=None)
beef_filter(self, storage=None, path='/', uuids=None, profile=None, with_tests=False)

Get beef storage by name :param storage: :param path: :param uuids: :param profile: :param with_tests: :return: :rtype: list

get_test_configs(self, storage)

Getting test config from beef folder * base config - first yaml * if config has beef uuid - config for beef

get_script_args(self, arguments)

Parse arguments and return script’s

class noc.commands.beef.ServiceStub(pool)

Bases: object

class ServiceConfig(pool, tos=None)

Bases: object