ó C…#Wc@sºdZddlmZddlmZddlmZdZdZdZ defd „ƒYZ d efd „ƒYZ d „Z d d„Z dd„Zdd„Zdd„Zd„ZdS(s& DOC object definitions for sysconfig iÿÿÿÿ(tetree(trun(t DataObjects /usr/bin/svcss/usr/sbin/svccfgs/usr/bin/svcproptSystemConfigurationcBsYeZdZd„Zd„Zd„Zed„ƒZed„ƒZd„Z d„Z RS(s­ Primary DOC object for sysconfig. class attribute assignment and retreival are specifically checked first for any labels in the sysconfig/config_properties property for each service which participates in sysconfig. example: sc = SystemConfiguration(....) sc.sc_hostname = "newhost" Since the attribute is a label in one of the participating services (in this case, svc:/system/identity:node), setattr walks all of the child DOC nodes to find the correct object to update. getattr works in same way. If the attribute being fetched is not in the class instance dictionary, it looks in the children objects for the attribute. cCsAtt|ƒj|ƒ||_||_tƒ|_t|_dS(N( tsuperRt__init__tlabelsttypestdictt child_cachetFalsethas_xml(tselftnameRR((s sc_spec.pyR>s    cCs¸t|dƒr›||jkr›|j|}||jkrTt|j|||ƒq´x]|jD]6}||jkr^t|||ƒ||j|t prop_valueR@((s sc_spec.pyR8ÑscCsbtjdd|d|ƒ}|d}tj||ƒ}x$|D]}tj|dd|ƒq>W|S(NtpropertyR RJt_listt value_nodeR(RRMt SubElement(R>t prop_listR@Rt anchor_tagtanchorR((s sc_spec.pyR9Ös   cCsµtdddddg}t|ddƒ}tƒ}xE|jjƒD]4}|jƒ\}}|dkrC|j|ƒqCqCWd |kr±d |krªd |kr£d Sd Sq±dSndS(sF function to determine which milestone the system is currently at s-as-Hs-os STATE,FMRIs milestone*tloggerttonlinessvc:/milestone/unconfig:defaultssvc:/milestone/config:defaults!svc:/milestone/multi-user:defaulttalltconfigtunconfigN(tSVCSRR$tstdoutt splitlinesR1R&R(tcmdtpt milestonestlinetstatetfmri((s sc_spec.pyt milestoneßs     N(R+tlxmlRtsolaris_installRt!solaris_install.data_object.cacheRRctSVCCFGtSVCPROPRR R:R;R2R8R9Rl(((s sc_spec.pytsRI