Ñò i'dWc @s÷ddkZddkZddkZddklZddklZlZddkl Z ei ei de ƒZdZeeidƒƒZdZhd d 6d d 6d d6edd6edd6ZdeefZd„Zdefd„ƒYZdS(iÿÿÿÿN(tetree(t SetUIDasEUIDt_(tINSTALL_LOGGER_NAMEt pretty_prints' s UnifiedArchive s2http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/s)http://www.w3.org/2001/XMLSchema-instancetxsis&http://schemas.dmtf.org/ovf/envelope/1tovfs2http://schemas.oracle.com/solaris/unifiedarchive/1tuatCIM_VirtualSystemSettingDatatvssdt!CIM_ResourceAllocationSettingDatatrasdshttp://schemas.dmtf.org/ovf/envelope/1 dsp8023_1.1.xsd http://schemas.oracle.com/solaris/unifiedarchive/1 unifiedarchive.xsd %sCIM_VirtualSystemSettingData CIM_VirtualSystemSettingData.xsd %sCIM_ResourceAllocationSettingData CIM_ResourceAllocationSettingData.xsdcCs<|iddƒ\}}|djo|Sdt||fS(Nt:is{%s}%s(tsplittNonet_NSMAP(ttagt namespacetelement((s ../ua_xml.pyt xml_nsmap8s tUnifiedArchiveDescriptorcBs)eZdZd„Zd„Zd„ZRS(sAn abstract XML generator for a UnifiedArchive's descriptor. Attributes: name The name of the new descriptor file path Path to the descriptor (in the staging area) Methods: commit() Write out the descriptor file. cCsDtitƒ|_||_d|_d|_d|_|i ƒdS(sÒConstruct a new descriptor object. Arguments: ua An instance of UnifiedArchive, representing the Unified Archive for which to create a descriptor. N( tloggingt getLoggertILNt_loggerRRtnametpatht_roott _generate(tselfR((s ../ua_xml.pyt__init__Ms     cCstitdƒdtƒ|_|iitdƒtƒ|ii|ii ƒƒ|i i dƒ|i i dt |iƒƒdS(Ns ovf:Envelopetnsmapsxsi:schemaLocations=UnifiedArchiveDescriptor._generate(): XML generation completes%s( RtElementRRRtsett_XSI_SCHEMA_LOCATIONtextendRtbuild_descriptor_xmlRtdebugt_pp(R((s ../ua_xml.pyR^s c Csòtƒiiƒz4ti|tiƒpttdƒ|ƒ‚nWdQX|ii d|_ ti i ||i ƒ|_ t |i dƒiiƒ}z=|~}|itƒ|itƒ|it|iƒƒWdQX|iid|i ƒdS(sÓWrite the generated Unified Archive descriptor out to the file. Arguments: staging The staging directory where the descriptor should be written. s%s not writeableNs.ovfsw+s.UnifiedArchiveDescriptor.commit(): %s complete(Rt__exit__t __enter__tostaccesstW_OKt SystemExitRRtuuidRRtjointopentwritet _XML_VERSIONt_HEADER_COMMENTR&RRR%(Rtstagingt_[1]tdesc((s ../ua_xml.pytcommiths )   (t__name__t __module__t__doc__RRR6(((s ../ua_xml.pyR@s   (t functoolsRR)tlxmlRtsolaris_installRRtsolaris_install.loggerRRtpartialttostringtTrueR&R1tCommentR2t_CIMBASERR"RtobjectR(((s ../ua_xml.pyts$