pydevDAG._decorations._node_decorators module — pydevDAG 1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »
- pydevDAG._decorations package »

# pydevDAG._decorations._node_decorators module

## pydevDAG._decorations._node_decorators

Tools to decorate networkx graphs in situ, i.e., as constructed rather than as read from a textual file.

class `pydevDAG._decorations._node_decorators.` `DevlinkValues`

  Bases: `object`

  Add the informational part of device links to the graph.

  static `decorated`(graph)

    Returns elements that get decorated.

  classmethod `devlink_values`(context, graph, categories)

    Get devlink values for graph nodes that correspond to devices.

    Parameters: | context (Context) – the udev context graph – the graph categories (list of str) – a list of devlink categories
    Returns: | dict of property name, node, property value
    Return type: | dict of str * str * ((list of str) or NoneType)

  static `values`(context, element, categories)

    Get device links values on this element.

    Returns: | a map of devicelinks values
    Return type: | dict of str * (list of str * NoneType)

class `pydevDAG._decorations._node_decorators.` `SysfsAttributes`

  Bases: `object`

  Find sysfs attributes for the device nodes of a network graph.

  static `attributes`(context, element, names)

    Get attributes on this element.

    Returns: | a map of sysfs attributes
    Return type: | dict of str * (str or NoneType)

  static `decorated`(graph)

    Returns elements that get decorated.

  classmethod `sysfs_attributes`(context, graph, names)

    Get sysfs attributes for graph nodes that correspond to devices.

    Parameters: | context (Context) – the udev context graph – the graph names (list of str) – a list of property keys
    Returns: | dict of property name, node, property value
    Return type: | dict

class `pydevDAG._decorations._node_decorators.` `UdevProperties`

  Bases: `object`

  Find udev properties for the device nodes of a network graph.

  static `decorated`(graph)

    Returns elements that get decorated.

  static `properties`(context, element, names)

    Get properties on this element.

    Returns: | a map of udev properties
    Return type: | dict

  classmethod `udev_properties`(context, graph, names)

    Get udev properties for graph nodes that correspond to devices.

    Parameters: | context (Context) – the udev context graph – the graph names (list of str) – a list of property keys
    Returns: | dict of property name, node, property value
    Return type: | dict

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »
- pydevDAG._decorations package »