# Path: virtinst/support.py
# SUPPORT_CONN_STORAGE = 0
# SUPPORT_CONN_FINDPOOLSOURCES = 1
# SUPPORT_CONN_NODEDEV = 2
# SUPPORT_CONN_KEYMAP_AUTODETECT = 3
# SUPPORT_CONN_GETHOSTNAME = 4
# SUPPORT_CONN_DOMAIN_VIDEO = 5
# SUPPORT_CONN_NETWORK = 7
# SUPPORT_CONN_INTERFACE = 8
# SUPPORT_CONN_MAXVCPUS_XML = 9
# SUPPORT_CONN_STREAM = 10
# SUPPORT_DOMAIN_GETVCPUS = 1000
# SUPPORT_DOMAIN_XML_SECURE = 1001
# SUPPORT_DOMAIN_XML_INACTIVE = 1002
# SUPPORT_DOMAIN_MANAGED_SAVE = 1003
# SUPPORT_DOMAIN_MIGRATE_DOWNTIME = 1004
# SUPPORT_DOMAIN_JOB_INFO = 1005
# SUPPORT_DOMAIN_MAXVCPUS_XML = 1006
# SUPPORT_DOMAIN_CONSOLE_STREAM = 1007
# SUPPORT_STORAGE_CREATEVOLFROM = 2000
# SUPPORT_STORAGE_UPLOAD = 2001
# SUPPORT_NODEDEV_PCI_DETACH = 3000
# SUPPORT_INTERFACE_XML_INACTIVE = 4000
# SUPPORT_CONN_HV_VIRTIO = 5000
# SUPPORT_CONN_HV_SKIP_DEFAULT_ACPI = 5001
# SUPPORT_CONN_HV_SOUND_AC97 = 5002
# SUPPORT_CONN_HV_SOUND_ICH6 = 5003
# SUPPORT_CONN_HV_GRAPHICS_SPICE = 5004
# SUPPORT_CONN_HV_CHAR_SPICEVMC = 5005
# SUPPORT_CONN_HV_DIRECT_INTERFACE = 5006
# SUPPORT_CONN_HV_FILESYSTEM = 5007
# SUPPORT_STREAM_UPLOAD = 6000
# def _set_rhel6(val):
# def _get_rhel6():
# def _get_conn_from_object(obj):
# def _get_command(funcname, objname=None, obj=None):
# def _has_command(funcname, objname=None, obj=None):
# def _get_flag(flag_name):
# def _try_command(func, args, check_all_error=False):
# def _local_lib_ver():
# def _daemon_lib_ver(conn, uri, force_version, minimum_libvirt_version):
# def _hv_ver(conn, uri):
# def _split_function_name(function):
# def _check_support(conn, feature, data=None):
#     def get_value(key):
# def is_error_nosupport(err):
# def support_threading():
# def support_openauth():
# def check_conn_support(conn, feature):
# def check_conn_hv_support(conn, feature, hv):
# def check_domain_support(dom, feature):
# def check_pool_support(pool, feature):
# def check_nodedev_support(nodedev, feature):
# def check_interface_support(nodedev, feature):
# def check_stream_support(conn, feature):


import unittest
import utils
from virtinst import support
# it under the terms of the GNU General Public License as published by
# the Free  Software Foundation; either version 2 of the License, or
# (at your option)  any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.




conn = utils.open_testdriver()

class TestSupport(unittest.TestCase):

    def testSupportCollide(self):
        """
        Verify no support.SUPPORT* have the same value
        """
        valdict = {}
        supportnames = filter(lambda x: x.startswith("SUPPORT"),
                              dir(support))

        for supportname in supportnames:

# Path: virtinst/support.py
# SUPPORT_CONN_STORAGE = 0
# SUPPORT_CONN_FINDPOOLSOURCES = 1
# SUPPORT_CONN_NODEDEV = 2
# SUPPORT_CONN_KEYMAP_AUTODETECT = 3
# SUPPORT_CONN_GETHOSTNAME = 4
# SUPPORT_CONN_DOMAIN_VIDEO = 5
# SUPPORT_CONN_NETWORK = 7
# SUPPORT_CONN_INTERFACE = 8
# SUPPORT_CONN_MAXVCPUS_XML = 9
# SUPPORT_CONN_STREAM = 10
# SUPPORT_DOMAIN_GETVCPUS = 1000
# SUPPORT_DOMAIN_XML_SECURE = 1001
# SUPPORT_DOMAIN_XML_INACTIVE = 1002
# SUPPORT_DOMAIN_MANAGED_SAVE = 1003
# SUPPORT_DOMAIN_MIGRATE_DOWNTIME = 1004
# SUPPORT_DOMAIN_JOB_INFO = 1005
# SUPPORT_DOMAIN_MAXVCPUS_XML = 1006
# SUPPORT_DOMAIN_CONSOLE_STREAM = 1007
# SUPPORT_STORAGE_CREATEVOLFROM = 2000
# SUPPORT_STORAGE_UPLOAD = 2001
# SUPPORT_NODEDEV_PCI_DETACH = 3000
# SUPPORT_INTERFACE_XML_INACTIVE = 4000
# SUPPORT_CONN_HV_VIRTIO = 5000
# SUPPORT_CONN_HV_SKIP_DEFAULT_ACPI = 5001
# SUPPORT_CONN_HV_SOUND_AC97 = 5002
# SUPPORT_CONN_HV_SOUND_ICH6 = 5003
# SUPPORT_CONN_HV_GRAPHICS_SPICE = 5004
# SUPPORT_CONN_HV_CHAR_SPICEVMC = 5005
# SUPPORT_CONN_HV_DIRECT_INTERFACE = 5006
# SUPPORT_CONN_HV_FILESYSTEM = 5007
# SUPPORT_STREAM_UPLOAD = 6000
# def _set_rhel6(val):
# def _get_rhel6():
# def _get_conn_from_object(obj):
# def _get_command(funcname, objname=None, obj=None):
# def _has_command(funcname, objname=None, obj=None):
# def _get_flag(flag_name):
# def _try_command(func, args, check_all_error=False):
# def _local_lib_ver():
# def _daemon_lib_ver(conn, uri, force_version, minimum_libvirt_version):
# def _hv_ver(conn, uri):
# def _split_function_name(function):
# def _check_support(conn, feature, data=None):
#     def get_value(key):
# def is_error_nosupport(err):
# def support_threading():
# def support_openauth():
# def check_conn_support(conn, feature):
# def check_conn_hv_support(conn, feature, hv):
# def check_domain_support(dom, feature):
# def check_pool_support(pool, feature):
# def check_nodedev_support(nodedev, feature):
# def check_interface_support(nodedev, feature):
# def check_stream_support(conn, feature):


# Path: tests/support.py
import unittest
import utils
from virtinst import support

# it under the terms of the GNU General Public License as published by
# the Free  Software Foundation; either version 2 of the License, or
# (at your option)  any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.




conn = utils.open_testdriver()

class TestSupport(unittest.TestCase):

    def testSupportCollide(self):
        """
        Verify no support.SUPPORT* have the same value
        """
        valdict = {}
        supportnames = filter(lambda x: x.startswith("SUPPORT"),
                              dir(support))

        for supportname in supportnames:

            checkval = int(getattr(support, supportname))