Skip to content

Commit

Permalink
Se añaden argumentos para cambiar la configuracion close #53 y lanza …
Browse files Browse the repository at this point in the history
…el MTD
  • Loading branch information
marcosrmartin committed Jun 2, 2024
1 parent 38295cb commit deaef4a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions mass/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import argparse
from logging import DEBUG, INFO
from .config import configure_logging
from .mtd_controller import MTDController

def main():
parser = argparse.ArgumentParser(
prog='mass',
description='MASS MTD which rotates between Nginx and HTTPD servers'
)

parser.add_argument('-d', '--duration', type=int, help="Total duration of the MASS life.", default=300)
parser.add_argument('-l', '--lower', type=int, help="Lower time for the time bounds.", default=11)
parser.add_argument('-u', '--upper', type=int, help="Upper time for the time bounds.", default=15)
parser.add_argument('-v', '--verbose', action='store_true')
args = parser.parse_args()

if args.verbose:
configure_logging(DEBUG)
else:
configure_logging(INFO)

mtd = MTDController(args.duration, args.lower, args.upper)
mtd.start()

if __name__ == "__main__":
main()

0 comments on commit deaef4a

Please sign in to comment.