~junaidali/charms/trusty/plumgrid-gateway/analyst_opsvm

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/hardening/mysql/checks/__init__.py

  • Committer: bbaqar at plumgrid
  • Date: 2016-04-25 09:21:09 UTC
  • mfrom: (26.1.2 plumgrid-gateway)
  • Revision ID: bbaqar@plumgrid.com-20160425092109-kweey25bx97pmj80
Merge: Liberty/Mitaka support

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2016 Canonical Limited.
 
2
#
 
3
# This file is part of charm-helpers.
 
4
#
 
5
# charm-helpers is free software: you can redistribute it and/or modify
 
6
# it under the terms of the GNU Lesser General Public License version 3 as
 
7
# published by the Free Software Foundation.
 
8
#
 
9
# charm-helpers is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU Lesser General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU Lesser General Public License
 
15
# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
 
17
from charmhelpers.core.hookenv import (
 
18
    log,
 
19
    DEBUG,
 
20
)
 
21
from charmhelpers.contrib.hardening.mysql.checks import config
 
22
 
 
23
 
 
24
def run_mysql_checks():
 
25
    log("Starting MySQL hardening checks.", level=DEBUG)
 
26
    checks = config.get_audits()
 
27
    for check in checks:
 
28
        log("Running '%s' check" % (check.__class__.__name__), level=DEBUG)
 
29
        check.ensure_compliance()
 
30
 
 
31
    log("MySQL hardening checks complete.", level=DEBUG)