#NEWLINE# def pushed( name , tag = 'latest' , insecure_registry = False ) : #NEWLINE# #INDENT# '\n    Push an image from a docker registry. (`docker push`)\n\n    .. note::\n\n        See first the documentation for `docker login`, `docker pull`,\n        `docker push`,\n        and `docker.import_image <https://github.com/dotcloud/docker-py#api>`_\n        (`docker import\n        <http://docs.docker.io/en/latest/reference/commandline/cli/#import>`_).\n        NOTE that we added in SaltStack a way to authenticate yourself with the\n        Docker Hub Registry by supplying your credentials (username, email\n        & password) using pillars. For more information, see\n        salt.modules.dockerio execution module.\n\n    name\n        Name of the image\n\n    tag\n        Tag of the image [Optional]\n\n    insecure_registry\n        Set to ``True`` to allow connections to non-HTTPS registries. Default ``False``.\n    ' #NEWLINE# image_name = _get_image_name ( name , tag ) #NEWLINE# if __opts__ [ 'test' ] : #NEWLINE# #INDENT# comment = 'Image {0} will be pushed' . format ( image_name ) #NEWLINE# return _ret_status ( name = name , comment = comment ) #NEWLINE# #UNINDENT# push = __salt__ [ 'docker.push' ] #NEWLINE# returned = push ( name , tag = tag , insecure_registry = insecure_registry ) #NEWLINE# log . debug ( ( 'Returned: ' + str ( returned ) ) ) #NEWLINE# if returned [ 'status' ] : #NEWLINE# #INDENT# changes = { #NEWLINE# #INDENT# name : { #NEWLINE# #INDENT# 'Rev' : returned [ 'id' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# changes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return _ret_status ( returned , name , changes = changes )