All pastes #79375 Raw Edit

Nagappan

public text v1 · immutable
·published 2006-07-05 08:24 UTC
rendered paste body
nags@nags:~> cd /tmp/
nags@nags:/tmp> python
Python 2.4.3 (#1, May 29 2006, 19:28:16)
[GCC 4.1.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ldtp import *
>>> Wed Jul  5 13:57:15 2006: Client connection: accepted

>>> #startlog ('./test-lavi.xml', )
...
>>> startlog ()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: startlog() takes at least 1 argument (0 given)
>>> startlog ('./test-lavi.xml')
startlog ( ./test-lavi.xml , 1 )
Send packet <?xml version="1.0"?><REQUEST><ACTION>startlog</ACTION><ID>721479893</ID><CONTEXT>./test-lavi.xml</CONTEXT><COMPONENT>1</COMPONENT></REQUEST>
Client packet len: 141
i = 0
Data read 141, packet-len = 141, bytes read = 141, data: <?xml version="1.0"?><REQUEST><ACTION>startlog</ACTION><ID>721479893</ID><CONTEXT>./test-lavi.xml</CONTEXT><COMPONENT>1</COMPONENT></REQUEST>
PACKET LENGTH: 0
Received packet [<?xml version="1.0"?><REQUEST><ACTION>startlog</ACTION><ID>721479893</ID><CONTEXT>./test-lavi.xml</CONTEXT><COMPONENT>1</COMPONENT></REQUEST>] through 19
Node: ACTION
action_name: startlog
Node: ID
request_id: 721479893
Node: CONTEXT
Window name: ./test-lavi.xml
Node: COMPONENT
Component name: 1
Command: startlog
Get command id: startlog
resp_len = 117
Sending..
149
Response packet: <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>721479893</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
Msg:
Bytes sent: 153
Received packet size 149
Received response Packet <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>721479893</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
1
>>> stoplog ()
stoplog ( )
Send packet <?xml version="1.0"?><REQUEST><ACTION>stoplog</ACTION><ID>1778337210</ID></REQUEST>
Client packet len: 83
i = 0
Data read 83, packet-len = 83, bytes read = 83, data: <?xml version="1.0"?><REQUEST><ACTION>stoplog</ACTION><ID>1778337210</ID></REQUEST><
PACKET LENGTH: 0
Received packet [<?xml version="1.0"?><REQUEST><ACTION>stoplog</ACTION><ID>1778337210</ID></REQUEST><] through 19
Node: ACTION
action_name: stoplog
Node: ID
request_id: 1778337210
Command: stoplog
Get command id: stoplog
resp_len = 117
Sending..
150
Response packet: <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>1778337210</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
Msg:
Bytes sent: 154
Received packet size 150
Received response Packet <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>1778337210</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
1
>>>
nags@nags:/tmp> cd
nags@nags:~> python
Python 2.4.3 (#1, May 29 2006, 19:28:16)
[GCC 4.1.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> startlog ()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'startlog' is not defined
>>> from ldtp import *
>>> Wed Jul  5 13:59:18 2006: Client connection: accepted

>>> startlog ('./test-lavi.xml')
startlog ( ./test-lavi.xml , 1 )
Send packet <?xml version="1.0"?><REQUEST><ACTION>startlog</ACTION><ID>1511890178</ID><CONTEXT>./test-lavi.xml</CONTEXT><COMPONENT>1</COMPONENT></REQUEST>
Client packet len: 142
i = 0
Data read 142, packet-len = 142, bytes read = 142, data: <?xml version="1.0"?><REQUEST><ACTION>startlog</ACTION><ID>1511890178</ID><CONTEXT>./test-lavi.xml</CONTEXT><COMPONENT>1</COMPONENT></REQUEST>
PACKET LENGTH: 0
Received packet [<?xml version="1.0"?><REQUEST><ACTION>startlog</ACTION><ID>1511890178</ID><CONTEXT>./test-lavi.xml</CONTEXT><COMPONENT>1</COMPONENT></REQUEST>] through 20
Node: ACTION
action_name: startlog
Node: ID
request_id: 1511890178
Node: CONTEXT
Window name: ./test-lavi.xml
Node: COMPONENT
Component name: 1
Command: startlog
Get command id: startlog
resp_len = 117
Sending..
150
Response packet: <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>1511890178</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
Msg:
Bytes sent: 154
Received packet size 150
Received response Packet <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>1511890178</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
1
>>> stoplog ()
stoplog ( )
Client packet len: 83
i = 0
Data read 83, packet-len = 83, bytes read = 83, data: <?xml version="1.0"?><REQUEST><ACTION>stoplog</ACTION><ID>2039337862</ID></REQUEST>
PACKET LENGTH: 0
Received packet [<?xml version="1.0"?><REQUEST><ACTION>stoplog</ACTION><ID>2039337862</ID></REQUEST>] through 20
Node: ACTION
action_name: stoplog
Node: ID
request_id: 2039337862
Command: stoplog
Get command id: stoplog
resp_len = 117
Sending..
150
Response packet: <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>2039337862</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
Msg:
Bytes sent: 154
Send packet <?xml version="1.0"?><REQUEST><ACTION>stoplog</ACTION><ID>2039337862</ID></REQUEST>
Received packet size 150
Received response Packet <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>2039337862</ID><STATUS><CODE>0</CODE><MESSAGE>Successfully completed</MESSAGE></STATUS></RESPONSE>
1
>>>
Client packet len: 0
<cause>Packet received from client is not valid</cause>
handle_client: error:
resp_len = 117
Sending..
171
Response packet: <?xml version="1.0" encoding="utf-8"?><RESPONSE><ID>2039337862</ID><STATUS><CODE>-994</CODE><MESSAGE>Packet received from client is not valid</MESSAGE></STATUS></RESPONSE>
Msg:
Bytes sent: -1
Wed Jul  5 13:59:28 2006: Client disconnected
nags@nags:~> cat /tmp/test-lavi.xml
<?xml version='1.0' encoding='utf-8'?>
<!-- XML Logging -->
<ldtp>
</ldtp>