wiki:TorqueUsage/DataTypes/Attropl

Version 4 (modified by bas, 18 years ago) (diff)

--

Attropl data type

Attropl is a structure which is defined in pbs_ifl.h as:

struct attropl {
  struct attropl *next;
  char           *name;
  char           *resource;
  char           *value;
  enum batch_op   op;
  };

Python Usage

If a function requires this data type then use the following code:

# Values depend in which context we use it, eg for pbs_manager()
#
attropl = pbs.new_attropl(1)
attropl[0].name = 'properties'
attropl[0].value = 'gigabit'
attropl[0].op = pbs.INCR

This will add a node property gigabit

Note: That the next pointer definition is not used in the Python code. The module will automatically convert a C linked list to a Python list a vice versa

Attachments (1)

Download all attachments as: .zip