+def get_stovol_rasd_from_sdc(virt, server, dp_inst_id):
+ rasd = None
+ ac_cn = get_typed_class(virt, "AllocationCapabilities")
+ an_cn = get_typed_class(virt, "SettingsDefineCapabilities")
+ key_list = {"InstanceID" : dp_inst_id}
+
+ try:
+ inst = GetInstance(server, ac_cn, key_list)
What if inst is None - should return an error here.
+ rasd = Associators(server, an_cn, ac_cn,
InstanceID=inst.InstanceID)
Should also check to make sure rasd is of some length - otherwise,
return an error.
+ except Exception, detail:
+ logger.error("Exception: %s", detail)
+ return FAIL, None
+
+ return PASS, rasd
+
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com