Coverage for nova/conf/novnc.py: 88%

8 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-04-24 11:16 +0000

1# Copyright (c) 2016 OpenStack Foundation 

2# All Rights Reserved. 

3# 

4# Licensed under the Apache License, Version 2.0 (the "License"); you may 

5# not use this file except in compliance with the License. You may obtain 

6# a copy of the License at 

7# 

8# http://www.apache.org/licenses/LICENSE-2.0 

9# 

10# Unless required by applicable law or agreed to in writing, software 

11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 

12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 

13# License for the specific language governing permissions and limitations 

14# under the License. 

15 

16from oslo_config import cfg 

17 

18novnc_opts = [ 

19 cfg.StrOpt('record', 

20 help=""" 

21Filename that will be used for storing websocket frames received 

22and sent by a proxy service (like VNC, spice, serial) running on this host. 

23If this is not set, no recording will be done. 

24"""), 

25 cfg.BoolOpt('daemon', 

26 default=False, 

27 help="Run as a background process."), 

28 cfg.BoolOpt('ssl_only', 

29 default=False, 

30 help=""" 

31Disallow non-encrypted connections. 

32 

33Related options: 

34 

35* cert 

36* key 

37"""), 

38 cfg.BoolOpt('source_is_ipv6', 

39 default=False, 

40 help="Set to True if source host is addressed with IPv6."), 

41 cfg.StrOpt('cert', 

42 default='self.pem', 

43 help=""" 

44Path to SSL certificate file. 

45 

46Related options: 

47 

48* key 

49* ssl_only 

50* [console] ssl_ciphers 

51* [console] ssl_minimum_version 

52"""), 

53 cfg.StrOpt('key', 

54 help=""" 

55SSL key file (if separate from cert). 

56 

57Related options: 

58 

59* cert 

60"""), 

61 cfg.StrOpt('web', 

62 default='/usr/share/spice-html5', 

63 help=""" 

64Path to directory with content which will be served by a web server. 

65"""), 

66] 

67 

68 

69def register_opts(conf): 

70 conf.register_opts(novnc_opts) 

71 

72 

73def register_cli_opts(conf): 

74 conf.register_cli_opts(novnc_opts) 

75 

76 

77def list_opts(): 

78 return {'DEFAULT': novnc_opts}