def test_hskskillet(hsk): """ Same as above but using the alt directory structure """ sc = hsk.build() context = create_context("config_variables.yaml") sk = sc.get_skillet("panos") sk.template(context) snippets = sk.select_snippets("HomeSkillet_base", ["address"]) assert len(snippets) > 0
def test_gpsskillet(gps): """ Same as above but using the alt directory structure """ sc = gps.build() context = create_context("config_variables.yaml") sk = sc.get_skillet("panos") sk.template(context) snippets = sk.select_snippets("basic", ["Rulebase"]) assert len(snippets) > 0
def test_select_entry(g): """ Test the selection of a specific entry within a snippet. """ sc = g.build() context = create_context("config_variables.yaml") sk = sc.get_skillet("panos") sk.template(context) snippets = sk.select_snippets("snippets", ["tag/Outbound"]) assert len(snippets) == 1
def test_context(g): """ Test the proper templating of snippets using the YAML configuration file. """ sc = g.build() context = create_context("config_variables.yaml") sk = sc.get_skillet("panorama") sk.template(context) snippets = sk.select_snippets("snippets", ["device_mgt_config"]) for snippet in snippets: print("{} {}".format(snippet.name, snippet.rendered_xmlstr)) assert len(snippets) > 0