8f167259c70715ad8b06a33017e2de3291301dd1
[functest.git] / functest / opnfv_tests / features / security_scan.py
1 #!/usr/bin/python
2 #
3 # Copyright (c) 2015 All rights reserved
4 # This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10
11 import functest.core.feature as base
12 from functest.utils.constants import CONST
13
14
15 class SecurityScan(base.BashFeature):
16     def __init__(self, **kwargs):
17         repo = CONST.__getattribute__('dir_repo_securityscan')
18         conf = CONST.__getattribute__('dir_functest_conf')
19         kwargs["cmd"] = ('. {0}/stackrc && '
20                          'cd {1} && '
21                          'python security_scan.py --config config.ini && '
22                          'cd -'.format(conf, repo))
23         super(SecurityScan, self).__init__(**kwargs)