+ # due to the LXC requirements
+ # What we have to consider here is that libervirt on Fedora 18
+ # uses the following line:
+ # /proc/1253/cgroup:6:freezer:/machine.slice/auto_sirius.libvirt-lxc
+ # While the libvirt on Fedora 20 and 21 uses the following line:
+ # /proc/1253/cgroup:6:freezer:/machine.slice/machine-lxc\x2del_sirius.scope
+ # Further documentation on:
+ # https://libvirt.org/cgroups.html#systemdScope
+ virt = get_node_virt()
+ if virt == 'lxc':
+ # This is for Fedora 20 or later
+ regexf20orlater = re.compile(r'machine-lxc\\x2d(.+).scope')
+ isf20orlater = regexf20orlater.search(slice_name_check)
+ if isf20orlater:
+ slice_name_check = isf20orlater.group(1)
+ else:
+ # This is for Fedora 18
+ slice_name_check = slice_name_check.rsplit('.')[0]