예제 #1
0
 def get_augeas(self):
     return Augeas(modules=[{
         'name': 'Resolv',
         'lens': 'Resolv.lns',
         'incl': [
             '/etc/resolv.conf',
         ]
     }])
예제 #2
0
 def get_augeas(self):
     return Augeas(modules=[{
         'name': 'Hosts',
         'lens': 'Hosts.lns',
         'incl': [
             '/etc/hosts',
         ]
     }])
 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
예제 #4
0
 def get_augeas(self):
     aug = Augeas(modules=[{
         'name': 'Shellvars',
         'lens': 'Shellvars.lns',
         'incl': [
             self.path,
         ]
     }])
     aug.load()
     return aug
예제 #5
0
 def get_augeas(self):
     aug = Augeas(modules=[{
         'name': 'Interfaces',
         'lens': 'Interfaces.lns',
         'incl': [
             self.path,
             self.path + '.d/*',
         ]
     }])
     aug.load()
     return aug
예제 #6
0
 def get_augeas(self):
     return Augeas(
         modules=[{
             'name': 'Supervisor',
             'lens': 'Supervisor.lns',
             'incl': [
                 self.path,
             ]
         }],
         loadpath=PluginManager.get(aj.context).get_content_path(
             'supervisor', ''),
     )
예제 #7
0
    def get_augeas(self):
        """
        Read the content of interfaces config files through augeas.

        :return: Augeas object
        :rtype: augeas
        """

        aug = Augeas(modules=[{
            'name': 'Shellvars',
            'lens': 'Shellvars.lns',
            'incl': [
                self.path,
            ]
        }])
        aug.load()
        return aug
예제 #8
0
    def get_augeas(self):
        """
        Read the content of /etc/network/interfaces through augeas.

        :return: Augeas object
        :rtype: augeas
        """

        aug = Augeas(modules=[{
            'name': 'Interfaces',
            'lens': 'Interfaces.lns',
            'incl': [
                self.path,
                self.path + '.d/*',
            ]
        }])
        aug.load()
        return aug
예제 #9
0
    def get_augeas(self, iface):
        """
        Read the content of interfaces config file through augeas.

        :param iface: Network interface, e.g. eth0
        :type iface: string
        :return: Augeas object
        :rtype: augeas
        """

        aug = Augeas(
            modules=[{
                'name': 'Shellvars',
                'lens': 'Shellvars.lns',
                'incl': [
                    os.path.join(self.path, 'ifcfg-' + iface),
                ]
            }])
        aug.load()
        return aug