Спасибо! Кажись работает!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menushow objects
subnet = session.findObjectByName("192.168.0.0/26")
nodes = sn.getAllChilds(objects.GenericObject.OBJECT_NODE)
for node in nodes:
if node.objectName != 'node.name.ex':
print '%d - %s' % (node.objectId, node.objectName)
if session.deleteObject(node.objectId):
print 'OK'
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
at java.net.SocketOutputStream.write(SocketOutputStream.java:149)
at org.netxms.client.NXCSession.sendMessage(NXCSession.java:1374)
at org.netxms.client.NXCSession.deleteObject(NXCSession.java:4164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
java.net.SocketException: java.net.SocketException: Broken pipe (Write failed)