Ejemplo n.º 1
0
 def __init__(self, env={'DATABASE': settings.DEFAULT_SQUAD_DATABASE_CONFIG, 'SQUAD_EXTRA_SETTINGS': squad_settings_file_path, 'SQUAD_STORAGE_DIR': '/tmp/squad_storage'}):
     self.cmd = ['squad-admin']
     self.env = os.environ.copy()
     self.env.update(env)
     self.__truncate_database__()
     self.logger = logging.getLogger('squad-admin')
     self.daemons = []
Ejemplo n.º 2
0
import os
import sys

from squad_client import logging
from squad_client.shortcuts import submit_job
from squad_client.core.command import SquadClientCommand


logger = logging.getLogger(__name__)


class SubmitJobCommand(SquadClientCommand):
    command = "submit-job"
    help_text = "submit job requests to SQUAD"

    def register(self, subparser):
        parser = super(SubmitJobCommand, self).register(subparser)
        parser.add_argument(
            "--group", help="SQUAD group where results are stored", required=True
        )
        parser.add_argument(
            "--project", help="SQUAD project where results are stored", required=True
        )
        parser.add_argument(
            "--build", help="Build version where results are stored", required=True
        )
        parser.add_argument(
            "--environment",
            help="Build environent where results are stored",
            required=True,
        )
Ejemplo n.º 3
0
 def __init__(self, port=settings.DEFAULT_SQUAD_PORT):
     self.port = port
     self.host = 'http://localhost:%s' % str(self.port)
     self.service = None
     self.squad_admin = SquadAdmin()
     self.logger = logging.getLogger('squad-service')