Skip to content

Commit

Permalink
refactor(libtofs): remove deprecated v1_path_prefix argument
Browse files Browse the repository at this point in the history
* Unused throughout all SaltStack Formulas
  • Loading branch information
myii committed Aug 8, 2019
1 parent c07471d commit ad2a965
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions template/libtofs.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lookup=None,
default_files_switch=['id', 'os_family'],
indent_width=6,
v1_path_prefix='',
use_subpath=False) %}
{#-
Returns a valid value for the "source" parameter of a "file.managed"
Expand All @@ -18,8 +17,6 @@
use as selector switch of the directories under
"<path_prefix>/files"
* indent_witdh: indentation of the result value to conform to YAML
* v1_path_prefix: (deprecated) only used for injecting a path prefix into
the source, to support older TOFS configs
* use_subpath: defaults to `False` but if set, lookup the source file
recursively from the current state directory up to `tplroot`
Expand Down Expand Up @@ -67,9 +64,7 @@
{%- set src_files = src_files + source_files %}
{#- Only add to [''] when supporting older TOFS implementations #}
{%- set path_prefix_exts = [''] %}
{%- if v1_path_prefix != '' %}
{%- do path_prefix_exts.append(v1_path_prefix) %}
{%- elif use_subpath and tplroot != tpldir %}
{%- if use_subpath and tplroot != tpldir %}
{#- Walk directory tree to find {{ files_dir }} #}
{%- set subpath_parts = tpldir.lstrip(tplroot).lstrip('/').split('/') %}
{%- for path in subpath_parts %}
Expand Down

0 comments on commit ad2a965

Please sign in to comment.