def main():
    """CLI entrypoint for scaling policy creation"""
    logging.basicConfig(format=LOGGING_FORMAT)
    log = logging.getLogger(__name__)

    parser = argparse.ArgumentParser()
    add_debug(parser)
    add_app(parser)
    add_properties(parser)
    add_env(parser)
    add_region(parser)
    args = parser.parse_args()

    logging.getLogger(__package__.split('.')[0]).setLevel(args.debug)

    log.debug('Parsed arguments: %s', args)

    asgpolicy = AutoScalingPolicy(app=args.app, prop_path=args.properties, env=args.env, region=args.region)

    asgpolicy.create_policy()
def main ( ) : logging . basicConfig ( format = LOGGING_FORMAT ) log = logging . getLogger ( __name__ ) parser = argparse . ArgumentParser ( ) add_debug ( parser ) add_app ( parser ) add_properties ( parser ) add_env ( parser ) add_region ( parser ) args = parser . parse_args ( ) logging . getLogger ( __package__ . split ( '.' ) [ 0 ] ) . setLevel ( args . debug ) log . debug ( 'Parsed arguments: %s' , args ) asgpolicy = AutoScalingPolicy ( app = args . app , prop_path = args . properties , env = args . env , region = args . region ) asgpolicy . create_policy ( )
CLI entrypoint for scaling policy creation