def layers(name):
 ret = []
 cmd = ['docker', 'history', '-q', name]
 for line in reversed(__salt__['cmd.run_stdout'](cmd, python_shell=False).splitlines()):
  ret.append(line)
 if (not ret):
  raise CommandExecutionError("Image '{0}' not found".format(name))
 return ret

def layers ( name ) : ret = [ ] cmd = [ 'docker' , 'history' , '-q' , name ] for line in reversed ( __salt__ [ 'cmd.run_stdout' ] ( cmd , python_shell = False ) . splitlines ( ) ) : ret . append ( line ) if ( not ret ) : raise CommandExecutionError ( "Image '{0}' not found" . format ( name ) ) return ret
returns a list of the ids of layers belonging to the specified image .