# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library Public License for more details.
#
+from ceph_detect_init import alpine
from ceph_detect_init import centos
from ceph_detect_init import debian
from ceph_detect_init import exc
distro = _normalized_distro_name(distro)
distributions = {
+ 'alpine': alpine,
'debian': debian,
'ubuntu': debian,
'linuxmint': debian,
--- /dev/null
+distro = None
+release = None
+codename = None
+
+
+def choose_init():
+ """Select a init system
+
+ Returns the name of a init system (upstart, sysvinit ...).
+ """
+ return 'openrc'
--- /dev/null
+FROM alpine:3.4
+
+RUN apk --update add --no-cache py-pip py-virtualenv git bash
class TestCephDetectInit(testtools.TestCase):
+ def test_alpine_3_4(self):
+ self.assertEqual('openrc', run('alpine-3.4'))
+
def test_centos_6(self):
self.assertEqual('sysvinit', run('centos-6'))
import testtools
import ceph_detect_init
+from ceph_detect_init import alpine
from ceph_detect_init import centos
from ceph_detect_init import debian
from ceph_detect_init import exc
class TestCephDetectInit(testtools.TestCase):
+ def test_alpine(self):
+ self.assertEqual('openrc', alpine.choose_init())
+
def test_centos(self):
with mock.patch('ceph_detect_init.centos.release',
'7.0'):