# -*- coding=utf-8 -*-
import logging

import sysctl

from middlewared.service import private, Service

logger = logging.getLogger(__name__)


class SystemService(Service):
    is_vm = None

    @private
    def vm(self):
        if self.is_vm is None:
            self.is_vm = sysctl.filter("kern.vm_guest")[0].value != "none"

        return self.is_vm

42c70730c36d69e24c68a4c979ae6f05d078352e
<mask token>


class SystemService(Service):
    <mask token>
    <mask token>

<mask token>


class SystemService(Service):
    is_vm = None

    @private
    def vm(self):
        if self.is_vm is None:
            self.is_vm = sysctl.filter('kern.vm_guest')[0].value != 'none'
        return self.is_vm

<mask token>
logger = logging.getLogger(__name__)


class SystemService(Service):
    is_vm = None

    @private
    def vm(self):
        if self.is_vm is None:
            self.is_vm = sysctl.filter('kern.vm_guest')[0].value != 'none'
        return self.is_vm

import logging
import sysctl
from middlewared.service import private, Service
logger = logging.getLogger(__name__)


class SystemService(Service):
    is_vm = None

    @private
    def vm(self):
        if self.is_vm is None:
            self.is_vm = sysctl.filter('kern.vm_guest')[0].value != 'none'
        return self.is_vm

# -*- coding=utf-8 -*-
import logging

import sysctl

from middlewared.service import private, Service

logger = logging.getLogger(__name__)


class SystemService(Service):
    is_vm = None

    @private
    def vm(self):
        if self.is_vm is None:
            self.is_vm = sysctl.filter("kern.vm_guest")[0].value != "none"

        return self.is_vm
