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

8 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-04-17 15:08 +0000

1# Copyright 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 

16 

17from oslo_config import cfg 

18 

19mks_group = cfg.OptGroup('mks', 

20 title='MKS Options', 

21 help=""" 

22Nova compute node uses WebMKS, a desktop sharing protocol to provide 

23instance console access to VM's created by VMware hypervisors. 

24 

25Related options: 

26 

27Following options must be set to provide console access. 

28 

29* mksproxy_base_url 

30* enabled 

31""") 

32 

33mks_opts = [ 

34 cfg.URIOpt('mksproxy_base_url', 

35 schemes=['http', 'https'], 

36 default='http://127.0.0.1:6090/', 

37 help=""" 

38Location of MKS web console proxy 

39 

40The URL in the response points to a WebMKS proxy which 

41starts proxying between client and corresponding vCenter 

42server where instance runs. In order to use the web based 

43console access, WebMKS proxy should be installed and configured 

44 

45Possible values: 

46 

47* Must be a valid URL of the form:``http://host:port/`` or 

48 ``https://host:port/`` 

49"""), 

50 cfg.BoolOpt('enabled', 

51 default=False, 

52 help=""" 

53Enables graphical console access for virtual machines. 

54"""), 

55] 

56 

57 

58def register_opts(conf): 

59 conf.register_group(mks_group) 

60 conf.register_opts(mks_opts, group=mks_group) 

61 

62 

63def list_opts(): 

64 return {mks_group: mks_opts}