mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add return of virtualname
This commit is contained in:
parent
aa5c13f0b8
commit
c3325bc15d
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue