Updates docker swarm nodes/needs to target a manager node/minion

    availability
        Drain or Active

    node_name
        minion/node

    role
        role of manager or worker

    node_id
        The Id and that can be obtained via swarm.node_ls

    version
        Is obtained by swarm.node_ls

    CLI Example:

    .. code-block:: bash

        salt '*' swarm.update_node availability=drain node_name=minion2 \
            role=worker node_id=3k9x7t8m4pel9c0nqr3iajnzp version=19

def update_node(availability=str,
                node_name=str,
                role=str,
                node_id=str,
                version=int):
    '''
    Updates docker swarm nodes/needs to target a manager node/minion

    availability
        Drain or Active

    node_name
        minion/node

    role
        role of manager or worker

    node_id
        The Id and that can be obtained via swarm.node_ls

    version
        Is obtained by swarm.node_ls

    CLI Example:

    .. code-block:: bash

        salt '*' swarm.update_node availability=drain node_name=minion2 \
            role=worker node_id=3k9x7t8m4pel9c0nqr3iajnzp version=19
    '''
    client = docker.APIClient(base_url='unix://var/run/docker.sock')
    try:
        salt_return = {}
        node_spec = {'Availability': availability,
                     'Name': node_name,
                     'Role': role}
        client.update_node(node_id=node_id,
                           version=version,
                           node_spec=node_spec)
        salt_return.update({'Node Information': node_spec})
    except TypeError:
        salt_return = {}
        salt_return.update({'Error': 'Make sure all args are passed [availability, node_name, role, node_id, version]'})
    return salt_return