Plugin: aj.plugins.augeas.api

class aj.plugins.augeas.api.Augeas(modules=[], loadpath=None)[source]

A smarter and faster wrapper around augeas.Augeas.augeas

For faster startup, no modules and lenses are preloaded:

aug = Augeas(modules=[{
    'name': 'Interfaces',  # module name
    'lens': 'Interfaces.lns',  # lens name
    'incl': [  # included files list
        self.path,
        self.path + '.d/*',
    ]
}])

Don’t forget to call load() afterwards.

dump(path)[source]

Dumps contents under path to stdout.

get(path)[source]
match(path)[source]
raise_error()[source]

Extracts error information from Augeas tree and raises AugeasError

save()[source]
set(path, value)[source]
setd(path, value, default=None)[source]

Sets path to value, or removes path if value == default

class aj.plugins.augeas.api.AugeasEndpoint(context)[source]

Implement this to provide Augeas trees to the frontend.

get_augeas()[source]

Should return a ready-to-use Augeas

get_root_path()[source]

Should return an Augeas path of the root node to be provided to the frontend.

id = None
exception aj.plugins.augeas.api.AugeasError(aug)[source]

Comments

comments powered by Disqus