Skip to content

Commit

Permalink
Add prototypes of some basic functions to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
cinek810 committed Jan 26, 2022
1 parent c924c60 commit 1bb8928
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions ansible_deploy/command_line.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
"""Main module for ansible-deploy"""

import sys

def get_sub_command():
"""Function to check the first arguments (argv[1..]) looking for a subcommand"""

def parse_options():
"""Generic function to parse options for all commands, we validate if the option was allowed for
specific subcommand outside"""

def validate_options(options, subcommand):
"""Function checking if the options set are allowed in this subcommand"""
if subcommand == "run":
if "task" not in options:
return False

def load_configuration():
"""Function responsible for reading configuration files and running a schema validator against
it"""

def validate_user_infra_stage():
"""Function checking if user has rights to execute command on selected infrastructure
Required for: run, lock and unlock operations"""

def validate_user_task():
"""Function checking if user has rights to execute the task
Rquired for: run"""

def main():
"""ansible-deploy endpoint function"""
sys.exit(0)

0 comments on commit 1bb8928

Please sign in to comment.