Starting to stub out some classes.

pull/9325/merge
Michael DeHaan 10 years ago
parent a707f5acfe
commit 6ca67c61cb

@ -14,3 +14,26 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
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

@ -14,3 +14,12 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class HostLogManager(object):
def __init__(self):
pass
def get_log_for_host(self, host):
assert False

@ -0,0 +1,32 @@
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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 <http://www.gnu.org/licenses/>.
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 doesnt have any more work to do
assert False

@ -14,3 +14,18 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
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 its playbook class and context
# tqm.enqueue(block)
# tqm.go()...
assert False

@ -14,3 +14,15 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class TaskExecutor(object):
def __init__(self, task, host):
pass
def run(self):
# returns TaskResult
pass

@ -14,3 +14,19 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
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 doesnt have any more work to do
assert False

Loading…
Cancel
Save