Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. nxshell BulkImport image problems

nxshell BulkImport image problems

Scheduled Pinned Locked Moved Support
1 Posts 1 Posters 26.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U
    U
    Andreas@rc
    wrote on last edited by
    #1

    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.

    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)
    
    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?

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups