FAQ
Hello,

I'm trying to thread the command client.cmd('*','state.highstate') and i
want to display the final output. Here is the code I am using:

import salt.client
import salt.config
import thread, time
import threading

def thread_state(test):
     client = salt.client.LocalClient()
     test['id'] = client.cmd('*','state.highstate')

test = { "id": 1 }

thread.start_new_thread(thread_state, (test,))

time.sleep(1)

print test['id']


I am receiving output but it's not what I am looking for, I am getting:

  {'SaltMinion-Windows': ['The function "state.highstate" is running as PID
1420 and was started at 2015, Apr 15 10:13:54.642723 with jid
20150415101354642723']}

Does anyone know how I go about getting the final output displaying which
packages have been installed and which have failed.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupsalt-users @
postedApr 15, '15 at 3:33p
activeApr 22, '15 at 8:46p
posts2
users2

2 users in discussion

Charles Moore: 1 post Colton Myers: 1 post

People

Translate

site design / logo © 2021 Grokbase