envprobe.vartypes.colon_separated.ColonSeparatedArray

class ColonSeparatedArray(name, raw_value='')

A helper class that binds the array’s separator to :.

__init__(name, raw_value='')

Methods

__init__(name[, raw_value])

apply_diff(diff)

Applies the given diff actions.

diff(old, new)

Generate an iterable difference "actions" between two variables.

insert_at(idx, elem)

Insert the element at a given index.

merge_diff(diff_a, diff_b)

Merges the two diffs into a diff that simulates applying diff_a first and then diff_b.

raw()

Convert the value to raw shell representation, i.e. a str separated by separator.

remove_value(elem)

Removes all occurrences of elem from the array.

type_description()

A list of strings in an array, separated by :

Attributes

extended_attributes

Returns the object managing the extended attributes (user-facing knowledge) about the variable.

name

The name of the variable.

separator

Get the separator the object was instantiated with.

value

Get the copy of the value of the variable, as a list.