xcp.net.ifrename.dynamic¶
Object for manipulating dynamic rules.
The dynamic rules file on disk is a JSON file with optional line comments beginning with a # character.
- class xcp.net.ifrename.dynamic.DynamicRules(path=None, fd=None)[source]¶
Bases:
objectObject for parsing the dynamic rules configuration.
There are two distinct usecases; the installer needs to write the dynamic rules from scratch, whereas interface-rename.py in dom0 needs to read and write them.
- load_and_parse()[source]¶
Parse the dynamic rules file. Returns boolean indicating success or failure.