Exemple #1
0
    def testLibvirtConfigureToSSLFalse(self):
        self.vdsm_cfg.set('vars', 'ssl', 'false')
        self._setConfig(
            ('LCONF', 'empty'),
            ('QCONF', 'empty'),
        )
        self.assertEquals(libvirt.isconfigured(), NO)

        libvirt.configure()

        self.assertEqual(libvirt.isconfigured(), MAYBE)
Exemple #2
0
    def testLibvirtConfigureToSSLFalse(self):
        self._setConfig(
            ('LCONF', 'empty'),
            ('VDSM_CONF', 'vdsm_no_ssl'),
            ('QCONF', 'empty'),
        )
        self.assertEquals(libvirt.isconfigured(), NO)

        libvirt.configure()

        self.assertEqual(libvirt.isconfigured(), MAYBE)
Exemple #3
0
 def testIsConfiguredNegative(self):
     _setConfig(
         self,
         ('LCONF', 'lconf_ssl'),
         ('QCONF', 'empty'),
     )
     self.assertEqual(libvirt.isconfigured(), NO)
Exemple #4
0
 def testIsConfiguredPositive(self):
     _setConfig(
         self,
         ('LCONF', 'lconf_ssl'),
         ('QCONF', 'qemu_ssl'),
     )
     self.assertEqual(libvirt.isconfigured(), MAYBE)
Exemple #5
0
 def testIsConfiguredTlsSocketEnabled(self):
     _setConfig(
         self,
         ('LCONF', 'lconf_ssl'),
         ('QCONF', 'qemu_ssl'),
     )
     self.assertEqual(libvirt.isconfigured(), MAYBE)
Exemple #6
0
    def testLibvirtConfigureToSSLFalse(self):
        self._setConfig(
            ('LCONF', 'empty'),
            ('VDSM_CONF', 'vdsm_no_ssl'),
            ('QCONF', 'empty'),
        )
        self.assertEquals(
            libvirt.isconfigured(),
            NO
        )

        libvirt.configure()

        self.assertEqual(
            libvirt.isconfigured(),
            MAYBE
        )
Exemple #7
0
    def testLibvirtConfigureToSSLFalse(self):
        self.vdsm_cfg.set('vars', 'ssl', 'false')
        self._setConfig(
            ('LCONF', 'empty'),
            ('QCONF', 'empty'),
        )
        self.assertEquals(
            libvirt.isconfigured(),
            NO
        )

        libvirt.configure()

        self.assertEqual(
            libvirt.isconfigured(),
            MAYBE
        )
Exemple #8
0
    def testLibvirtConfigureToSSLFalse(self):
        enabled_units = set()

        systemctl.enable = enabled_units.add
        libvirt._unit_enabled = lambda name: name in enabled_units

        self.vdsm_cfg.set('vars', 'ssl', 'false')
        _setConfig(
            self,
            ('LCONF', 'empty'),
            ('QCONF', 'empty'),
        )
        self.assertEqual(libvirt.isconfigured(), NO)

        libvirt.configure()

        self.assertEqual(libvirt.isconfigured(), MAYBE)
Exemple #9
0
 def testIsConfiguredTcpSocketEnabled(self):
     self.vdsm_cfg.set('vars', 'ssl', 'false')
     _setConfig(
         self,
         ('LCONF', 'lconf_ssl'),
         ('QCONF', 'qemu_ssl'),
     )
     self.assertEqual(libvirt.isconfigured(), MAYBE)
Exemple #10
0
 def testIsConfiguredNegative(self):
     self._setConfig(
         ('LCONF', 'lconf_ssl'),
         ('QCONF', 'empty'),
     )
     self.assertEqual(
         libvirt.isconfigured(),
         NO
     )
Exemple #11
0
 def testIsConfiguredTcpSocketDisabled(self):
     _setConfig(self,
                ('LCONF', 'lconf_ssl'),
                ('QCONF', 'qemu_ssl'),
                )
     self.assertEqual(
         libvirt.isconfigured(),
         NO
     )
Exemple #12
0
 def testIsConfiguredPositive(self):
     _setConfig(self,
                ('LCONF', 'lconf_ssl'),
                ('QCONF', 'qemu_ssl'),
                )
     self.assertEqual(
         libvirt.isconfigured(),
         MAYBE
     )
Exemple #13
0
    def testIsConfiguredPositive(self):
        self._setConfig(
            ('LCONF', 'lconf_ssl'),
            ('QCONF', 'qemu_ssl'),
            ('LRCONF', 'libvirt_logrotate')

        )
        self.assertEqual(
            libvirt.isconfigured(),
            MAYBE
        )