def main(): root = '' utilsObj = Utils() own_dir = os.path.dirname(os.path.realpath(__file__)) root = os.path.abspath(os.path.join(own_dir, os.pardir)) files = getFiles("{}/cli/".format(root)) commands = getCommands(files) if len(sys.argv) > 1: if sys.argv[1] == "-h" or sys.argv[1] == "--help": roger_help(root, commands) elif sys.argv[1] == "-v" or sys.argv[1] == "--version": version = utilsObj.roger_version(root) print(version) else: command = sys.argv[1] command_args = sys.argv[2:] if command in commands: print("root: {} command: {} args: {}".format( root, command, command_args)) script_call = getScriptCall(root, command, command_args) os.system(script_call) else: raise SystemExit("Command is not valid. Exiting.") else: raise SystemExit("No arguments found. Please refer to usage: roger -h")
def __init__(self): self.utils = Utils() self.task_id = [] self.statsd_message_list = [] self.statsd_push_list = [] self.outcome = 1 self.registry = "" self.image_name = ""
def __init__(self): self.rogerGitPullObject = RogerGitPull() self.rogerPushObject = RogerPush() self.rogerBuildObject = RogerBuild() self.dockerUtilsObject = DockerUtils() self.dockerObject = Docker() self.utils = Utils() self.slack = None self.registry = "" self.image_name = ""
def setUp(self): parser = argparse.ArgumentParser(description='Args for test') parser.add_argument( '-e', '--env', metavar='env', help="Environment to deploy to. example: 'dev' or 'stage'") parser.add_argument( '--skip-push', '-s', help="Don't push. Only generate components. Defaults to false.", action="store_true") parser.add_argument( '--secrets-file', '-S', help= "Specify an optional secrets file for deploy runtime variables.") self.parser = parser self.args = parser self.utils = Utils() self.appConfig = AppConfig()
#!/usr/bin/python from __future__ import print_function import os import sys import requests import json from termcolor import colored from cli.framework import Framework from cli.appconfig import AppConfig from cli.utils import Utils requests.packages.urllib3.disable_warnings() utils = Utils() class Chronos(Framework): def __init__(self): self.user = None self.passw = None def getName(self): return "Chronos" def get(self, roger_env, environment): self.fetchUserPass(environment) url = roger_env['environments'][environment][ 'chronos_endpoint'] + "/scheduler/jobs" resp = requests.get(url, auth=(self.user, self.passw)) return resp.json()
def __init__(self): self.utils = Utils() self.task_id = [] self.outcome = 1 self.registry = "" self.image_name = ""
def __init__(self): self.utils = Utils() self.whobj = WebHook() self.config_file = ""
def __init__(self): self.utils = Utils() self.statsd_message_list = [] self.outcome = 1
def __init__(self): self.utils = Utils() self.whobj = WebHook() self.statsd_message_list = [] self.config_file = ""
def __init__(self): self.utils = Utils() self.outcome = 1 self.registry = "" self.tag_name = ""
def __init__(self): self.utils = Utils() self.outcome = 1