blob: dce22df9ca0059a6ad7c8d8061542641af68fb6e [file] [log] [blame]
Ales Komarekef0eea32018-02-14 15:47:13 +01001# -*- coding: utf-8 -*-
2'''
3Salt modules to work with the Architect service.
4'''
5
6# Import python libs
7from __future__ import absolute_import
Ales Komarekef0eea32018-02-14 15:47:13 +01008import logging
9
10__virtualname__ = 'architect'
11
12logger = logging.getLogger(__name__)
13
14
15def __virtual__():
16 return __virtualname__
17
18
Ales Komarekc312a292018-02-15 11:01:04 +010019def node_info():
Ales Komarekef0eea32018-02-14 15:47:13 +010020 '''
21 Get Salt minion metadata and forward it to the Architect master.
22
23 CLI Examples:
24
25 .. code-block:: bash
26
Ales Komarekc312a292018-02-15 11:01:04 +010027 salt-call architect.minion_info
Ales Komarekef0eea32018-02-14 15:47:13 +010028 '''
Ales Komarekef0eea32018-02-14 15:47:13 +010029 data = {
30 'pillar': __salt__['pillar.data'](),
31 'grain': __salt__['grains.items'](),
Ales Komarek0cbc6792018-02-14 17:12:37 +010032 'lowstate': __salt__['state.show_lowstate'](),
Ales Komarekef0eea32018-02-14 15:47:13 +010033 }
Ales Komarekc312a292018-02-15 11:01:04 +010034 return data