Coverage for nova/conf/rpc.py: 86%

7 statements  

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

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

18rpc_opts = [ 

19 cfg.IntOpt("long_rpc_timeout", 

20 default=1800, 

21 help=""" 

22This option allows setting an alternate timeout value for RPC calls 

23that have the potential to take a long time. If set, RPC calls to 

24other services will use this value for the timeout (in seconds) 

25instead of the global rpc_response_timeout value. 

26 

27Operations with RPC calls that utilize this value: 

28 

29* live migration 

30* scheduling 

31* enabling/disabling a compute service 

32* image pre-caching 

33* snapshot-based / cross-cell resize 

34* resize / cold migration 

35* volume attach 

36 

37Related options: 

38 

39* rpc_response_timeout 

40"""), 

41] 

42 

43 

44ALL_OPTS = rpc_opts 

45 

46 

47def register_opts(conf): 

48 conf.register_opts(ALL_OPTS) 

49 

50 

51def list_opts(): 

52 return {'DEFAULT': ALL_OPTS}