Hi,
i'm currently working on a nxshell script to import a large number of nodes. This works fine so far, but I have a problem with set the image of the node.
The node i'm refering to has an image set and I can print the UUID.
Any ideas why setting images is not working?
i'm currently working on a nxshell script to import a large number of nodes. This works fine so far, but I have a problem with set the image of the node.
Code Select
flags = NXCObjectCreationData.CF_DISABLE_NXCP
containerId = 2
name = "Node1"
ip = "0.0.0.0"
node = session.findObjectByName("Node2")
cd = NXCObjectCreationData(objects.GenericObject.OBJECT_NODE, name, containerId);
cd.setCreationFlags(flags);
cd.setPrimaryName(ip)
nodeId = session.createObject(cd)
session.setObjectManaged(nodeId, False)
print '"%s" created (IP: %s)' % (name, ip)
md = NXCObjectModificationData(nodeId)
md.setImage(node.image)
session.modifyObject(md)
Code Select
Traceback (most recent call last):
File "<stdin>", line 13, in <module>
TypeError: setImage(): 1st arg can't be coerced to java.util.UUID
The node i'm refering to has an image set and I can print the UUID.
Any ideas why setting images is not working?