mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
add return of virtualname
This commit is contained in:
parent
aa5c13f0b8
commit
c3325bc15d
@ -65,12 +65,14 @@ __opts__ = {'foreman.url': 'http://foreman/api',
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
__virtualname__ = 'foreman'
|
||||
def __virtual__():
|
||||
'''
|
||||
Only return if all the modules are available
|
||||
'''
|
||||
if not HAS_REQUESTS:
|
||||
return False
|
||||
return __virtualname__
|
||||
|
||||
|
||||
def ext_pillar(minion_id,
|
||||
@ -110,7 +112,7 @@ def ext_pillar(minion_id,
|
||||
verify=verify,
|
||||
cert=(certfile, keyfile)
|
||||
)
|
||||
result = resp.json
|
||||
result = resp.json()
|
||||
|
||||
log.debug('Raw response of the Foreman request is %r', format(result))
|
||||
|
||||
@ -125,7 +127,7 @@ def ext_pillar(minion_id,
|
||||
verify=verify,
|
||||
cert=(certfile, keyfile)
|
||||
)
|
||||
body = resp.json
|
||||
body = resp.json()
|
||||
log.debug('Raw response of the Foreman parameter lookup'
|
||||
'request is %r', format(body))
|
||||
parameters.update({body[u'name']: body[u'value']})
|
||||
|
Loading…
Reference in New Issue
Block a user