1 Reply Latest reply on Nov 8, 2013 4:58 AM by deepak_yadav

    Python & EPO

    _chris_

      Hi All,

       

      We have been trying to create a python script to automate the assignment of users to machines, and to add the Machine in EPO but do not have the programming knowledge.

      We have a CSV file with the two fields of "Machine,User".

       

      So far I've managed to get the following:

       

       

       

       

      (this is just the first part to add the PC)

       


      import mcafee
      import sys

      server="server"
      port=8443
      user= raw_input("account: ")
      pwd = raw_input("whazza passwurd?")

      try:
            mc = mcafee.client(server,port,user,pwd)
      except Exception, e:
            sys.stderr.write("error happened")

      pc= raw_input("PC: ")
      id="1508"

      try:
                 print "trying to add " + pc + " to branch id " + id
                 mc.system.importSystem(names=pc,branchNodeId=id)
      except Exception, e:
                  sys.stderr.write("error: " + str(e) + '\n')

       

       

      But its thrown an "int is unsubscriptable error"

       

       

       

       

      Does anyone have any examples on how to do this?

       

      Thanks

      Chris

       

       

      We have over 4,000 assignments to perform, and so assignment of the users manually would be near impossible!

       

      Message was edited by: _chris_ on 25/10/13 10:10:08 CDT

       

      Message was edited by: _chris_ on 25/10/13 10:10:51 CDT