'Determine the network ports that are exposed by the given container.
:param flocker.node._docker.Unit container: The container to inspect.
:return: A ``list`` of ``Port`` instances.'

def _ports_for_container(self, container):

    ports = []
    for portmap in container.ports:
        ports.append(Port(internal_port=portmap.internal_port, external_port=portmap.external_port))
    return ports
