MCPcopy Create free account
hub / github.com/apache/cloudstack / config

Method config

python/lib/cloudutils/serviceConfig.py:741–763  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

739 virtstoraged");
740
741 def config(self):
742 try:
743 self.setupLiveMigration()
744
745 filename = "/etc/libvirt/qemu.conf"
746
747 cfo = configFileOps(filename, self)
748 cfo.addEntry("security_driver", "\"none\"")
749 cfo.addEntry("user", "\"root\"")
750 cfo.addEntry("group", "\"root\"")
751 configure_libvirt_tls(self.syscfg.env.secure, cfo)
752 cfo.save()
753
754 if os.path.exists("/lib/systemd/system/libvirtd.service"):
755 bash("systemctl restart libvirtd")
756 else:
757 self.syscfg.svo.stopService("libvirt-bin")
758 self.syscfg.svo.enableService("libvirt-bin")
759 if os.path.exists("/lib/systemd/system/libvirt-bin.socket"):
760 bash("systemctl stop libvirt-bin.socket")
761 return True
762 except:
763 raise
764
765 def restore(self):
766 try:

Callers

nothing calls this directly

Calls 9

setupLiveMigrationMethod · 0.95
configFileOpsClass · 0.90
configure_libvirt_tlsFunction · 0.85
bashClass · 0.85
saveMethod · 0.65
existsMethod · 0.65
enableServiceMethod · 0.65
addEntryMethod · 0.45
stopServiceMethod · 0.45

Tested by

no test coverage detected