Using RAD Structs in Python
The zonemgr
module defines a Property struct which represents an individual zone configuration property. The structure has the following members: name
, type
, value
, value
, listValue
, and complexValue
. Like enumerations, structures can be interacted with directly once the binding is imported.
Example 2-40 Python Language – Using RAD Structs
>>> import rad.bindings.com.oracle.solaris.rad.zonemgr as zonemgr >>> prop = zonemgr.Property("autoboot", "false") >>> print prop Property(name = 'autoboot', value = 'false', type = None, listvalue = None, complexvalue = None) >>> prop.name = "my name" >>> prop.value = "a value" >>> print prop.name my name >>> print prop.value a value >>>