Revision 07788a0b

b/lib/hypervisor/hv_kvm.py
68 68
IFF_NO_PI = 0x1000
69 69
IFF_VNET_HDR = 0x4000
70 70

  
71
#: SPICE parameters which depend on L{constants.HV_KVM_SPICE_BIND}
72
_SPICE_ADDITIONAL_PARAMS = frozenset([
73
  constants.HV_KVM_SPICE_IP_VERSION,
74
  constants.HV_KVM_SPICE_PASSWORD_FILE,
75
  constants.HV_KVM_SPICE_LOSSLESS_IMG_COMPR,
76
  constants.HV_KVM_SPICE_JPEG_IMG_COMPR,
77
  constants.HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR,
78
  constants.HV_KVM_SPICE_STREAMING_VIDEO_DETECTION,
79
  constants.HV_KVM_SPICE_USE_TLS,
80
  ])
81

  
71 82

  
72 83
def _ProbeTapVnetHdr(fd):
73 84
  """Check whether to enable the IFF_VNET_HDR flag.
......
1957 1968
    else:
1958 1969
      # All the other SPICE parameters depend on spice_bind being set. Raise an
1959 1970
      # error if any of them is set without it.
1960
      spice_additional_params = frozenset([
1961
        constants.HV_KVM_SPICE_IP_VERSION,
1962
        constants.HV_KVM_SPICE_PASSWORD_FILE,
1963
        constants.HV_KVM_SPICE_LOSSLESS_IMG_COMPR,
1964
        constants.HV_KVM_SPICE_JPEG_IMG_COMPR,
1965
        constants.HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR,
1966
        constants.HV_KVM_SPICE_STREAMING_VIDEO_DETECTION,
1967
        constants.HV_KVM_SPICE_USE_TLS,
1968
        ])
1969
      for param in spice_additional_params:
1971
      for param in _SPICE_ADDITIONAL_PARAMS:
1970 1972
        if hvparams[param]:
1971 1973
          raise errors.HypervisorError("spice: %s requires %s to be set" %
1972 1974
                                       (param, constants.HV_KVM_SPICE_BIND))

Also available in: Unified diff