Skip to content

Commit

Permalink
Refactor: Deprecate hash_passphrase filter in favor of snmp_hash (#3470)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc authored Jan 8, 2024
1 parent 1045709 commit 98749b6
Show file tree
Hide file tree
Showing 33 changed files with 133 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ The below requirements are needed on the host that executes this module.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Markdown to process. |
| skip_lines | integer | optional | 0 | | Skip the first x lines when parsing the input Markdown. |
| toc_levels | integer | optional | 3 | | How many levels of headings will be included in the TOC. |
| toc_marker | string | optional | <!-- toc --> | | TOC will be inserted or updated between two of markers in the input Markdown. |
| <samp>_input</samp> | string | True | None | | Markdown to process. |
| <samp>skip_lines</samp> | integer | optional | 0 | | Skip the first x lines when parsing the input Markdown. |
| <samp>toc_levels</samp> | integer | optional | 3 | | How many levels of headings will be included in the TOC. |
| <samp>toc_marker</samp> | string | optional | <!-- toc --> | | TOC will be inserted or updated between two of markers in the input Markdown. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Note \- if there is a non\-dictionary value with no secondary key provided, it w

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | any | True | None | | Dictionary to convert \- returned untouched if not a nested dictionary/list. |
| primary_key | string | optional | name | | Name of the primary key used when inserting outer dictionary keys into items. |
| secondary_key | string | optional | None | | Name of the secondary key used when inserting dictionary values which are list into items. |
| <samp>_input</samp> | any | True | None | | Dictionary to convert \- returned untouched if not a nested dictionary/list. |
| <samp>primary_key</samp> | string | optional | name | | Name of the primary key used when inserting outer dictionary keys into items. |
| <samp>secondary_key</samp> | string | optional | None | | Name of the secondary key used when inserting dictionary values which are list into items. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Only for internal use.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | Valid values:<br>- <code>eos_cli_config_gen</code><br>- <code>eos_designs</code> | ID of AVD Schema. |
| type | string | True | None | Valid values:<br>- <code>documentation_tables</code><br>- <code>jsonschema</code> | Type of schema to convert to. |
| <samp>_input</samp> | string | True | None | Valid values:<br>- <code>eos_cli_config_gen</code><br>- <code>eos_designs</code> | ID of AVD Schema. |
| <samp>type</samp> | string | True | None | Valid values:<br>- <code>documentation_tables</code><br>- <code>jsonschema</code> | Type of schema to convert to. |

## Return Values

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Note \- For now this filter only supports decryption from type <code>7</code> an

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Encrypted EOS password. |
| passwd_type | string | True | None | Valid values:<br>- <code>bgp</code><br>- <code>ospf_simple</code><br>- <code>ospf_message_digest</code> | Type of password to decrypt.<br><code>bgp</code> and <code>ospf\_simple</code> requires the <em>password</em> and <em>key</em> inputs.<br><code>ospf\_message\_digest</code> requires the <em>password</em>, <em>key</em>, <em>hash\_algorithm</em>, <em>key\_id</em> inputs. |
| key | string | True | None | | Encryption key. The value depends on the type of password.<br>For BGP passwords the key is the Neighbor IP or the BGP Peer Group Name in EOS.<br>For OSPF passwords the key is the interface name \(e.g., <code>Ethernet1</code>\). |
| hash_algorithm | string | optional | None | Valid values:<br>- <code>md5</code><br>- <code>sha1</code><br>- <code>sha256</code><br>- <code>sha384</code><br>- <code>sha512</code> | Hash algorithm to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |
| key_id | integer | optional | None | Min value: <code>1</code><br>Max value: <code>255</code> | Key ID to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |
| <samp>_input</samp> | string | True | None | | Encrypted EOS password. |
| <samp>passwd_type</samp> | string | True | None | Valid values:<br>- <code>bgp</code><br>- <code>ospf_simple</code><br>- <code>ospf_message_digest</code> | Type of password to decrypt.<br><code>bgp</code> and <code>ospf\_simple</code> requires the <em>password</em> and <em>key</em> inputs.<br><code>ospf\_message\_digest</code> requires the <em>password</em>, <em>key</em>, <em>hash\_algorithm</em>, <em>key\_id</em> inputs. |
| <samp>key</samp> | string | True | None | | Encryption key. The value depends on the type of password.<br>For BGP passwords the key is the Neighbor IP or the BGP Peer Group Name in EOS.<br>For OSPF passwords the key is the interface name \(e.g., <code>Ethernet1</code>\). |
| <samp>hash_algorithm</samp> | string | optional | None | Valid values:<br>- <code>md5</code><br>- <code>sha1</code><br>- <code>sha256</code><br>- <code>sha384</code><br>- <code>sha512</code> | Hash algorithm to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |
| <samp>key_id</samp> | integer | optional | None | Min value: <code>1</code><br>Max value: <code>255</code> | Key ID to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ As a last resort, the filter will return <code>None</code>.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | any | True | None | | Default value to check. Will be returned untouched if <code>not undefined</code> and <code>not None</code>. |
| default_values | any | optional | None | | One or more default values will be tested individually, and the first valid value will be used. |
| <samp>_input</samp> | any | True | None | | Default value to check. Will be returned untouched if <code>not undefined</code> and <code>not None</code>. |
| <samp>default_values</samp> | any | optional | None | | One or more default values will be tested individually, and the first valid value will be used. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Note \- For now this filter only supports encryption from type <code>7</code> an

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Clear text password to be encrypted. |
| passwd_type | string | True | None | Valid values:<br>- <code>bgp</code><br>- <code>ospf_simple</code><br>- <code>ospf_message_digest</code> | Type of password to encrypt.<br><code>bgp</code> and <code>ospf\_simple</code> requires the <em>password</em> and <em>key</em> inputs.<br><code>ospf\_message\_digest</code> requires the <em>password</em>, <em>key</em>, <em>hash\_algorithm</em>, <em>key\_id</em> inputs. |
| key | string | True | None | | Encryption key. The value depends on the type of password.<br>For BGP passwords, the key is the Neighbor IP or the BGP Peer Group Name in EOS.<br>For OSPF passwords, the key is the interface name \(e.g., <code>Ethernet1</code>\). |
| hash_algorithm | string | optional | None | Valid values:<br>- <code>md5</code><br>- <code>sha1</code><br>- <code>sha256</code><br>- <code>sha384</code><br>- <code>sha512</code> | Hash algorithm to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |
| key_id | integer | optional | None | Min value: <code>1</code><br>Max value: <code>255</code> | Key ID to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |
| <samp>_input</samp> | string | True | None | | Clear text password to be encrypted. |
| <samp>passwd_type</samp> | string | True | None | Valid values:<br>- <code>bgp</code><br>- <code>ospf_simple</code><br>- <code>ospf_message_digest</code> | Type of password to encrypt.<br><code>bgp</code> and <code>ospf\_simple</code> requires the <em>password</em> and <em>key</em> inputs.<br><code>ospf\_message\_digest</code> requires the <em>password</em>, <em>key</em>, <em>hash\_algorithm</em>, <em>key\_id</em> inputs. |
| <samp>key</samp> | string | True | None | | Encryption key. The value depends on the type of password.<br>For BGP passwords, the key is the Neighbor IP or the BGP Peer Group Name in EOS.<br>For OSPF passwords, the key is the interface name \(e.g., <code>Ethernet1</code>\). |
| <samp>hash_algorithm</samp> | string | optional | None | Valid values:<br>- <code>md5</code><br>- <code>sha1</code><br>- <code>sha256</code><br>- <code>sha384</code><br>- <code>sha512</code> | Hash algorithm to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |
| <samp>key_id</samp> | integer | optional | None | Min value: <code>1</code><br>Max value: <code>255</code> | Key ID to use with <em>passwd\_type\=\"ospf\_message\_digest\"</em>. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Concatenates the given <em>esi\_prefix</em> and <em>short\_esi</em>.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Short ESI value as per AVD definition in eos\_designs. |
| esi_prefix | string | optional | 0000:0000: | | ESI prefix value. Will be concatenated with the <em>short\_esi</em>. |
| <samp>_input</samp> | string | True | None | | Short ESI value as per AVD definition in eos\_designs. |
| <samp>esi_prefix</samp> | string | optional | 0000:0000: | | ESI prefix value. Will be concatenated with the <em>short\_esi</em>. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Replaces <code>\:</code> with <code>.</code>

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Short ESI value as per AVD definition in eos\_designs. |
| <samp>_input</samp> | string | True | None | | Short ESI value as per AVD definition in eos\_designs. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Removes <code>\:</code> and inserts new <code>\:</code> for each two characters.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Short ESI value as per AVD definition in eos\_designs. |
| <samp>_input</samp> | string | True | None | | Short ESI value as per AVD definition in eos\_designs. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Replace the input data by \"\<removed\>\" if the hide\_passwords parameter is tr

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | raw | True | None | | Value to replace. |
| hide_passwords | bool | True | None | | Flag to indicate whether or not the string should be replaced. |
| <samp>_input</samp> | raw | True | None | | Value to replace. |
| <samp>hide_passwords</samp> | bool | True | None | | Flag to indicate whether or not the string should be replaced. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ The filter matches if any filter strings are found in the input hostname.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | One hostname to match with <em>hostname\_filter</em>. |
| hostname_filter | any | True | None | | Filter as a list of strings or <code>None</code>. |
| <samp>_input</samp> | string | True | None | | One hostname to match with <em>hostname\_filter</em>. |
| <samp>hostname_filter</samp> | any | True | None | | Filter as a list of strings or <code>None</code>. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Provides the capability to generate a string representing ranges of VLANs or VNI

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | list | True | None | | List of integers to compress into a range. |
| <samp>_input</samp> | list | True | None | | List of integers to compress into a range. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The filter will return an empty list if the value parsed to arista.avd.natural\_

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | any | True | None | | List or dictionary |
| sort_key | string | optional | None | | Key to sort on when sorting a list of dictionaries |
| <samp>_input</samp> | any | True | None | | List or dictionary |
| <samp>sort_key</samp> | string | optional | None | | Key to sort on when sorting a list of dictionaries |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Within a single range, prefixes \(ex. Ethernet, Eth, Po\) are carried over to it

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | any | True | None | | Range as string or list of ranges. |
| <samp>_input</samp> | any | True | None | | Range as string or list of ranges. |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Key localization as described in [RFC 2574 section 2.6](https://www.rfc-editor.o

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | dictionary | True | None | | Dictionary with SNMP passphrase details. |
| passphrase | string | True | None | | The passphrase to localize.<br>This is the \"auth\" passphrase when the <em>priv</em> argument is not set.<br>If <em>priv</em> is set, it is the \"priv\" passphrase. |
| auth | string | True | None | Valid values:<br>- <code>md5</code><br>- <code>sha</code><br>- <code>sha224</code><br>- <code>sha256</code><br>- <code>sha384</code><br>- <code>sha512</code> | Auth type |
| engine_id | string | True | None | | A hexadecimal string containing the engine\_id to be used to localize the passphrase |
| priv | string | optional | None | Valid values:<br>- <code>des</code><br>- <code>aes</code><br>- <code>aes192</code><br>- <code>aes256</code> | Priv type |
| <samp>_input</samp> | dictionary | True | None | | Dictionary with SNMP passphrase details. |
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;passphrase</samp> | string | True | None | | The passphrase to localize.<br>This is the \"auth\" passphrase when the <em>priv</em> argument is not set.<br>If <em>priv</em> is set, it is the \"priv\" passphrase. |
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;auth</samp> | string | True | None | Valid values:<br>- <code>md5</code><br>- <code>sha</code><br>- <code>sha224</code><br>- <code>sha256</code><br>- <code>sha384</code><br>- <code>sha512</code> | Auth type |
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;engine_id</samp> | string | True | None | | A hexadecimal string containing the engine\_id to be used to localize the passphrase |
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;priv</samp> | string | optional | None | Valid values:<br>- <code>des</code><br>- <code>aes</code><br>- <code>aes192</code><br>- <code>aes256</code> | Priv type |

## Return Values

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Returns <code>\:white\_check\_mark\:</code> if input status string is <code>PASS

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| _input | string | True | None | | Text to convert to EMOJI. |
| rendering | string | True | None | | Markdown Flavor to use for Emoji rendering. Only \"github\" is supported. |
| <samp>_input</samp> | string | True | None | | Text to convert to EMOJI. |
| <samp>rendering</samp> | string | True | None | | Markdown Flavor to use for Emoji rendering. Only \"github\" is supported. |

## Return Values

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Destination file mode is hardcoded to 0o664.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| template | str | True | None | | Path to Jinja2 Template file |
| dest_format_string | str | True | None | | Format string used to specify target file for each item. \'item\' is the current item from \'items\'. Like \"mypath/\{item\}.md\" |
| items | list | True | None | | List of strings. Each list item is passed to \'dest\_format\_string\' as \'item\' and passed to templater as \'item\' |
| <samp>template</samp> | str | True | None | | Path to Jinja2 Template file |
| <samp>dest_format_string</samp> | str | True | None | | Format string used to specify target file for each item. \'item\' is the current item from \'items\'. Like \"mypath/\{item\}.md\" |
| <samp>items</samp> | list | True | None | | List of strings. Each list item is passed to \'dest\_format\_string\' as \'item\' and passed to templater as \'item\' |

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Build configuration to publish configlets to Cloudvision.

| Argument | Type | Required | Default | Value Restrictions | Description |
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| configlet_dir | str | True | None | | Directory where configlets are located. |
| configlet_prefix | str | True | None | | Prefix to append on configlet. |
| destination | str | False | None | | File where to save information. |
| configlet_extension | str | False | conf | | File extension to look for. |
| <samp>configlet_dir</samp> | str | True | None | | Directory where configlets are located. |
| <samp>configlet_prefix</samp> | str | True | None | | Prefix to append on configlet. |
| <samp>destination</samp> | str | False | None | | File where to save information. |
| <samp>configlet_extension</samp> | str | False | conf | | File extension to look for. |

## Examples

Expand Down
Loading

0 comments on commit 98749b6

Please sign in to comment.