diff --git a/v2/ansible/executor/HostLog.py b/v2/ansible/executor/HostLog.py index 1f84012e01..21d3feb2bf 100644 --- a/v2/ansible/executor/HostLog.py +++ b/v2/ansible/executor/HostLog.py @@ -14,3 +14,26 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +class HostLog(object): + + def __init__(self, host): + self.host = host + + def add_task_result(self, task_result): + pass + + def has_failures(self): + assert False + + def has_changes(self): + assert False + + def get_tasks(self, are_executed=None, are_changed=None, are_successful=None): + assert False + + def get_current_running_task(self) + # atomic decorator likely required? + assert False + + diff --git a/v2/ansible/executor/HostLogManager.py b/v2/ansible/executor/HostLogManager.py index 1f84012e01..81cf520cf1 100644 --- a/v2/ansible/executor/HostLogManager.py +++ b/v2/ansible/executor/HostLogManager.py @@ -14,3 +14,12 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +class HostLogManager(object): + + def __init__(self): + pass + + def get_log_for_host(self, host): + assert False + diff --git a/v2/ansible/executor/HostPlaybookIterator.py b/v2/ansible/executor/HostPlaybookIterator.py new file mode 100644 index 0000000000..5292b6c72b --- /dev/null +++ b/v2/ansible/executor/HostPlaybookIterator.py @@ -0,0 +1,32 @@ +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see . + +class HostPlaybookIterator(object): + + def __init__(self, host, playbook): + pass + + def get_next_task(self): + assert False + + def is_blocked(self): + # depending on strategy, either + # ‘linear’ -- all prev tasks must be completed for all hosts + # ‘free’ -- this host doesn’t have any more work to do + assert False + + diff --git a/v2/ansible/executor/PlaybookExecutor.py b/v2/ansible/executor/PlaybookExecutor.py index 1f84012e01..7a7ed3d293 100644 --- a/v2/ansible/executor/PlaybookExecutor.py +++ b/v2/ansible/executor/PlaybookExecutor.py @@ -14,3 +14,18 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +class PlaybookExecutor(object): + + def __init__(self, list_of_plays=[]): + # self.tqm = TaskQueueManager(forks) + assert False + + def run(self): + # for play in list_of_plays: + # for block in play.blocks: + # # block must know it’s playbook class and context + # tqm.enqueue(block) + # tqm.go()... + assert False + diff --git a/v2/ansible/executor/TaskExecutor.py b/v2/ansible/executor/TaskExecutor.py index 1f84012e01..0591931372 100644 --- a/v2/ansible/executor/TaskExecutor.py +++ b/v2/ansible/executor/TaskExecutor.py @@ -14,3 +14,15 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +class TaskExecutor(object): + + def __init__(self, task, host): + pass + + def run(self): + # returns TaskResult + pass + + + diff --git a/v2/ansible/executor/TaskQueueManager.py b/v2/ansible/executor/TaskQueueManager.py index 1f84012e01..1016f35104 100644 --- a/v2/ansible/executor/TaskQueueManager.py +++ b/v2/ansible/executor/TaskQueueManager.py @@ -14,3 +14,19 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . + +class TaskQueueManagerHostPlaybookIterator(object): + + def __init__(self, host, playbook): + pass + + def get_next_task(self): + assert False + + def is_blocked(self): + # depending on strategy, either + # ‘linear’ -- all prev tasks must be completed for all hosts + # ‘free’ -- this host doesn’t have any more work to do + assert False + +