How to use the aj.plugins.augeas.api.Augeas function in aj

To help you get started, we’ve selected a few aj examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ajenti / ajenti / plugins / network / aug.py View on Github external
def get_augeas(self):
        return Augeas(modules=[{
            'name': 'Hosts',
            'lens': 'Hosts.lns',
            'incl': [
                '/etc/hosts',
            ]
github ajenti / ajenti / plugins / network / managers / debian_manager.py View on Github external
def get_augeas(self):
        aug = Augeas(modules=[{
            'name': 'Interfaces',
            'lens': 'Interfaces.lns',
            'incl': [
                self.path,
                self.path + '.d/*',
            ]
        }])
        aug.load()
        return aug
github ajenti / ajenti / plugins / network / managers / gentoo_manager.py View on Github external
def get_augeas(self):
        aug = Augeas(modules=[{
            'name': 'Shellvars',
            'lens': 'Shellvars.lns',
            'incl': [
                self.path,
            ]
        }])
        aug.load()
        return aug
github ajenti / ajenti / plugins / network / managers / centos_manager.py View on Github external
def get_augeas(self, iface):
        aug = Augeas(modules=[{
            'name': 'Shellvars',
            'lens': 'Shellvars.lns',
            'incl': [
                os.path.join(self.path, 'ifcfg-' + iface),
            ]
        }])
        aug.load()
        return aug
github ajenti / ajenti / plugins / supervisor / aug.py View on Github external
def get_augeas(self):
        return Augeas(
            modules=[{
                'name': 'Supervisor',
                'lens': 'Supervisor.lns',
                'incl': [
                    self.path,
                ]
            }],
            loadpath=PluginManager.get(aj.context).get_content_path('supervisor', ''),
        )