示例#1
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = 'debian'
示例#2
0
 def __init__(self, name, cfg, paths):
     super().__init__(name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     cfg["ssh_svcname"] = "sshd"
     self.osfamily = platform.system().lower()
示例#3
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     self._runner = helpers.Runners(paths)
     self.osfamily = 'suse'
     cfg['ssh_svcname'] = 'sshd'
     if self.uses_systemd():
         self.init_cmd = ['systemctl']
         cfg['ssh_svcname'] = 'sshd.service'
示例#4
0
 def cloudify(self):
     # Form the needed options to cloudify our members
     return cloud.Cloud(self.datasource,
                        self.paths,
                        self.cfg,
                        self.distro,
                        helpers.Runners(self.paths),
                        reporter=self.reporter)
示例#5
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     self._runner = helpers.Runners(paths)
     self.osfamily = "suse"
     cfg["ssh_svcname"] = "sshd"
     if self.uses_systemd():
         self.init_cmd = ["systemctl"]
         cfg["ssh_svcname"] = "sshd.service"
示例#6
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = 'freebsd'
     self.ipv4_pat = re.compile(r"\s+inet\s+\d+[.]\d+[.]\d+[.]\d+")
     cfg['ssh_svcname'] = 'sshd'
示例#7
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = 'redhat'
     self._net_renderer = sysconfig.Renderer()
     cfg['ssh_svcname'] = 'sshd'
示例#8
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = 'gentoo'
     # Fix sshd restarts
     cfg['ssh_svcname'] = '/etc/init.d/sshd'
示例#9
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.default_locale = 'C.UTF-8'
     self.osfamily = 'alpine'
     cfg['ssh_svcname'] = 'sshd'
示例#10
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = "debian"
     self.default_locale = "en_US.UTF-8"
     self.system_locale = None
示例#11
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = "gentoo"
     # Fix sshd restarts
     cfg["ssh_svcname"] = "/etc/init.d/sshd"
     if distros.uses_systemd():
         LOG.error("Cloud-init does not support systemd with gentoo")
示例#12
0
 def __init__(self, name, cfg, paths):
     distros.Distro.__init__(self, name, cfg, paths)
     # This will be used to restrict certain
     # calls from repeatly happening (when they
     # should only happen say once per instance...)
     self._runner = helpers.Runners(paths)
     self.osfamily = 'debian'
     self._net_renderer = eni.Renderer({
         'eni_path': self.network_conf_fn,
         'eni_header': ENI_HEADER,
         'links_path_prefix': None,
         'netrules_path': None,
     })