# Copyright Hybrid Logic Ltd.  See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-

"""
Deploy applications on nodes.
"""

from itertools import chain
from warnings import warn

from zope.interface import Interface, implementer, Attribute

from characteristic import attributes

from pyrsistent import PRecord, field

from eliot import write_failure, Logger, start_action

from twisted.internet.defer import gatherResults, fail, succeed

from ._docker import DockerClient, PortMap, Environment, Volume as DockerVolume
from . import IStateChange, in_parallel, sequentially

from ..control._model import (
    Application, DatasetChanges, AttachedVolume, DatasetHandoff,
    NodeState, DockerImage, Port, Link, Manifestation, Dataset,
    pset_field, ip_to_uuid