Obtaining a RAD Remote Object Reference From a Name in Python
Names (ADRName
is the class name) are returned by the RADConnection list_objects
method. Once you have a name, you can obtain a remote object reference easily.
Example 2-35 Python Language – Obtaining a RAD Remote Object Reference
>>> import rad.bindings.com.oracle.solaris.rad.zonemgr as zonemgr >>> import rad.connect as radcon >>> with radcon.connect_unix() as rc: ... zonelist = rc.list_objects(zonemgr.Zone()) ... zone = rc.get_object(zonelist[0]) ... print zone.name ... test-0 >>>
You can get values of individual components of an ADRName object by using the dot notation nameObj.key
or by using the getattr(nameObj, key)
function call.
zonelist[0].name