I have a script that sets a Custom JVM Property at each of the node agents, but I also want it to do the same at the dmgr level. I'm having a hard time getting the id for the dmgr jvm. Here's my nodeagent script. I'm really struggling with the list, listServers, getid differences.
Thanks to covener's comment, here's the working script
List deplyment manager server
dmgrServer = AdminTask.listServers('[-serverType DEPLOYMENT_MANAGER]').splitlines()
for jvm in dmgrServer: # get dmgr jvm id jvmid = AdminConfig.list('JavaVirtualMachine', jvm) # create new property AdminConfig.create('Property', jvmid, '[[validationExpression ""] [name "MyProperty"] [description "Do cool stuff"] [value "true"] [required "false"]]')
Get all the node agent servers
nodeagents = AdminTask.listServers('[-serverType NODE_AGENT]').splitlines()
for nodeagent in nodeagents: # get the id of the JVM for this node agent server jvmid = AdminConfig.list('JavaVirtualMachine', nodeagent) # set the custom property AdminConfig.create('Property', jvmid, '[[validationExpression ""] [name "MyProperty"] [description "Do cool stuff"] [value "true"] [required "false"]]')
save the configuration changes
AdminConfig.save()
sync all active nodes
AdminNodeManagement.syncActiveNodes()