- example application of the SystemManager Client-side infrastructure git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2420 cd1c1023-2f26-0410-ae45-c471fc1f0318
27 lines
934 B
Plaintext
27 lines
934 B
Plaintext
import sys
|
|
sys.path.insert(0,'../libraries')
|
|
from entropy import SystemManagerClientInterface, SystemManagerRepositoryClientCommands, SystemManagerRepositoryMethodsInterface, EquoInterface
|
|
from entropyConstants import *
|
|
Entropy = EquoInterface()
|
|
cli_srv = SystemManagerClientInterface(
|
|
Entropy,
|
|
MethodsInterface = SystemManagerRepositoryMethodsInterface,
|
|
ClientCommandsInterface = SystemManagerRepositoryClientCommands
|
|
)
|
|
def fake_callback(s):
|
|
return s
|
|
|
|
input_params = [
|
|
('password','Password',fake_callback,True)
|
|
]
|
|
data = Entropy.inputBox(
|
|
'insert root password',
|
|
input_params,
|
|
cancel_button = True
|
|
)
|
|
if isinstance(data,dict):
|
|
cli_srv.setup_connection('localhost', 1027, 'root', data['password'])
|
|
print cli_srv.get_available_client_commands()
|
|
#print cli_srv.Methods.compile_atom('sys-libs/zlib')
|
|
#st, queue = cli_srv.Methods.get_queue()
|
|
#if st: print queue['processing'] |