File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ class ModuleDocFragment(object):
113
113
type: bool
114
114
required: false
115
115
default: false
116
+ timeout:
117
+ description: HTTP request timeout in seconds
118
+ type: int
119
+ required: false
120
+ default: 30
116
121
'''
117
122
118
123
RESOURCES = r'''
Original file line number Diff line number Diff line change 44
44
COMPLEX_FILTER = 'complex_filter'
45
45
SCHEME = 'scheme'
46
46
INSECURE = 'insecure'
47
+ TIMEOUT = 'timeout'
47
48
48
49
GET_PARAMETERS = 'get_parameters'
49
50
@@ -261,6 +262,10 @@ def init_argument_spec(self): # type: () -> Dict
261
262
INSECURE : {
262
263
'type' : 'bool' ,
263
264
'default' : False
265
+ },
266
+ TIMEOUT : {
267
+ 'type' : 'int' ,
268
+ 'default' : 30
264
269
}
265
270
}
266
271
@@ -489,7 +494,7 @@ def _do_request(self): # type: () -> Dict
489
494
self ._method ,
490
495
self ._url ,
491
496
verify = not self ._p [INSECURE ],
492
- timeout = 30 ,
497
+ timeout = self . _p [ TIMEOUT ] ,
493
498
data = self ._body
494
499
)
495
500
You can’t perform that action at this time.
0 commit comments