ó i'dWc@sìddlZddlZddlZddlZddlZddlZddljZddl m Z ddl m Z ddl mZmZddlmZddlmZddlmZmZdZd Zd ejfd „ƒYZdS( iÿÿÿÿN(tS_IRUSR(tetree(tSYSTEM_TEMP_DIRtrun(t AIInstance(tUnifiedArchive(t ArchiveSpectSoftwaretapply_sysconfig_dicttprofiletApplySysConfigcBs#eZdZd„Zed„ZRS(srICT checkpoint that applies the system configuration SMF profile(s) to the target during an AI installationcCs#tt|ƒj|ƒd|_dS(sµInitializes the class Parameters: -name - this arg is required by the AbstractCheckpoint and is not used by the checkpoint. N(tsuperR t__init__tNonetprofiles(tselftname((sapply_sysconfig.pyR 6scCsù|jjdƒ|jƒtƒ}tjj|jtj ƒ|tj j?dt@ddƒ\}}tƒ}||tj jIdt@ƒ}|r5t }x¬|D]¡}|rPntJjK|ƒjLƒ}xy|jMd ƒD]h}|j*d ƒd!krÂtjNd"tjj|d#ƒd$d%d$d&d$d'd$d(g }tB|ƒt#}PqÂqÂWqWntjNd"tjj|d)ƒd$d%d$d*d$d+d$d,d-| d$d.d$d/g}tB|ƒ|sÓ|jjdtE|ƒƒtjAd|g}tB|d|ƒqÓntjj2|ƒrõtjO|ƒndS(0s The AbstractCheckpoint class requires this method in sub-classes. Validates the profile against service configuration DTD using svccfg. Copies a profile or directory of profiles to the smf site profile directory in the target destination area. The path of the profile or directory of profiles is stored in a data dictionary in the DOC with a name defined by this checkpoint. Parameters: - the dry_run keyword paramater. The default value is False. If set to True, the log message describes the checkpoint tasks. Returns: - Nothing On failure, errors raised are managed by the engine. s>ICT current task: Applying the system configuration profile(s)t class_typeitARCHIVEsSICT: apply_sysconfig: UnifiedArchive discovered without archive transfer registeredt solaris10sSDeploying a 'solaris10' brand zone from a Unified Archive, skipping apply_sysconfigNs %Y%m%d-%H%M%Ss&etc/svc/profile/sysconfig/sysconfig-%strecoverysusr/libRsNo profile given.sYRecovery archive is pre-configured, no need to apply default system configuration profilesUsing default profile: %ssChecking for profile %ssCannot access profile %ss3There are no system configuration profiles to applysProcessing profile directory %sttopdownsProcessing profile file %stdirtprefixt install_repo_sValidating profile %stapplys-n tenvs*applying profile %s directly to repositorysexecution environment: %stservicesnetwork/installs-osnw_unconfig.xmls-ssbundle-type=profilesservice-name=milestone/unconfigs:service-property=sysconfig:unconfig_groups:astring:networks3service-property=sysconfig:unconfigure:boolean:trues config.xmlsservice-name=milestone/configsinstance-name=defaults1instance-property=sysconfig:config_dir:astring:%st/s2instance-property=sysconfig:configure:boolean:trues<instance-property=sysconfig:interactive_config:boolean:false(Ptloggertdebugt parse_doctdicttostpathtjoint target_dirtICTtSVC_REPOtSVCCFG_REPOSITORYt SVC_BUNDLEt SVCCFG_DTDtFalsetdoctvolatiletget_first_childRR tget_descendantsRRt tran_typetuppert RuntimeErrorRtcontentstarchive_objectstzoneRtbrandttimetstrftimet localtimet archive_typetTruet SVC_CONFIGDtSVCCFG_CONFIGD_PATHtLD_LIBRARY_PATHt PROFILE_DESTtAPPLY_SYSCONFIG_DICTt data_dicttgettAPPLY_SYSCONFIG_PROFILE_KEYRtisdirtlistdirt ENABLE_SCItaccesstF_OKtexiststmakedirstchmodRtchowntgrptgetgrnamtSYStgr_gidtlisttwalktappendttempfiletmkstempRtSVCCFGRtfilecmptcmptstrtbasenametshutiltcopytmkdtempRtparsetgetroottfindallt SVCBUNDLEtunlink(Rtdry_runtalt_smftis_recovery_archivetuataitswtzonenametarchive_objectt timestamptsc_dirtsc_profile_dstt as_doc_dicttall_profile_dirs_emptyR t profile_listtroottdirstfilesRt_nonet repo_namet validate_varst enable_scitcmdtfdstttempdirtdonettreetelement((sapply_sysconfig.pytexecute@s  ""     ""    "   (  % '  "    !)       (t__name__t __module__t__doc__R R*R}(((sapply_sysconfig.pyR 2s (RVRLR!RZRSR6tsolaris_install.icttictR%tstatRtlxmlRtsolaris_installRRt%solaris_install.ai.client.ai_instanceRtsolaris_install.archiveRtsolaris_install.transfer.infoRRR?RBt ICTBaseClassR (((sapply_sysconfig.pyts