1import salt.utils.parsers
2from salt.utils.verify import check_user, verify_log
3
4
5class SaltKey(salt.utils.parsers.SaltKeyOptionParser):
6    """
7    Initialize the Salt key manager
8    """
9
10    def run(self):
11        """
12        Execute salt-key
13        """
14        import salt.key
15
16        self.parse_args()
17
18        self.setup_logfile_logger()
19        verify_log(self.config)
20
21        key = salt.key.KeyCLI(self.config)
22        if check_user(self.config["user"]):
23            key.run()
24