Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias Import alias Import alias identifier Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str FunctionDef arguments args defaults body Expr Str If CompareIn Str NameLoad body Return NameLoad Return NameLoad decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str Str NameLoad NameLoad body If UnaryOpNot NameLoad body Assign NameStore Dict If CompareIs NameLoad NameLoad body Assign NameStore Dict If NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body If Call NameLoad NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad Return Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str Str NameLoad body Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str Str NameLoad body Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotIn Str NameLoad body Return Call AttributeLoad Str attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad Assign NameStore Dict Assign NameStore ListLoad If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad orelse If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore NameLoad TryExcept body If CompareGt Call NameLoad NameLoad Num body Assign NameStore CompareEq SubscriptLoad NameLoad Index Num Str handlers ExceptHandler type NameLoad body Pass orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Continue Assign SubscriptStore NameLoad Index NameLoad Dict Str Str NameLoad NameLoad Assign NameStore Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad vararg kwarg body If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword Dict NameLoad NameLoad Return NameLoad orelse If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad NameLoad Assign NameStore BoolOpAnd SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Dict NameLoad NameLoad keyword NameLoad Return NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Dict NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call NameLoad NameLoad keyword NameLoad keyword Dict NameLoad NameLoad Return NameLoad Return Dict Str Str Str Str NameLoad Dict NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad vararg kwarg body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot NameLoad body Return Call NameLoad keyword NameLoad keyword Call AttributeLoad Str attr NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore IfExp SubscriptLoad NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad If CompareNotEq NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore Dict NameLoad Dict Str Str NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad Str attr NameLoad orelse Assign NameStore Dict Assign NameStore Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Dict NameLoad Dict Str SubscriptLoad NameLoad Index Str orelse Assign NameStore Dict Return Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad Str NameLoad body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot NameLoad body Return Call NameLoad keyword NameLoad keyword Call AttributeLoad Str attr NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call SubscriptLoad NameLoad Index Str Str keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Dict If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Return Call NameLoad keyword NameLoad keyword Call AttributeLoad Str attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str orelse Return Call NameLoad keyword NameLoad keyword Call AttributeLoad Str attr NameLoad Return Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad vararg kwarg body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot NameLoad body Return Call NameLoad keyword NameLoad keyword Call AttributeLoad Str attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Dict Str Str Str Str NameLoad Dict NameLoad NameLoad Assign NameStore IfExp SubscriptLoad NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad If CompareNotEq NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore Dict NameLoad Dict Str Str NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad Str attr NameLoad orelse Assign NameStore Dict Assign NameStore Str Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad vararg kwarg body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str If NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad Assign TupleStore NameStore NameStore TupleLoad Dict Dict If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot NameLoad body Assign NameStore ListLoad If UnaryOpNot NameLoad body Assign NameStore ListLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Dict orelse For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Dict Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Str TryExcept body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad Assign NameStore Dict If SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index NameLoad Dict Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Str Str Expr Call SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad orelse Expr Call SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword Dict NameLoad NameLoad orelse Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword Dict NameLoad NameLoad orelse Expr Call SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword Dict NameLoad NameLoad orelse Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword Dict NameLoad NameLoad orelse Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str NameLoad body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Return Call NameLoad keyword Call AttributeLoad Str attr BoolOpOr NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str CompareIs NameLoad NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str NameLoad UnaryOpNot NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad NameLoad Return Call NameLoad keyword Call AttributeLoad Str attr BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad vararg kwarg body Expr Str If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareIsNot NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body If UnaryOpNot NameLoad body Return Call NameLoad keyword Str orelse If Call NameLoad NameLoad NameLoad body If UnaryOpNot CompareEq Call SubscriptLoad NameLoad Index Str NameLoad Num body Return Call NameLoad keyword Str If CompareIsNot NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body If NameLoad body Return Call NameLoad keyword Str orelse If Call NameLoad NameLoad NameLoad body If CompareEq Call SubscriptLoad NameLoad Index Str NameLoad Num body Return Call NameLoad keyword Str If CompareIsNot NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body If UnaryOpNot NameLoad body Return Call NameLoad keyword Str orelse If Call NameLoad NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Return Call NameLoad keyword Str If CompareIsNot NameLoad NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body If NameLoad body Return Call NameLoad keyword Str orelse If Call NameLoad NameLoad NameLoad body If Call NameLoad NameLoad NameLoad body Return Call NameLoad keyword Str If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If SubscriptLoad NameLoad Index Str body Return Call NameLoad keyword SubscriptLoad NameLoad Index Str orelse Return Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad vararg kwarg body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore BoolOpAnd NameLoad CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If BoolOpAnd NameLoad BoolOpOr NameLoad UnaryOpNot NameLoad body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad If BoolOpAnd UnaryOpNot NameLoad NameLoad body If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad Assign NameStore NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword NameLoad keyword NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore TupleLoad ListLoad Dict ListLoad Dict Dict ListLoad If UnaryOpNot NameLoad body Assign NameStore Dict If UnaryOpNot NameLoad body Assign NameStore Dict If UnaryOpNot NameLoad body Assign NameStore ListLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num If Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str NameLoad orelse Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad Dict Str Str NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad Call NameLoad Call AttributeLoad NameLoad attr Index Num If Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str Str orelse Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Str Assign SubscriptStore NameLoad Index NameLoad Dict Str Str NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad orelse Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad SubscriptLoad NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return Call NameLoad keyword Call AttributeLoad Str attr NameLoad keyword Dict NameLoad NameLoad decorator_list
N/A N/A 
Manage Docker containers
========================

.. deprecated:: 2015.8.0
    Future feature development will be done only in :mod:`dockerng
    <salt.states.dockerng>`. See the documentation for this module for
    information on the deprecation path.

`Docker <https://www.docker.io>`_
is a lightweight, portable, self-sufficient software container
wrapper. The base supported wrapper type is
`LXC <https://en.wikipedia.org/wiki/Linux_Containers>`_,
`cgroups <https://en.wikipedia.org/wiki/Cgroups>`_, and the
`Linux Kernel <https://en.wikipedia.org/wiki/Linux_kernel>`_.

.. note::

    This state module requires
    `docker-py <https://github.com/dotcloud/docker-py>`_ version >= 0.6.0
    which supports `Docker Remote API version 1.12
    <http://docs.docker.io/en/latest/reference/api/docker_remote_api_v1.6>`_.

Available Functions
-------------------

- built

  .. code-block:: yaml

      corp/mysuperdocker_img:
        docker.built:
          - path: /path/to/dir/container

- pulled

  .. code-block:: yaml

      ubuntu:
        docker.pulled:
          - tag: latest

- pushed

  .. code-block:: yaml

      corp/mysuperdocker_img:
        docker.pushed

- installed

  .. code-block:: yaml

      mysuperdocker-container:
        docker.installed:
          - name: mysuperdocker
          - hostname: superdocker
          - image: corp/mysuperdocker_img

- loaded

  .. code-block:: yaml

      mysuperdocker-file:
        docker.loaded:
          - name: mysuperdocker
          - source: salt://_files/tmp/docker_image.tar

- running

  .. code-block:: yaml

      my_service:
        docker.running:
          - container: mysuperdocker
          - image: corp/mysuperdocker_img
          - port_bindings:
            - "5000/tcp":
                  HostIp: ""
                  HostPort: "5000"

  .. note::

      The ``ports`` argument above is a dictionary. The double
      indentation is required for PyYAML to load the data structure
      properly as a python dictionary. More information can be found
      :ref:`here <nested-dict-indentation>`

- absent

  .. code-block:: yaml

      mys_old_uperdocker:
        docker.absent

- run

  .. code-block:: yaml

      /finish-install.sh:
        docker.run:
          - cid: mysuperdocker
          - unless: grep -q something /var/log/foo
          - docker_unless: grep -q done /install_log

Use Cases
---------

   Ensures the container is running with the latest image available

   .. code-block:: yaml

      my-service-image:
        docker.pulled:
          - name: registry/my-service:latest
          - force: true

      my-service-container:
        docker.installed:
          - image: registry/my-service:latest
          - watch:
            - docker: my-service-image

      my-service:
        docker.running:
          - container: my-service-container
          - watch:
            - docker: my-service-container

.. note::

    The docker modules are named ``dockerio`` because
    the name 'docker' would conflict with the underlying docker-py library.


 __future__ absolute_import N/A functools N/A logging salt.ext.six string_types N/A salt.utils N/A salt.ext.six six N/A log N/A N/A logging getLogger __name__ N/A __virtualname__ docker __virtual__ N/A N/A N/A N/A N/A 
    Only load if the dockerio execution module is available
     N/A N/A docker.version __salt__ N/A N/A __virtualname__ N/A False N/A N/A INVALID_RESPONSE We did not get an acceptable answer from docker N/A VALID_RESPONSE N/A NOTSET N/A object _ret_status N/A N/A exec_status name comment result changes N/A None None None N/A N/A N/A changes N/A N/A changes N/A N/A N/A exec_status None N/A N/A exec_status N/A N/A exec_status N/A N/A N/A result None N/A N/A result N/A exec_status N/A status N/A scomment N/A N/A exec_status get comment None N/A scomment N/A N/A comment N/A scomment N/A out N/A N/A exec_status get out None N/A out N/A N/A N/A isinstance out string_types N/A N/A comment N/A out N/A N/A changes result name comment changes result name comment N/A _valid N/A N/A exec_status name comment changes N/A None None N/A N/A N/A _ret_status exec_status exec_status comment comment name name changes changes result True N/A _invalid N/A N/A exec_status name comment changes N/A None None N/A N/A N/A _ret_status exec_status exec_status comment comment name name changes changes result False N/A _get_image_name N/A N/A image tag N/A N/A N/A N/A : image N/A N/A N/A N/A : join N/A image tag N/A image N/A _parse_volumes N/A N/A volumes N/A N/A N/A 
    Parse a given volumes state specification for later use in
    modules.docker.create_container(). This produces a dict that can be directly
    consumed by the Docker API /containers/create.

    Note: this only really exists for backwards-compatibility, and because
    modules.dockerio.start() currently takes a binds argument.

    volumes
        A structure containing information about the volumes to be included in the
        container that will be created, either:
            - a bare dictionary
            - a list of dictionaries and lists

        .. code-block:: yaml

            # bare dict style
            - volumes:
                /usr/local/etc/ssl/certs/example.crt:
                  bind: /etc/ssl/certs/com.example.internal.crt
                  ro: True
                /var/run:
                  bind: /var/run/host/
                  ro: False

            # list of dicts style:
            - volumes:
              - /usr/local/etc/ssl/certs/example.crt:
                  bind: /etc/ssl/certs/com.example.internal.crt
                  ro: True
              - /var/run: /var/run/host/ # read-write bound volume
              - /var/lib/mysql # un-bound, container-only volume

        note: bind mounts specified like "/etc/timezone:/tmp/host_tz" will fall
        through this parser.

    Returns a dict of volume specifications:

        .. code-block:: yaml

            {
              'bindvols': {
                '/usr/local/etc/ssl/certs/example.crt': {
                  'bind': '/etc/ssl/certs/com.example.internal.crt',
                  'ro': True
                  },
                '/var/run/': {
                  'bind': '/var/run/host',
                  'ro': False
                },
              },
              'contvols': [ '/var/lib/mysql/' ]
            }

     N/A N/A N/A log trace N/A Parsing given volumes dict:  N/A str volumes N/A bindvolumes N/A N/A contvolumes N/A N/A N/A isinstance volumes dict N/A N/A bindvolumes volumes N/A N/A isinstance volumes list N/A N/A vol volumes N/A N/A N/A isinstance vol dict N/A N/A N/A volsource voldef N/A N/A vol items N/A N/A N/A isinstance voldef dict N/A N/A target N/A voldef N/A bind N/A read_only N/A N/A voldef get ro False N/A N/A target N/A str voldef N/A read_only False N/A source volsource N/A N/A N/A : vol N/A N/A volspec N/A N/A vol split : N/A source N/A volspec N/A 0 N/A target N/A volspec N/A 1 N/A read_only False N/A N/A N/A N/A N/A len volspec 2 N/A N/A read_only N/A N/A volspec N/A 2 ro N/A N/A N/A IndexError N/A N/A N/A N/A N/A N/A contvolumes append N/A str vol N/A N/A N/A bindvolumes N/A source N/A bind ro target read_only N/A result N/A bindvols contvols bindvolumes contvolumes N/A N/A N/A log trace N/A Finished parsing volumes, with result:  N/A str result N/A result N/A mod_watch N/A N/A name sfun N/A None args kw N/A N/A N/A sfun built N/A N/A N/A kw N/A force True N/A build_status N/A built name kw N/A result N/A build_status N/A result N/A status N/A _ret_status build_status name result result changes N/A name result N/A status N/A N/A N/A sfun installed N/A N/A remove_container N/A __salt__ N/A docker.remove_container N/A remove_status N/A _ret_status N/A remove_container container name force True name name N/A installed_status N/A installed name name kw N/A result N/A N/A installed_status N/A result N/A remove_status N/A result N/A comment N/A remove_status N/A comment N/A status N/A _ret_status installed_status name name result result changes N/A name result comment comment N/A status N/A N/A N/A sfun running N/A N/A container N/A N/A kw get container name N/A kill_signal N/A N/A kw get kill_signal N/A kill_signal N/A N/A killer N/A __salt__ N/A docker.kill N/A status N/A _ret_status N/A killer container signal kill_signal name name changes N/A name True N/A N/A restarter N/A __salt__ N/A docker.restart N/A status N/A _ret_status N/A restarter container name name changes N/A name True N/A status N/A N/A name changes result comment name N/A False N/A N/A watch requisite is not implemented for {0} format sfun N/A pulled N/A N/A name tag force insecure_registry N/A latest False False args kwargs N/A N/A 
    Pull an image from a docker registry. (`docker pull`)

    .. note::

        See first the documentation for `docker login`, `docker pull`,
        `docker push`,
        and `docker.import_image <https://github.com/dotcloud/docker-py#api>`_
        (`docker import
        <http://docs.docker.io/en/latest/reference/commandline/cli/#import>`_).
        NOTE that we added in SaltStack a way to authenticate yourself with the
        Docker Hub Registry by supplying your credentials (username, email &
        password) using pillars. For more information, see salt.modules.dockerio
        execution module.

    name
        Name of the image

    tag
        Tag of the image

    force
        Pull even if the image is already pulled

    insecure_registry
        Set to ``True`` to allow connections to non-HTTPS registries. Default ``False``.
     N/A inspect_image N/A __salt__ N/A docker.inspect_image N/A image_name N/A _get_image_name name tag N/A image_infos N/A inspect_image image_name N/A N/A N/A image_infos N/A status N/A force N/A N/A N/A _valid name name comment N/A N/A Image already pulled: {0} format image_name N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Image {0} will be pulled format image_name N/A N/A _ret_status name name comment comment N/A previous_id N/A N/A image_infos N/A status N/A N/A image_infos N/A out N/A Id None N/A pull N/A __salt__ N/A docker.pull N/A returned N/A pull name tag tag insecure_registry insecure_registry N/A N/A previous_id N/A returned N/A id N/A N/A changes N/A name N/A old new previous_id N/A returned N/A id N/A comment N/A N/A Image {0} pulled format image_name N/A N/A changes N/A N/A comment N/A N/A _ret_status returned name changes changes comment comment N/A pushed N/A N/A name tag insecure_registry N/A latest False N/A N/A 
    Push an image from a docker registry. (`docker push`)

    .. note::

        See first the documentation for `docker login`, `docker pull`,
        `docker push`,
        and `docker.import_image <https://github.com/dotcloud/docker-py#api>`_
        (`docker import
        <http://docs.docker.io/en/latest/reference/commandline/cli/#import>`_).
        NOTE that we added in SaltStack a way to authenticate yourself with the
        Docker Hub Registry by supplying your credentials (username, email
        & password) using pillars. For more information, see
        salt.modules.dockerio execution module.

    name
        Name of the image

    tag
        Tag of the image [Optional]

    insecure_registry
        Set to ``True`` to allow connections to non-HTTPS registries. Default ``False``.
     N/A image_name N/A _get_image_name name tag N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Image {0} will be pushed format image_name N/A N/A _ret_status name name comment comment N/A push N/A __salt__ N/A docker.push N/A returned N/A push name tag tag insecure_registry insecure_registry N/A N/A N/A log debug N/A Returned:  N/A str returned N/A N/A returned N/A status N/A N/A changes N/A name N/A Rev N/A returned N/A id N/A N/A changes N/A N/A N/A _ret_status returned name changes changes N/A loaded N/A N/A name tag source source_hash force N/A latest None False N/A N/A 
    Load an image into the local docker registry (`docker load`)

    name
        Name of the docker image

    tag
        tag of the image (defaults to 'latest')

    source
        The source .tar file to download to the minion, created by docker save
        this source file can be hosted on either the salt master server,
        or on an HTTP or FTP server.

        If the file is hosted on a HTTP or FTP server then the source_hash
        argument is also required

        .. note::

            See first the documentation for Salt `file.managed
            <http://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html#salt.states.file.managed>`_

    source_hash
        This can be one of the following:
            1. a source hash string
            2. the URI of a file that contains source hash strings

    force
        Load even if the image exists
     N/A inspect_image N/A __salt__ N/A docker.inspect_image N/A image_name N/A _get_image_name name tag N/A image_infos N/A inspect_image image_name N/A N/A N/A image_infos N/A status N/A force N/A N/A N/A _valid name name comment N/A N/A Image already loaded: {0} format image_name N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Image {0} will be loaded format image_name N/A N/A _ret_status name name comment comment N/A tmp_filename N/A N/A N/A salt utils mkstemp N/A N/A N/A __salt__ N/A state.single file.managed name tmp_filename source source source_hash source_hash N/A changes N/A N/A N/A image_infos N/A status N/A N/A N/A changes N/A old N/A N/A image_infos N/A out N/A Id N/A remove_image N/A __salt__ N/A docker.remove_image N/A remove_info N/A remove_image image_name N/A N/A N/A remove_info N/A status N/A N/A N/A _invalid name name comment N/A N/A Image could not be removed: {0} format name N/A load N/A __salt__ N/A docker.load N/A returned N/A load tmp_filename N/A image_infos N/A inspect_image image_name N/A N/A image_infos N/A status N/A N/A N/A changes N/A new N/A N/A image_infos N/A out N/A Id N/A N/A N/A _invalid name name comment N/A N/A Image {0} was not loaded into docker format image_name N/A N/A _ret_status returned name changes changes N/A built N/A N/A name tag path quiet nocache rm force timeout N/A latest None False False True False None args kwargs N/A N/A 
    Build a docker image from a path or URL to a dockerfile. (`docker build`)

    name
        Name of the image

    tag
        tag of the image (defaults to 'latest')

    path
        URL (e.g. `url/branch/docker_dir/dockerfile`)
        or filesystem path to the dockerfile

     N/A inspect_image N/A __salt__ N/A docker.inspect_image N/A image_name N/A _get_image_name name tag N/A image_infos N/A inspect_image image_name N/A N/A N/A image_infos N/A status N/A force N/A N/A N/A _valid name name comment N/A N/A Image already built: {0}, id: {1} format image_name N/A N/A image_infos N/A out N/A Id N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Image {0} will be built format image_name N/A N/A name changes result comment name N/A None comment N/A previous_id N/A N/A image_infos N/A status N/A N/A image_infos N/A out N/A Id None N/A build N/A __salt__ N/A docker.build N/A kw N/A dict tag image_name path path quiet quiet nocache nocache rm rm timeout timeout N/A returned N/A build kw N/A N/A previous_id N/A returned N/A id N/A N/A changes N/A name N/A old new previous_id N/A returned N/A id N/A comment N/A N/A Image {0} built format image_name N/A N/A changes N/A N/A comment N/A N/A _ret_status exec_status returned name name changes changes comment comment N/A installed N/A N/A name image tag command hostname user detach stdin_open tty mem_limit ports environment dns volumes volumes_from cpu_shares cpuset N/A latest None None None True False False None None None None None None None None args kwargs N/A N/A 
    Ensure that a container with the given name exists;
    if not, build a new container from the specified image.
    (`docker run`)

    name
        Name for the container

    image
        Image from which to build this container

    tag
        tag of the image (defaults to 'latest')

    environment
        Environment variables for the container, either
            - a mapping of key, values
            - a list of mappings of key, values
    ports
        List of ports definitions, either:
            - a port to map
            - a mapping of mapping portInHost : PortInContainer
    volumes
        List of volumes (see notes for the running function)

    For other parameters, see absolutely first the salt.modules.dockerio
    execution module and the `docker-py python bindings for docker
    documentation <https://github.com/dotcloud/docker-py#api>`_ for
    `docker.create_container`.

    .. note::
        This command does not verify that the named container
        is running the specified image.
     N/A ins_image N/A __salt__ N/A docker.inspect_image N/A ins_container N/A __salt__ N/A docker.inspect_container N/A create N/A __salt__ N/A docker.create_container N/A image_name N/A _get_image_name image tag N/A iinfos N/A ins_image image_name N/A N/A N/A iinfos N/A status N/A N/A N/A _invalid comment N/A N/A Image "{0}" does not exist format image_name N/A cinfos N/A ins_container name N/A already_exists N/A cinfos N/A status N/A already_exists N/A N/A N/A _valid comment N/A N/A Container {0!r} already exists format name N/A N/A dports denvironment N/A N/A N/A N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Container {0!r} will be created format name N/A N/A _ret_status name name comment comment N/A N/A ports N/A N/A ports N/A N/A N/A volumes N/A N/A volumes N/A N/A N/A isinstance environment dict N/A N/A k environment N/A N/A N/A denvironment N/A N/A N/A six text_type k N/A N/A six text_type N/A environment N/A k N/A N/A isinstance environment list N/A N/A p environment N/A N/A N/A isinstance p dict N/A N/A k p N/A N/A N/A denvironment N/A N/A N/A six text_type k N/A N/A six text_type N/A p N/A k N/A p ports N/A N/A N/A N/A isinstance p dict N/A N/A N/A dports N/A N/A str p N/A N/A N/A k p N/A N/A N/A dports N/A N/A str p N/A N/A parsed_volumes N/A _parse_volumes volumes N/A bindvolumes N/A parsed_volumes N/A bindvols N/A contvolumes N/A parsed_volumes N/A contvols N/A kw N/A dict binds bindvolumes command command hostname hostname user user detach detach stdin_open stdin_open tty tty mem_limit mem_limit ports dports environment denvironment dns dns volumes contvolumes volumes_from volumes_from name name cpu_shares cpu_shares cpuset cpuset N/A out N/A create image_name kw N/A changes Container created N/A N/A N/A cid N/A N/A N/A out N/A out N/A info N/A id N/A N/A N/A Exception N/A e N/A N/A N/A N/A log debug N/A str e N/A N/A changes N/A N/A Container {0} created format cid N/A N/A out N/A comment changes N/A ret N/A _ret_status out name changes changes N/A ret N/A absent N/A N/A name N/A N/A N/A 
    Ensure that the container is absent; if not, it will
    will be killed and destroyed. (`docker inspect`)

    name:
        Either the container name or id
     N/A ins_container N/A __salt__ N/A docker.inspect_container N/A cinfos N/A ins_container name N/A changes N/A N/A N/A cinfos N/A status N/A N/A cid N/A cinfos N/A id N/A N/A changes N/A cid N/A N/A is_running N/A N/A __salt__ N/A docker.is_running cid N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Container {0!r} will be stopped and destroyed format cid N/A N/A _ret_status name name comment comment N/A is_running N/A N/A N/A N/A changes N/A cid N/A old running N/A N/A N/A __salt__ N/A docker.stop cid N/A is_running N/A N/A __salt__ N/A docker.is_running cid N/A is_running N/A N/A N/A _invalid comment N/A N/A Container {0!r} could not be stopped format cid N/A N/A N/A N/A __salt__ N/A docker.remove_container cid N/A is_gone N/A N/A __salt__ N/A docker.exists cid N/A is_gone N/A N/A N/A _valid comment N/A N/A Container {0!r} was stopped and destroyed,  format cid changes N/A name True N/A N/A N/A _valid comment N/A N/A Container {0!r} was stopped but could not be destroyed, format cid changes N/A name True N/A N/A N/A N/A __salt__ N/A docker.remove_container cid N/A is_gone N/A N/A __salt__ N/A docker.exists cid N/A is_gone N/A N/A N/A _valid comment N/A N/A Container {0!r}is stopped and was destroyed,  format cid changes N/A name True N/A N/A N/A _valid comment N/A N/A Container {0!r} is stopped but could not be destroyed, format cid changes N/A name True N/A N/A N/A _valid comment N/A N/A Container {0!r} not found format name N/A present N/A N/A name image tag is_latest N/A None latest False N/A N/A 
    If a container with the given name is not present, this state will fail.
    Supports optionally checking for specific image/tag
    (`docker inspect`)

    name:
        container id
    image:
        image the container should be running (defaults to any)
    tag:
        tag of the image (defaults to 'latest')
    is_latest:
        also check if the container runs the latest version of the image (
        latest defined as the latest pulled onto the local machine)
     N/A ins_container N/A __salt__ N/A docker.inspect_container N/A cinfos N/A ins_container name N/A N/A id cinfos N/A N/A cid N/A cinfos N/A id N/A N/A cid name N/A N/A N/A cinfos N/A status N/A N/A N/A _invalid comment N/A N/A Container {0} not found format N/A cid name N/A N/A N/A cinfos N/A status N/A image None N/A N/A N/A _valid comment N/A N/A Container {0} exists format cid N/A image_name N/A _get_image_name image tag N/A N/A N/A cinfos N/A status N/A N/A N/A N/A cinfos N/A out N/A Config N/A Image image_name N/A is_latest N/A N/A N/A _valid comment N/A N/A Container {0} exists and has image {1} format cid image_name N/A ins_image N/A __salt__ N/A docker.inspect_image N/A iinfos N/A ins_image image_name N/A N/A N/A cinfos N/A status N/A N/A N/A cinfos N/A out N/A Image N/A N/A iinfos N/A out N/A Id N/A N/A N/A _valid comment N/A N/A Container {0} exists and has latest version of image {1} format cid image_name N/A N/A _invalid comment N/A N/A Container {0} found with wrong image format N/A cid name N/A run N/A N/A name cid hostname onlyif unless docked_onlyif docked_unless N/A None None None None None None args kwargs N/A N/A 
    Run a command in a specific container

    You can match by either name or hostname

    name
        command to run in the container

    cid
        Container id or name

    state_id
        state_id

    onlyif
        Only execute cmd if statement on the host returns 0

    unless
        Do not execute cmd if statement on the host returns 0

    docked_onlyif
        Only execute cmd if statement in the container returns 0

    docked_unless
        Do not execute cmd if statement in the container returns 0

     N/A hostname N/A N/A N/A N/A N/A salt utils warn_until Helium The 'hostname' argument has been deprecated. N/A retcode N/A __salt__ N/A docker.retcode N/A drun_all N/A __salt__ N/A docker.run_all N/A valid N/A N/A functools partial _valid name name N/A N/A onlyif None N/A N/A N/A N/A isinstance onlyif string_types N/A N/A N/A onlyif N/A N/A N/A valid comment onlyif execution failed N/A N/A N/A isinstance onlyif string_types N/A N/A N/A N/A N/A N/A __salt__ N/A cmd.retcode onlyif 0 N/A N/A N/A valid comment onlyif execution failed N/A N/A unless None N/A N/A N/A N/A isinstance unless string_types N/A N/A unless N/A N/A N/A valid comment unless execution succeeded N/A N/A N/A isinstance unless string_types N/A N/A N/A N/A N/A __salt__ N/A cmd.retcode unless 0 N/A N/A N/A valid comment unless execution succeeded N/A N/A docked_onlyif None N/A N/A N/A N/A isinstance docked_onlyif string_types N/A N/A N/A docked_onlyif N/A N/A N/A valid comment docked_onlyif execution failed N/A N/A N/A isinstance docked_onlyif string_types N/A N/A N/A N/A retcode cid docked_onlyif N/A N/A N/A valid comment docked_onlyif execution failed N/A N/A docked_unless None N/A N/A N/A N/A isinstance docked_unless string_types N/A N/A docked_unless N/A N/A N/A valid comment docked_unless execution succeeded N/A N/A N/A isinstance docked_unless string_types N/A N/A N/A retcode cid docked_unless N/A N/A N/A valid comment docked_unless execution succeeded N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Command {0!r} will be executed on container {1} format name cid N/A N/A _ret_status name name comment comment N/A result N/A drun_all cid name N/A N/A result N/A status N/A N/A N/A valid comment N/A result N/A comment N/A N/A N/A _invalid comment N/A result N/A comment name name N/A script N/A N/A N/A args kw N/A N/A 
    Placeholder function for a cmd.script alike.

    .. note::

        Not yet implemented.
        Its implementation might be very similar from
        :mod:`salt.states.dockerio.run`
     N/A NotImplementedError N/A running N/A N/A name image tag container command hostname user detach stdin_open tty mem_limit ports environment dns volumes volumes_from start cap_add cap_drop privileged lxc_conf network_mode check_is_running publish_all_ports links restart_policy cpu_shares cpuset kill_signal N/A latest None None None None True False False None None None None None None True None None None None None True False None None None None None args kwargs N/A N/A 
    Ensure that a container is running. If the container does not exist, it
    will be created from the specified image. (`docker run`)

    name / container
        Name for the container

    image
        Image from which to build this container

    tag
        tag of the image (defaults to 'latest')

    environment
        Environment variables for the container, either
            - a mapping of key, values
            - a list of mappings of key, values
    ports
        List of ports definitions, either:
            - a port to map
            - a mapping of mapping portInHost : PortInContainer

        .. code-block:: yaml

            - ports:
              - "5000/tcp":
                    HostIp: ""
                    HostPort: "5000"

    publish_all_ports
        Publish all ports from the port list (default is false,
        only meaningful if port does not contain portinhost:portincontainer mapping)

    volumes
        List of volumes to mount or create in the container (like ``-v`` of ``docker run`` command),
        mapping host directory to container directory.

        To specify a volume in the container in terse list format:

        .. code-block:: yaml

            - volumes:
              - "/var/log/service" # container-only volume
              - "/srv/timezone:/etc/timezone" # bound volume
              - "/usr/local/etc/passwd:/etc/passwd:ro" # read-only bound volume

        You can also use the short dictionary form (note that the notion of
        source:target from docker is preserved):

        .. code-block:: yaml

            - volumes:
              - /var/log/service: /var/log/service # mandatory read-write implied

        Or, alternatively, to specify read-only mounting, use the extended form:

        .. code-block:: yaml

            - volumes:
              - /home/user1:
                  bind: /mnt/vol2
                  ro: True
              - /var/www:
                  bind: /mnt/vol1
                  ro: False

        Or (for backwards compatibility) another dict style:

        .. code-block:: yaml

            - volumes:
                /home/user1:
                  bind: /mnt/vol2
                  ro: True
                /var/www:
                  bind: /mnt/vol1
                  ro: False

    volumes_from
        List of containers to share volumes with

    dns
        List of DNS servers.

        .. code-block:: yaml

            - dns:
                - 127.0.0.1

    network_mode
        - 'bridge': creates a new network stack for the container on the docker bridge
        - 'none': no networking for this container
        - 'container:[name|id]': reuses another container network stack)
        - 'host': use the host network stack inside the container

        .. code-block:: yaml

            - network_mode: host

    restart_policy
        Restart policy to apply when a container exits (no, on-failure[:max-retry], always)

        .. code-block:: yaml

            - restart_policy:
                MaximumRetryCount: 5
                Name: on-failure

    cap_add
        List of capabilities to add in a container.

    cap_drop
        List of capabilities to drop in a container.

    check_is_running
        Enable checking if a container should run or not.
        Useful for data-only containers that must be linked to another one.
        e.g. nginx <- static-files

    cpu_shares
        CPU shares (relative weight)

        .. code-block:: yaml

            - cpu_shares: 2
    cpuset
        CPUs in which to allow execution ('0-3' or '0,1')

        .. code-block:: yaml

            - cpuset: '0-3'
    kill_signal
        If defined, its value will be sent as a kill signal to the running
        container. i.e. It will use client.kill(signal=kill_signal)
        instead of client.restart(), when the state is triggered by a watcher
        requisite.

        possible use case: Soft reload of nginx

        .. code-block:: yaml

            nginx:
              docker.running:
                - image: some-fictional-registry.com/nginx
                - tag: latest
                - kill_signal: SIGHUP
                - watch:
                  - file: /etc/nginx/nginx.conf

        This state will ask nginx to reload (instead of restart)
        each time the /etc/nginx/nginx.conf is modified.

        .. versionadded:: 2015.8.0


    For other parameters, see salt.modules.dockerio execution module
    and the docker-py python bindings for docker documentation
    <https://github.com/dotcloud/docker-py#api>`_ for
    `docker.create_container`.

    .. note::
        This command does not verify that the named container
        is running the specified image.
     N/A N/A container None N/A N/A container name N/A ins_image N/A __salt__ N/A docker.inspect_image N/A ins_container N/A __salt__ N/A docker.inspect_container N/A create N/A __salt__ N/A docker.create_container N/A image_name N/A _get_image_name image tag N/A iinfos N/A ins_image image_name N/A image_exists N/A iinfos N/A status N/A N/A image_exists N/A N/A N/A _invalid comment N/A N/A image "{0}" does not exists format image_name N/A cinfos N/A ins_container name N/A already_exists N/A cinfos N/A status N/A already_exists_with_same_image N/A already_exists N/A N/A N/A cinfos N/A out N/A Image N/A N/A iinfos N/A out N/A Id N/A is_running N/A N/A __salt__ N/A docker.is_running container N/A N/A already_exists_with_same_image N/A is_running N/A start N/A N/A N/A _valid comment N/A N/A container {0!r} already exists format name N/A N/A N/A already_exists_with_same_image already_exists N/A N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Will replace outdated container {0!r} format name N/A N/A _ret_status name name comment comment N/A is_running N/A N/A stop_status N/A N/A __salt__ N/A docker.stop name N/A N/A N/A stop_status N/A status N/A N/A N/A _invalid comment N/A N/A Failed to stop outdated container {0!r} format name N/A remove_status N/A N/A __salt__ N/A docker.remove_container name N/A N/A N/A remove_status N/A status N/A N/A N/A _invalid comment N/A N/A Failed to remove outdated container {0!r} format name N/A already_exists False N/A N/A __opts__ N/A test N/A N/A comment N/A N/A Will create container {0!r} format name N/A N/A _ret_status name name comment comment N/A N/A exposeports bindports contvolumes bindvolumes denvironment changes N/A N/A N/A N/A N/A N/A N/A N/A N/A ports N/A N/A ports N/A N/A N/A volumes N/A N/A volumes N/A N/A N/A volumes_from N/A N/A volumes_from N/A N/A N/A isinstance environment dict N/A N/A key environment N/A N/A N/A denvironment N/A N/A N/A six text_type key N/A N/A six text_type N/A environment N/A key N/A N/A isinstance environment list N/A N/A var environment N/A N/A N/A isinstance var dict N/A N/A key var N/A N/A N/A denvironment N/A N/A N/A six text_type key N/A N/A six text_type N/A var N/A key N/A N/A isinstance volumes dict N/A N/A bindvolumes volumes N/A N/A isinstance volumes list N/A N/A vol volumes N/A N/A N/A isinstance vol dict N/A N/A source N/A N/A list N/A N/A vol keys N/A 0 N/A N/A isinstance N/A vol N/A source dict N/A N/A target N/A N/A vol N/A source N/A bind N/A read_only N/A N/A N/A vol N/A source get ro False N/A N/A target N/A str N/A vol N/A source N/A read_only False N/A N/A bindvolumes N/A source N/A bind ro target read_only N/A N/A N/A N/A contvolumes append N/A str vol N/A N/A isinstance ports dict N/A N/A bindports ports N/A N/A isinstance ports list N/A N/A port ports N/A N/A N/A isinstance port dict N/A N/A container_port N/A N/A list N/A N/A port keys N/A 0 N/A N/A isinstance N/A port N/A container_port dict N/A N/A host_port N/A N/A port N/A container_port N/A HostPort N/A host_ip N/A N/A N/A port N/A container_port get HostIp 0.0.0.0 N/A N/A host_port N/A str N/A port N/A container_port N/A host_ip 0.0.0.0 N/A N/A bindports N/A container_port N/A HostPort HostIp host_port host_ip N/A N/A N/A N/A exposeports append N/A str port N/A parsed_volumes N/A _parse_volumes volumes N/A bindvolumes N/A parsed_volumes N/A bindvols N/A contvolumes N/A parsed_volumes N/A contvols N/A N/A already_exists N/A N/A kwargs N/A dict command command hostname hostname user user detach detach stdin_open stdin_open tty tty mem_limit mem_limit ports exposeports environment denvironment dns dns binds bindvolumes volumes contvolumes name name cpu_shares cpu_shares cpuset cpuset N/A out N/A create image_name kwargs N/A N/A N/A cid N/A N/A N/A out N/A out N/A info N/A id N/A N/A N/A log debug N/A str cid N/A N/A N/A Exception N/A e N/A N/A N/A N/A changes append Container created N/A N/A N/A log debug N/A str e N/A N/A N/A N/A changes append N/A N/A Container {0} created format cid N/A start N/A N/A started N/A N/A __salt__ N/A docker.start name binds bindvolumes port_bindings bindports lxc_conf lxc_conf publish_all_ports publish_all_ports links links privileged privileged dns dns volumes_from volumes_from network_mode network_mode restart_policy restart_policy cap_add cap_add cap_drop cap_drop N/A check_is_running N/A N/A is_running N/A N/A __salt__ N/A docker.is_running name N/A N/A N/A log debug N/A Docker-io running: N/A str started N/A N/A N/A log debug N/A Docker-io running: N/A str is_running N/A is_running N/A N/A N/A N/A changes append N/A N/A Container {0!r} started.
 format name N/A N/A N/A _invalid comment N/A N/A Container {0!r} cannot be started
{1!s} format name N/A started N/A out N/A N/A N/A N/A changes append N/A N/A Container {0!r} started.
 format name N/A N/A _valid comment N/A N/A join changes changes N/A name True N/A