Changeset 235 for trunk


Ignore:
Timestamp:
04/28/10 10:47:27 (14 years ago)
Author:
bas
Message:

examples/set_property.py:

  • Now accept a hostname as argument


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/set_property.py

    r134 r235  
    1919    sys.exit(1)
    2020
     21  if len(sys.argv) < 2:
     22        print "Usage: set_property.py <hostname>"
     23        sys.exit(1)
     24
     25  hostname = sys.argv[1]
     26
    2127  con = pbs.pbs_connect(pbs_server)
    2228
    2329  attrop_l = pbs.new_attropl(1)
    24   attrop_l[0].name  = 'properties'
     30  attrop_l[0].name  = 'note'
    2531  attrop_l[0].value = 'set_something_useful'
    26   attrop_l[0].op    = pbs.INCR
     32  attrop_l[0].op    = pbs.SET
    2733
    2834  r =  pbs.pbs_manager(con, pbs.MGR_CMD_SET, pbs.MGR_OBJ_NODE,
    29                     "e2", attrop_l, 'NULL')
     35                    hostname, attrop_l, 'NULL')
    3036
    3137  if r > 0:
Note: See TracChangeset for help on using the changeset viewer.