Passed
Push — master ( ea7c4a...d61422 )
by Matěj
01:18 queued 12s
created

add_stig_references   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 27
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A main() 0 5 1
A parse_args() 0 7 1
1
#!/usr/bin/env python2
2
3
from __future__ import print_function
4
5
import argparse
6
import ssg.build_stig
7
8
9
def parse_args():
10
    parser = argparse.ArgumentParser(description='Add STIG references to XCCDF files.')
11
    parser.add_argument("--disa-stig", help="DISA STIG Reference XCCDF file",
12
                        dest="reference")
13
    parser.add_argument("--unlinked-xccdf", help="unlinked SSG XCCDF file",
14
                        dest="destination")
15
    return parser.parse_args()
16
17
18
def main():
19
    args = parse_args()
20
21
    target_root = ssg.build_stig.add_references(args.reference, args.destination)
22
    target_root.write(args.destination)
23
24
25
if __name__ == "__main__":
26
    main()
27