Exemplo n.º 1
0
 def execute(self):
     command = self._context['command']
     _exec_dir = self._context['command_exec_dir']
     if not os.path.isdir(_exec_dir):
         abort("{0} is not a valid path".format(_exec_dir))
     with execute_in_dir_and_revert(_exec_dir):
         execute(command, self._use_shell)
Exemplo n.º 2
0
 def execute(self):
     command = self._context['command']
     _exec_dir = self._context['command_exec_dir']
     if not os.path.isdir(_exec_dir):
         abort("{0} is not a valid path".format(_exec_dir))
     with execute_in_dir_and_revert(_exec_dir):
         execute(command, self._use_shell)
Exemplo n.º 3
0
 def __init__(self, _file):
     if not os.path.isfile(_file):
         snixCore.abort("%s is not a valid file path!" % _file)
     self._file = _file
     self._manifest_items = []
     self._manifest_repos = []
     self._manifest_custom_scripts = []
Exemplo n.º 4
0
 def __init__(self, _file):
     if not os.path.isfile(_file):
         snixCore.abort("%s is not a valid file path!" % _file)
     self._file = _file
     self._manifest_config = {}
     self._manifest_items = []
     self._manifest_repos = []
     self._manifest_custom_scripts = []
Exemplo n.º 5
0
Arquivo: script.py Projeto: yaise/snix
 def execute(self):
     script_path = os.path.join(self._context["snix_root"], self._context["script_location"])
     if not os.access(script_path, os.X_OK):
         abort(script_path + "is not executable!")
     with execute_in_dir_and_revert(os.path.split(script_path)[0]):
         msg = "Executing {0}...".format(script_path)
         logger.info(msg + script_path)
         ret = execute(shlex.split(script_path), True)
         logger.info(msg + "StatusCode:" + str(ret))
         logger.info(msg + "Done!")
Exemplo n.º 6
0
    def __init__(self, context):
        if not type(context) is dict:
            snixCore.abort('Cannot install an item without the configuration.')

        self._context = context
Exemplo n.º 7
0
Arquivo: repo.py Projeto: yaise/snix
 def __init__(self, context):
     if not type(context) is dict:
         abort('Cannot clone a repo without the configuration.')
     self._context = context
Exemplo n.º 8
0
 def __init__(self, context, use_shell=False):
     if not type(context) is dict:
         abort("Cannot execute a command without the configuration.")
     self._context = context
     self._use_shell = use_shell
Exemplo n.º 9
0
 def __init__(self, context):
     if not type(context) is dict:
         abort('Cannot clone a repo without the configuration.')
     self._context = context
Exemplo n.º 10
0
Arquivo: script.py Projeto: yaise/snix
 def __init__(self, context):
     if not type(context) is dict:
         abort("Cannot execute a script without the configuration.")
     self._context = context
Exemplo n.º 11
0
Arquivo: item.py Projeto: yaise/snix
    def __init__(self, context):
        if not type(context) is dict:
            snixCore.abort('Cannot install an item without the configuration.')

        self._context = context
Exemplo n.º 12
0
 def __init__(self, context, use_shell=False):
     if not type(context) is dict:
         abort("Cannot execute a command without the configuration.")
     self._context = context
     self._use_shell = use_shell