Vc@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddlZddlZddljZddljjZddljjZddljjZddljjZddljjZddljj Z ddl!jj"Z#ddl$jj%Z%ddl&jj'Z'ddl(jj)Z)ddl*jj+Z+ddl,jj-Z.ddl/j0Z0ddl1j2Z3ddl4j5Z5ddl6Z7ddl8j9Z9ddl:j;Z;ddl<j=Z=ddl>j?Z?ddl@Z7ddlAmBZBmCZCmDZDmEZEddlFmGZGddlHmIZIddl&TddlJmKZKddl(mLZLd ZMeNd d d d ddddddeMg ZOdZPe#jQZRe#jSZTe#jUZVe#jWZXejYZYejZZZej[Z[ej\Z\ej]Z]ej^Z^ej_Z_ej`Z`ejaZaejbZbejcZcejdZdejeZeejfZfeGjgZgdehfdYZidehfdYZjdehfdYZkde.jlfdYZlemdZneme5joepe5jqe5jqemeremememepeme5joe5joemdZsdS(s]This module provides the supported, documented interface for clients to interface with the pkg(5) system. Refer to pkg.api_common and pkg.plandesc for additional core class documentation. Consumers should catch ApiException when calling any API function, and may optionally catch any subclass of ApiException for further, specific error handling. iN(t PackageInfot LicenseInfotPackageCategoryt_get_pkg_cat_data(tglobal_settings(t DebugValues(t*(tNonzeroExitException(tPlanDescriptioniRiHiIiJiKiLiMiNiOiPiQit_LockedGeneratorcBs eZdZdZdZRS(sThis is a private class and should not be used by API consumers. This decorator class wraps API generator functions, managing the activity and cancelation locks. Due to implementation differences in the decorator protocol, the decorator must be used with parenthesis in order for this to function correctly. Always decorate functions @_LockedGenerator().cOstj|dS(N(tobjectt__init__(tselftd_argstd_kwargs((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR scsfd}|S(Nc?s#|d|d}}|j|jt}t}zty&x|||D] }|VqNWWnGtk rrdStjk rt}ntk rt}nXWd|r|jnR|ry|j Wqtjk r|j|j j qXn |j |j j XdS(Nii( t_acquire_activity_lockt_enable_canceltTruetFalset GeneratorExittapxtCanceledExceptiont Exceptiont _cancel_donet_disable_cancelt_activity_locktreleaset_cancel_cleanup_exception(tfargstf_kwargstinstancet clean_exittcanceledtv(tf(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytwrappers8           ((R R"R#((R"s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__call__s (t__name__t __module__t__doc__R R$(((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR s t_LockedCancelablecBs eZdZdZdZRS(sThis is a private class and should not be used by API consumers. This decorator class wraps non-generator cancelable API functions, managing the activity and cancelation locks. Due to implementation differences in the decorator protocol, the decorator must be used with parenthesis in order for this to function correctly. Always decorate functions @_LockedCancelable().cOstj|dS(N(R R (R R R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR scsfd}|S(Ncs|d|d}}|j|jt}t}zQy|||SWn6tjk rkt}ntk rt}nXWd|jjy;t t j j dddkr|jj jjnWntk rnX|r|jnn|r\y|jWqftjk rX|j|jjrE|jjn|jjqfXn |j|jjr|jjn|jjXdS(NiitPKG_DUMP_STATS(RRRRRRRt_imgtcleanup_downloadstinttostenvirontgett transporttstatstdumpt ValueErrorRRtlockedtunlockRRR(RRRRR (R"(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR#sH             ((R R"R#((R"s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR$s.(R%R&R'R R$(((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR(s tImageInterfacecBs[ eZdZdZdZdZejjj Z ejjj Z ejjj Z dZ dZ dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZeedZdZ d Z!e"d Z#e$d e d d Z%e$dZ&e$dZ'e$dZ(e$dZ)e$dZ*e$dZ+e$dZ,e$dZ-dZ.e$de.d dZ/e$dZ0e$dZ1e2dZ3edZ4dZ5dZ6dZ7d Z8d!Z9e:d"Z;e<d#Z=d$Z>d%Z?e<e@jAd&ZBe<e@jAd'ZCe<ee<d(ZDd)ZEe<d*ZFd+ZGd,ZHd-ZIdeeeeee<eee<ee<e<eeeed.ZJe"e<d/ZKed0ZLe"d1ZMe<d2ZNee@jAe<eee<eed3ZOee@jAe<e<eeeeed4 ZPedeeeee<e<eeeee<eee@jAeed5ZQee<eee@jAe<eed6ZRdeeeeeeee<e<eee@jAeed7ZSeeeeeee<e<ee@jAeed8 ZTeeeeee<eee<e<eee@jAeed9ZUe<eeeee<ee<eee<e<ee@jAeed:ZVeeeee<ee<ee<e<d; ZWe<eee<ed<ZXdeeeee<eeee<e<eed= ZYeeeeeeee<ed> ZZeee<eeeed?Z[eedeeeeeeeee<eee@jAeed@Z\e<eeeedAZ]eeeeeee<dBZ^eedCZ_eedDZ`eeeeeedEZaee<e<e<e<ee<ee@jAe<edF Zbe<e<ee<dGZcdHZde<e<ee<ee<edIZedJZfdKZgdLZhedMZidNZjedOZke2dPZldQZmdRZnee@jAdSZodTZpedUZqedVZre<dWZse<dXZtdYZudZZvd[Zwd\Zxeed]Zye<ee<d^Zze<ee<d_Z{ed`Z|e"e<e@jAedaZ}edbZ~dcZddZeee<e@jAe@jAe<e<ee<e<de Zee<eee@jAe@jAe<e<ee<e<e<df Ze"e<edgZdhZdiZdjZdkZdlZdmZdnZdoZdpZdqZdrZdsZedtZe2duZe2dvZeeedwZdxZe2dyZdzZd{Zeed|Ze2d}Zee@jAe@jAeeee@jAd~ZdZeee<dZe"eedZe<dZeedZeedZeedZeeeedZeeeedZeeedZdZdZe<dZeeedZdZdZdZeedZdZdZRS(saThis class presents an interface to images that clients may use. There is a specific order of methods which must be used to install or uninstall packages, or update an image. First, a gen_plan_* method must be called. After that method completes successfully, describe may be called, and prepare must be called. Finally, execute_plan may be called to implement the previous created plan. The other methods do not have an ordering imposed upon them, and may be used as needed. Cancel may only be invoked while a cancelable method is running.iiiiiic Cst|tkr!tjt|ntjdjdrFtjntj d kra|t_ n|d kr|t j }n||_ |j rdtjkr|j jtjdrtdnt|tr||_tj|d|d|d|j |_|jj|_n?t|tjrC||_|j|_nttd ||_d }|jjjr|jjj}n|jj |||_!d |_"d |_#d |_$t%|_&t%|_'t%|_(t)|_*d |_+d |_,t%|_-t%|_.t/j0j1|_2t%|_3|j3|j_4t/j0j1|_5t6j7|j5|_8d |_9d |_:i|_;d S( sConstructs an ImageInterface object. 'img_path' is the absolute path to an existing image or to a path from which to start looking for an image. To control this behaviour use the 'exact_match' parameter. 'version_id' indicates the version of the api the client is expecting to use. 'progresstracker' is the ProgressTracker object the client wants the api to use for UI progress callbacks. 'cancel_state_callable' is an optional function reference that will be called if the cancellable status of an operation changes. 'pkg_client_name' is a string containing the name of the client, such as "pkg" or "packagemanager". 'exact_match' is a boolean indicating whether the API should attempt to find a usable image starting from the specified directory, going up to the filesystem root until it finds one. If set to True, an image must exist at the location indicated by 'img_path'. is/dev/fd/tPKG_NO_RUNPY_CMDPATHsrun.pysU An ImageInterface object was allocated from within ipkg test suite and cmdpath was not explicitly overridden. Please make sure to set explicitly set cmdpath when allocating an ImageInterface object, or override cmdpath when allocating an Image object by setting PKG_CMDPATH in the environment or by setting simulate_cmdpath in DebugValues.t progtracktuser_provided_dirtcmdpathsUnknown img_path type.N(<tCOMPATIBLE_API_VERSIONSRtVersionExceptiontCURRENT_API_VERSIONtsystpatht startswithtSuidUnsupportedErrorRt client_nametNonetmisct api_cmdpathR:R-R.tendswithtsept RuntimeErrort isinstancet basestringt _img_pathtimagetImageR*tget_roott TypeErrort_t _ImageInterface__progresstrackertlinkedtischildt child_nametset_linked_namet&_ImageInterface__cancel_state_callablet_ImageInterface__plan_typet_ImageInterface__api_opt_ImageInterface__plan_descRt!_ImageInterface__planned_childrent_ImageInterface__preparedt_ImageInterface__executedRt_ImageInterface__be_activatet_ImageInterface__backup_be_namet_ImageInterface__be_namet _ImageInterface__can_be_canceledt_ImageInterface__cancelingtpkgtnrlocktNRLockRt_ImageInterface__blocking_lockstblocking_lockst_ImageInterface__cancel_lockt threadingt Conditiont_ImageInterface__cancel_cvt_ImageInterface__backup_bet_ImageInterface__new_bet_ImageInterface__alt_sources( R timg_patht version_idtprogresstrackertcancel_state_callabletpkg_client_namet exact_matchR:tlin((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR sf                           cCs3|jj||_||j_|jjdS(N(RtacquireReR*RfR(R tvalue((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__set_blocking_lockss   cCs6|r"|jj|j|n|jjddS(sgPrivate helper function to change image to use alternate package sources if applicable.N(R*tset_alt_pkg_sourcest!_ImageInterface__get_alt_pkg_dataRC(R trepos((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__set_img_alt_sourcess cCs|j|dS(s5Public function to specify alternate package sources.N(t$_ImageInterface__set_img_alt_sources(R Rz((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt set_alt_reposscCs|jS(N(Re(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytstdocsVA boolean value indicating whether the API should wait until the image interface can be locked if it is in use by another thread or process. Clients should be aware that there is no timeout mechanism in place if blocking is enabled, and so should take steps to remain responsive to user input or provide a way for users to cancel operations.cCs |jjS(s#The list of excludes for the image.(R*t list_excludes(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytexcludesscCs|jS(sePrivate; public access to this property will be removed at a later date. Do not use.(R*(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytimgscCs#|js dS|jj|jjS(s3Returns the IMG_TYPE constant for the image's type.N(R*RCt image_typetroot(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytimg_types cCs |jjS(sbA boolean indicating whether the image to be modified is for the live system root.(R*t is_liveroot(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRscCs |jjS(s7A boolean value indicating whether the image is a zone.(R*tis_zone(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRscCsd|jjstSy5tjj|jj\}}|tjjkSWntj k r_tSXdS(ssA boolean indicating whether the image to be modified is the active BE for the system's root image.N( R*RRtbootenvtBootEnvt get_be_nameRtget_activated_be_nameRt BEException(R tbe_nametbe_uuid((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytis_active_liveroot_bes cCs|jj}tj||S(s'A path to the image planning directory.(R*tplandirRDtmakedirs(R R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt img_plandirs  cCs |jjS(sZA datetime object representing when the image's metadata was last updated.(R*tget_last_modified(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt last_modifiedscCsa|jj||_d}|jjjr@|jjj}n|jj||jj dS(N( RRuRQRCR*RRRSRTRUR(R RvRt((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__set_progresstrackers  cCs|jS(N(RQ(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR~sskThe current ProgressTracker object. This value should only be set when no other API calls are in progress.cCsi}x|jjjjD]}\}}tj|||tj \}}}||kr|j d|nnXdS(sVerify validity of certificates. Any apx.ExpiringCertificate exceptions are caught here, a message is displayed, and execution continues. All other exceptions will be passed to the calling context. The caller can also set log_op_end to a list of exceptions that should result in a call to self.log_operation_end() before the exception is passed on. terrorN( RCRtExpiringCertificatetAssertionErrorR*tcheck_cert_validitytloggertwarningR>texc_infotlog_operation_end(R t log_op_endtetexc_typet exc_valuet exc_traceback((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt __cert_verifyDs   cCsb|jy |jjdtd|jWn1tjk r]tjt d|jj nXdS(s|Refresh publisher metadata; this should only be used by functions in this module for implicit refresh cases.t immediateR8soSkipping publisher metadata refresh;image rooted at %s must have its format updated before a refresh can occur.N( t_ImageInterface__cert_verifyR*trefresh_publishersRRQRtImageFormatUpdateNeededRRRPR(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__refresh_publishers_s cCs1|jjd|j}|s-tjndS(s/Private helper method to aqcuire activity lock.tblockingN(RRuReRtImageLockedError(R trc((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRws  c Cs |jyE|j|jdk r;tj|jn|jjd|Wn!|j|j j nX|j j st |j |||_||_||_||_||_xW|j|jfD]C}|dk r|j||jjstj|qqqWdS(sStart planning an operation: Acquire locks. Log the start of the operation. Check be_name.tallow_unprivilegedN(RRRWRCRtPlanExistsExceptionR*tlockRRRt _is_ownedRtlog_operation_startRkR^RlR]R_RRtBENameGivenOnDeadBE( R t operationt noexecutet backup_betbackup_be_nametnew_beRt be_activatetval((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__plan_common_starts.            cCs|jjst|jj|jjy;ttjj dddkri|jj j j nWnt k r}nX|jjdS(sFinish planning an operation.R)iN(RRRR*R+R5R,R-R.R/R0R1R2R3R(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__plan_common_finishs  ! cCsK|jjs%t|_t|_dS|jdkrj|jjjtj dkpa|jj j |_n0|jtkr|jj j rt j n|j rG|jdkrG|jjjtj dk}t|_|rx9|jj jD]%\}}|r|rt|_PqqWn|rG|j rG|jj j|_qGndS(sFigure out whether or not we'd create a new or backup boot environment given inputs and plan. Toss cookies if we need a new be and can't have one.Ns always-newtdefaults create-backup(sdefaults create-backup(R*RRRkRlRCRtget_policy_strtimgcfgt BE_POLICYt imageplant reboot_neededRtImageUpdateOnLiveImageExceptiont plan_descRtreboot_advised(R t allow_backuptsrctdest((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__set_be_creations.          cCs>y|jr|jjnWnnX|jjj|dS(sgIndicate that execution was unexpectedly aborted and log operation failure if possible.N(RQtflushR*thistorytabort(R tresult((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRs  cCsp|jzQ|s8|jj|d|jd|jn"|jj|d|jd|jWd|jjXtS(sAvoid/Unavoid one or more packages. It is an error to avoid an installed package, or unavoid one that would be installed.R8t check_cancelN( RR*t avoid_pkgsRQt_ImageInterface__check_cancelt unavoid_pkgsRRR(R t fmri_stringstunavoid((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRs    c cs,tjt}|jj}x]|jjD]L}|jj|}x1|jd|D]\}}||j|qYWq.Wxt |D]}xt ||dt j D]u\}} } i} | r| j | dssfacet.N(R*RtfacetstFACET_INSTALLEDRtkeysRt FACET_IMAGERRRt gen_facetstaddRRDtyield_matchingt _match_srcRt _src_values(R t facet_listtimplicittpatternsRtfimgtfpkgRR"RtfacettisettflisttnameRRvtmasked((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyREs2"     ccsL|jjj}||jkrB||jkrBt|j}n t}i}|jj}tj t}||j kr\x|jj D]} |jj | dt } x| jd|D]\} } | |kr y|| || scss$|]}|jdr|VqdS(svariant.debug.N(R@(RR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pys ssvariant.N(R*RtvariantstVARIANT_INSTALLEDtVARIANT_INSTALLED_POSSIBLERRRRRt VARIANT_IMAGERRRt gen_variantstKeyErrorRCtVARIANT_ALL_POSSIBLEtVARIANT_IMAGE_POSSIBLERRRDR(R t variant_listRRR tvimgtvpkgRtvpossR"RtvarianttvalsRtvlistR ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRsT4        %      c Cs| s| st|jz`|rO|jj|d|jd|jd|S|jj|d|jd|jd|d|SWd|jjXdS(s%Freeze/Unfreeze one or more packages.R8Rtdry_runtcommentN( RRR*t unfreeze_pkgsRQRt freeze_pkgsRR(R RRRtunfreeze((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR!s     cCs |jjS(srReturn list of tuples of (pkg fmri, reason package was frozen, timestamp when package was frozen).(R*tget_frozen_list(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR7scCstj\}}}|tjkr4|j|n|tjkrP|jnr|tjkr~|jdt |dt nD|tj t j gkr|jd|n|r|jd|n|tjkr|jjny;ttjjdddkr|jjjjnWntk r/nX|tjkr|jjj|j|j|j|j|j|jjj }n|j!|tjkr||_"n|j#j$|||dS(sBDeal with exceptions that can occur while planning an operation. Any exceptions generated here are passed onto the calling context. By default all exceptions will result in a call to self.log_operation_end() before they are passed onto the calling context.RRR)iN(%R>RRtPlanCreationExceptiont2_ImageInterface__set_history_PlanCreationExceptionRRtConflictingActionErrorsRtstrtRESULT_CONFLICTING_ACTIONStIpkgOutOfDateExceptiontfmrit IllegalFmriRR*R5R,R-R.R/R0R1R2R3Rtset_be_optionsRkR^RlR]R_tdescribet_ImageInterface__reset_unlockRYRR(R tlog_op_end_allRRRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__plan_common_exception=s>  !     c Cs|j|jddgdt}g|D] }|^q(}|r|d\}}}}}|jj|}|jdd} | dkrtSn|j|jdddd d g}td |D} d | ksd | krd| ksd | krtStS(s}Returns True if the current image is a solaris image, or an image which contains the pkg(5) packaging system.Rs release/namet return_fmrisispkg.release.osnametsunoss /package/pkgtSUNWipkgs/system/core-ostSUNWcscss|]}|ddVqdS(iiN((RR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pys sssystem/core-oss package/pkgN( t_ImageInterface__get_pkg_listtLIST_INSTALLEDRR*RR/RCRR( R tresultsRtpfmritsummaryt categorieststatestattrsRtosnamet installed((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt solaris_imagexs"   cCs|jsdS|jj}zayE|jj|jj|jj|j|dtd|jrfdSWnt j k r~dSXWd|jj|Xt j dS(sRaises an IpkgOutOfDateException if the current image contains the pkg(5) packaging system and a newer version of the pkg(5) packaging system is installable.Ntrefresh_allowedR8( R;RQt get_purposet set_purposetPURPOSE_PKG_UPDATE_CHKR*tipkg_is_up_to_dateRRRtImageNotFoundExceptionR%(R RR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__ipkg_require_latests        cCsittfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd 6ttfd 6ttfd 6ttfd 6ttfd 6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6ttfd6}d|krxx+|djD]\}}|||n|d kr|j<j?|n|j@jA|j<V|j@jBx@|jjjCd |d | d |d |d|j D] }|VqWtD|_EWn<|t-t#t(tgkr#|jFdtDq1|jFnX|jG }| sK|r^|jHdtIn||jj1_J|jKtLdr|j<jM|j<dtD}tNjO}tPjQ||ddtRjS|}|jT||jM|dtD}~~tUjVjWd||||~~ndS(sContructs a plan to change the package or linked image state of an image. We can raise PermissionsException, PlanCreationException, InventoryException, or LinkedImageException. Arguments prefixed with '_' are primarily used within this function. All other arguments must be specified via keyword assignment and will be passed directly on to the image interfaces being invoked." '_op' is the API operation we will perform. '_ad_kwargs' is only used dyring attach or detach and it is a dictionary of arguments that will be passed to the linked image attach/detach interfaces. '_ipkg_require_latest' enables a check to verify that the latest installable version of the pkg(5) packaging system is installed before we proceed with the requested operation. For all other '_' prefixed parameters, please refer to the 'gen_plan_*' functions which invoke this function for an explanation of their usage and effects. This function first yields the plan description for the global zone, then either a series of dictionaries representing the parsable output from operating on the child images or a series of None values.topR8RRs%s & %s != set()t li_ignoreRzsUnknown api op: %sit api_kwargst erecurse_listtrefresh_catalogst update_indexR+Rtplandesc_validatetreset_volatilestencodingsutf-8RN(Xt api_op_valuesRRCt API_OP_ATTACHt API_OP_DETACHt API_OP_SYNCt_ImageInterface__verify_argstlocalsRtAPI_OP_SET_MEDIATORt API_OP_FIXtAPI_OP_DEHYDRATEtAPI_OP_REHYDRATERQRRR#Rt"_ImageInterface__plan_common_startR*RRt attach_parentt detach_parenttsyncmd_from_parenttapi_recurse_initt _ImageInterface__linked_pubcheckt#_ImageInterface__refresh_publisherst$_ImageInterface__ipkg_require_latestR|tmake_noop_plantmake_sync_plantAPI_OP_CHANGE_FACETtAPI_OP_CHANGE_VARIANTtmake_change_varcets_plantmake_dehydrate_plantAPI_OP_INSTALLtAPI_OP_EXACT_INSTALLtmake_install_plant make_fix_plantmake_rehydrate_plant API_OP_REVERTtmake_revert_plantmake_set_mediators_plantAPI_OP_UNINSTALLtmake_uninstall_plant API_OP_UPDATEtmake_update_planRHRXRt nothingtodoRt _ImageInterface__set_be_creationR(RkR^RlR]R_R)RYt plan_typeRWtset_actuator_timeoutRRRutapi_recurse_planRRZt&_ImageInterface__plan_common_exceptiontplanned_nothingtodoRtRESULT_NOTHING_TO_DOR|t#_ImageInterface__plan_common_finishRtgetstatettempfilet TemporaryFiletjsonR2tplandescRt_loadRbRDt json_diff(R t_opRCt _ad_kwargsRFRGRDRERIRKRJRLRMRNRORPRQRRRSRXt args_commontp_dictt stuff_to_dotpd_json1tfobjtpd_newtpd_json2((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt __plan_op0s%         "                                           cCs|jdk r$tj|jn|jj||_|j|_t|_ ||_ |j |_ |j |_|j|_|jdk r|j|j|jjstj|jqn|jj|jj}xB|jD]7}|jr|j|jstd|jqqWtj|j|j|jd|jd||j_|rk|jjjn|j |jdS(s,Load a previously generated PlanDescription.s,fmri part of plan, but currently unknown: %sRtpdN(!RWRCRRR*RRYRRRZR[RRlt activate_beR]RR_RRRt get_catalogtIMG_CATALOG_KNOWNt pkg_planstdestination_fmrit get_entryRRt ImagePlanRRQRtskip_preexecuteR(R tplantpreparedtpkg_cattpp((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt load_plans4         cCs@|ttgkrdS|jjj|jjj|jdS(s\Private interface to perform publisher check on this image and its children.N(RRR*RRtpubchecktapi_recurse_pubcheckRQ(R tapi_op((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__linked_pubcheck9scCs1|jjdt|jjj|jdS(sIf we're a child image, verify that the parent image's publisher configuration is a subset of the child image's publisher configuration. If we have any children, recurse into them and perform a publisher check.RN(R*RRRRRR(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytlinked_publisher_checkHs cCsn|jjstS|jjjs&tS|jjjs<tS|sj|jsQt|jjjsjtSntS(sOnce an operation has been planned check if there is something todo. Callers should pass all arguments by name assignment and not by positional order. 'li_ignore_all' indicates if we should only report on work todo in the parent image. (i.e., if an operation was planned and that operation only involves changes to children, and li_ignore_all is true, then we'll report that there's nothing todo.( R*RRRRRRRZRtrecurse_nothingtodo(R t li_ignore_all((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRZs c Cs[xM|jd|d|d|d|d|d|d|d|d | D] } qCqCW|j S( s#DEPRECATED. use gen_plan_update().RVR{RWRR|RRRzR(tgen_plan_updateR( R tpkg_listR{RWRR|RRRzRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt plan_updatets   c CsgxM|jd|d|d|d|d|d|d|d|d | D] } qCqCW|j |jfS( s#DEPRECATED. use gen_plan_update().R{RWRtforceR|RRRzR(RRR;( R R{RWRRR|RRRzRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytplan_update_alls   c&Cs|s |rt}nt}t}|j|d|d|d|d|d|d|d| d| d | d | d | d |d |d|d|d|d|d|S(s?This is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. If pkgs_update is not set, constructs a plan to update all packages on the system to the latest known versions. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. If 'pkgs_update' is set, constructs a plan to update the packages provided in pkgs_update. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). 'force' indicates whether update should skip the package system up to date check. 'ignore_missing' indicates whether update should ignore packages which are not installed. 'pubcheck' indicates that we should skip the child image publisher check before creating a plan for this image. only pkg.1 should use this parameter, other callers should never specify it. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RCRFRGRDRERIRKRMRJRNRORPRQRRRStignore_missingRVRW(RRRt_ImageInterface__plan_op(R RVt act_timeoutRRRRRRRxtli_parent_synct li_erecurseRRRR{RWRzR|tipkg_require_latestRw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRs(           c Cs[xM|jd|d|d|d|d|d|d|d|d | D] } qCqCW|j S( s$DEPRECATED. use gen_plan_install().RTR{RR|RRWRRzR(tgen_plan_installR( R RR{RR|RRWRRzRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt plan_installs   c"Cs|rt|tkstt}|j|d|d|d|d|d|d|d|d| d | d | d | d | d |d|d|d|S(s7This is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Constructs a plan to install the packages provided in pkgs_inst. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'act_timeout' sets the timeout for synchronous actuators in seconds, -1 is no timeout, 0 is for using asynchronous actuators. 'backup_be' indicates whether a backup boot environment should be created before the operation is executed. If True, a backup boot environment will be created. If False, a backup boot environment will not be created. If None and a new boot environment is not created, and packages are being updated or are being installed and tagged with reboot-needed, a backup boot environment will be created. 'backup_be_name' is a string to use as the name of any backup boot environment created during the operation. 'be_activate' is an optional boolean indicating whether any new boot environment created for the operation should be set as the active one on next boot if the operation is successful. 'be_name' is a string to use as the name of any new boot environment created during the operation. 'li_erecurse' is either None or a list. If it's None (the default), the planning operation will not explicitly recurse into linked children to perform the requested operation. If this is a list of linked image children names, the requested operation will be performed in each of the specified children. 'li_ignore' is either None or a list. If it's None (the default), the planning operation will attempt to keep all linked children in sync. If it's an empty list the planning operation will ignore all children. If this is a list of linked image children names, those children will be ignored during the planning operation. If a child is ignored during the planning phase it will also be skipped during the preparation and execution phases. 'li_parent_sync' if the current image is a child image, this flag controls whether the linked image parent metadata will be automatically refreshed. 'new_be' indicates whether a new boot environment should be created during the operation. If True, a new boot environment will be created. If False, and a new boot environment is needed, an ImageUpdateOnLiveImageException will be raised. If None, a new boot environment will be created only if needed. 'noexecute' determines whether the resulting plan can be executed and whether history will be recorded after planning is finished. 'pkgs_inst' is a list of packages to install. 'refresh_catalogs' controls whether the catalogs will automatically be refreshed. 'reject_list' is a list of patterns not to be permitted in solution; installed packages matching these patterns are removed. 'repos' is a list of URI strings or RepositoryURI objects that represent the locations of additional sources of package data to use during the planned operation. All API functions called while a plan is still active will use this package data. 'update_index' determines whether client search indexes will be updated after operation completion during plan execution.RCRFRGRDRERJRKRMRNRORPRQRRRSRTRW(R^tlistRRR(R RTRRRRRRRxRRRRR{RWRzR|Rw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRsY       cCs|rt|tkstt}|j|d|d|d|d|d|d|d|d| d | d | d | d |d |  S(s[This is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Constructs a plan to install exactly the packages provided in pkgs_inst. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'pkgs_inst' is a list of packages to install exactly. For all other parameters, refer to 'gen_plan_install' for an explanation of their usage and effects.RFRGRDRERKRMRNRORQRRRSRTRW(R^RRRR(R RTRRRRRxRRRR{RWRzR|Rw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytgen_plan_exact_install:s       c Cs|js$tjd|jnt}|j|d|d|d|d|d|d|d|d | d | d | d | d |d|d|d| S(sThis is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Constructs a plan to sync the current image with its linked image constraints. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'li_md_only' don't actually modify any packages in the current images, only sync the linked image metadata from the parent image. If this options is True, 'li_parent_sync' must also be True. 'li_pkg_updates' when planning a sync operation, allow updates to packages other than the constraints package. If this option is False, planning a sync will fail if any packages (other than the constraints package) need updating to bring the image in sync with its parent. For all other parameters, refer to 'gen_plan_install' and 'gen_plan_update' for an explanation of their usage and effects.tself_not_childRFRGRDRERKRLRMRNRORPRQRRRStli_pkg_updatesRW(RSRtLinkedImageExceptionRKRR(R RRRRRxt li_md_onlyRRRRRR{RWRzR|Rw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt gen_plan_sync^s"        cCs| dkrt} nt}i|d6|d6|d6|d6| d6}|j|d|d|d|d |d | d | d | d |d|d|d|d|d| d|S(s+This is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Attach a parent image and sync the packages in the current image with the new parent. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'lin' a LinkedImageName object that is a name for the current image. 'li_path' a path to the parent image. 'allow_relink' allows re-linking of an image that is already a linked image child. If this option is True we'll overwrite all existing linked image metadata. 'li_props' optional linked image properties to apply to the child image. For all other parameters, refer to the 'gen_plan_install' and 'gen_plan_sync' functions for an explanation of their usage and effects.t allow_relinkRRtR?tpropsRFRGRDRERKRLRNRORQRRRSRRRWN(RCR\RR(R Rttli_pathRRRRRRRxRRtli_propsRRR{RWRzR|Rwt ad_kwargs((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytgen_plan_attachs""          c Csht} i|d6} |j| d| d|d|d|d|d|d|d | d | d td td | S(sMThis is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Detach from a parent image and remove any constraints package from this image. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. For all other parameters, refer to the 'gen_plan_install' and 'gen_plan_sync' functions for an explanation of their usage and effects.RRRFRGRDRERKRLRNRORQRSR(RRR( R RRRRRRxRRRRRwR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytgen_plan_detachs      c CsIx;|jd|d|d|d|d|d|D] }q1q1W|j S(s&DEPRECATED. use gen_plan_uninstall().RURR|RRR(tgen_plan_uninstallR(R RRR|RRRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytplan_uninstalls  c Cs|rt|tkstt}|j|d|d|d|d|d|d| d|d| d | d | d | d td |d|d|S(sThis is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Constructs a plan to remove the packages provided in pkgs_to_uninstall. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'ignore_missing' indicates whether uninstall should ignore packages which are not installed. 'pkgs_to_uninstall' is a list of packages to uninstall. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RCRFRGRDRERJRKRMRNRORPRQRSRRU(R^RRRRR(R RURRRRRRRxRRRRRR|Rw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRs      c Cs[|s t|jtd|d|d|d|d|d|d|d|d | d td |  S( s5This is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Creates a plan to change the version and implementation values for mediators as specified in the provided dictionary. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'mediators' is a dict of dicts of the mediators to set version and implementation for. If the dict for a given mediator-name is empty, it will be intepreted as a request to revert the specified mediator to the default, "optimal" mediation. It should be of the form: { mediator-name: { "implementation": mediator-implementation-string, "version": mediator-version-string } } 'implementation' is an optional string that specifies the implementation of the mediator for use in addition to or instead of 'version'. 'version' is an optional string that specifies the version (expressed as a dot-separated sequence of non-negative integers) of the mediator for use. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RFRGRDRERKRMRRNRORQRS(RRRR( R RRRRRRxRRRR|((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytgen_plan_set_mediatorss)     c CsOxA|jd|d|d|d|d|d|d|D] }q7q7W|j S(s+DEPRECATED. use gen_plan_change_varcets().R RRRRRzR(tgen_plan_change_varcetsR( R R RRRRRzRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytplan_change_varcetsIs   c$Cs| r|dkrtdn|r.t}nt}|j|d|d|d|d|d|d|d| d | d | d | d | d |d|d|d|d|d|S(sThis is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Creates a plan to change the specified variants and/or facets for the image. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. Callers should pass all arguments by name assignment and not by positional order. 'facets' is a dict of the facets to change the values of. 'variants' is a dict of the variants to change the values of. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.s Nothing to doRCRFRGRDRERJRKRMRNRORPRQRRRSRR RWN(RCR3RRR(R RR RRRRRRRxRRRRR{RWRzR|Rw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRTs         c CsIx;|jd|d|d|d|d|d|D] }q1q1W|j S(s#DEPRECATED. use gen_plan_revert().RittaggedRRRR(tgen_plan_revertR(R RiRRRRRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt plan_reverts  c CsUt} |j| d|d|d|d|dgd|d|dtd td |d | S( s0This is a generator function that yields a PlanDescription object. If parsable_version is set, it also yields dictionaries containing plan information for child images. Plan to revert either files or all files tagged with specified values. Args contains either path names or tag names to be reverted, tagged is True if args contains tags. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RDRFRGRERKRNRORQRSRiR(RRR( R RiRRRRRRRRw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRs   c Cs+t}|j|d|dtdtd|S(sqThis is a generator function that yields a PlanDescription object. Plan to remove non-editable files and hardlinks from an image. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. 'publishers' is a list of publishers to dehydrate. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RORQRSt publishers(RRR(R RRRw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytgen_plan_dehydrates c Cs+t}|j|d|dtdtd|S(sThis is a generator function that yields a PlanDescription object. Plan to reinstall non-editable files and hardlinks to a dehydrated image. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. 'publishers' is a list of publishers to dehydrate on. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RORQRSR(RRR(R RRRw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytgen_plan_rehydrates c CsIt}|j|d|d|d|d|d|d|d|dtd t S( sThis is a generator function that yields a PlanDescription object. Plan to repair anything that fails to verify. Once an operation has been planned, it may be executed by first calling prepare(), and then execute_plan(). After execution of a plan, or to abandon a plan, reset() should be called. 'show_licenses' indicates whether we should display all licenses. 'accept' indicates whether we agree to and accept the terms of the licenses. For all other parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects.RiRDRFRGRERNRORQRS(RRR( R RiRRRRRRRw((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt gen_plan_fixs  cCs^|jjj|||d|d|d|d|d|d| d|jd| d | d | d |  S( sAttach an image as a child to the current image (the current image will become a parent image. This operation results in attempting to sync the child image with the parent image. 'lin' is the name of the child image 'li_path' is the path to the child image 'li_props' optional linked image properties to apply to the child image. 'allow_relink' indicates whether we should allow linking of a child image that is already linked (the child may already be a child or a parent image). 'force' indicates whether we should allow linking of a child image even if the specified linked image type doesn't support attaching of children. 'li_md_only' indicates whether we should only update linked image metadata and not actually try to sync the child image. 'li_pkg_updates' indicates whether we should disallow pkg updates during the child image sync. 'noexecute' indicates if we should actually make any changes rather or just simulate the operation. 'refresh_catalogs' controls whether the catalogs will automatically be refreshed. 'reject_list' is a list of patterns not to be permitted in solution; installed packages matching these patterns are removed. 'update_index' determines whether client search indexes will be updated in the child after the sync operation completes. This function returns a tuple of the format (rv, err) where rv is a pkg.client.pkgdefs return value and if an error was encountered err is an exception object which describes the error.tacceptRRRRRR8R{RWt show_licensesR|(R*RRt attach_childRQ(R RtRRRRRRRRR{RWRR|((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytattach_linked_childs1   c Cs+|jjj|d|d|d|d|S(sDetach one or more children from the current image. This operation results in the removal of any constraint package from the child images. 'li_list' a list of linked image name objects which specified which children to operate on. If the list is empty then we operate on all children. For all other parameters, refer to the 'attach_linked_child' function for an explanation of their usage and effects. This function returns a dictionary where the keys are linked image name objects and the values are the result of the specified operation on the associated child image. The result is a tuple of the format (rv, err) where rv is a pkg.client.pkgdefs return value and if an error was encountered err is an exception object which describes the error.RRRR(R*RRtdetach_children(R tli_listRRRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytdetach_linked_children s cCs|jjj|S(sConvenience function that takes a dictionary returned from an operations on multiple children and merges the results into a single return code.(R*RRtdetach_rvdict2rv(R trvdict((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytdetach_linked_rvdict2rv7 sc CsL|jjj|d|d|d|d|d|jd|d|d|} | S( skSync one or more children of the current image. For all other parameters, refer to the 'attach_linked_child' and 'detach_linked_children' functions for an explanation of their usage and effects. For a description of the return value, refer to the 'detach_linked_children' function.RRRRR8R{RR|(R*RRt sync_childrenRQ( R RRRRRR{RR|R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytsync_linked_children> s    cCs|jjj|S(sConvenience function that takes a dictionary returned from an operations on multiple children and merges the results into a single return code.(R*RRtsync_rvdict2rv(R R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytsync_linked_rvdict2rvS scCs|jjj|}|S(swAudit one or more children of the current image to see if they are in sync with this image. For all parameters, refer to the 'detach_linked_children' functions for an explanation of their usage and effects. For a description of the return value, refer to the 'detach_linked_children' function.(R*RRtaudit_children(R RR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytaudit_linked_childrenZ s cCs|jjj|S(sConvenience function that takes a dictionary returned from an operations on multiple children and merges the results into a single return code.(R*RRtaudit_rvdict2rv(R R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytaudit_linked_rvdict2rvg scCsh|jjj}i}|rN|jjjdt||<||dk rN|Sn|jjj||<|S(sIf the current image is a child image, this function audits the current image to see if it's in sync with it's parent. For a description of the return value, refer to the 'detach_linked_children' function.tcatch_exceptionN(R*RRRTRRRCt audit_self(R RRtR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt audit_linkedn s cCs|jjjS(s5Indicates whether the current image is a child image.(R*RRRS(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRS scCs|jjj|S(s6Indicates whether the current image is a parent image.(R*RRtisparent(R Rx((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR scCs|dkr|SyMtjj|d}tj|j}tjj|}|jdSWn"tk r}tj |nXdS(sIGiven a local time value string, formatted with "%Y-%m-%dT%H:%M:%S, return a UTC representation of that value, formatted with %Y%m%dT%H%M%SZ. This raises a ValueError if the time was incorrectly formatted. If the time_str is "now", it returns the value of utc_nowtnows%Y-%m-%dT%H:%M:%Ss%Y%m%dT%H%M%SZN( tdatetimetstrptimettimetmktimet timetupletutcfromtimestamptstrftimeR3RtHistoryRequestException(ttime_strtutc_nowtlocal_dttsecstutc_dtR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt __utc_format s   cCs!g}t|dks'|jdr|jdrU|}|j|d|}n,|j|d |}|j|d|}||krtjtd|n|j||}n=|j||}tjtj j |j j j d|}|stjtd|n|S(s:Given a local timestamp, either as a discrete value, or a range of values, formatted as '-', and a path to find history xml files, return an array of paths that match that timestamp. utc_now is the current time expressed in UTCisnow-iis-Start time must be older than finish time: %ss%s*sNo history entries found for %s( tlenR@t_ImageInterface__utc_formatRRRPt"_ImageInterface__get_history_rangetglobR-R?tjoinR*R(R ttime_valRtfileststarttfinishtprefix((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__get_history_paths s*!         cCs{g}ttj|jjj}xP|D]H}tjj|d }||kr+||krcPn|j|q+q+W|S(s>Given a start and finish date, formatted as UTC date strings as per __utc_format(), return a list of history filenames that fall within that date range. A range of two equal dates is the equivalent of just retrieving history for that single date string.i(RR-tlistdirR*RR?tbasenameR`(R R&R'tentriest all_entriestentryR+((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__get_history_range s   c cst}tjjjd}xS|D]K}t|dksO|jdr|jdr}|}|j|d|}n,|j|d |}|j|d|}||krtjt d|n|j ||}n=|j||} t j t j j|jjj d| }y#|j||}|j|Wq(tk rrtjt d|q(Xq(W|syt j|jjj }Wqtk r} | jtjkrd Stj| qXnt|}|r|d 9}||}nytjj} Wntjk r1} i} nXxc|D][} y*tjd |jjjd | d | VWq9tj k r} | j!rq9nq9Xq9Wd S(ssA generator function that returns History objects up to the limit specified matching the times specified. 'limit' is an optional integer value specifying the maximum number of entries to return. 'times' is a list of timestamp or timestamp range strings to restrict the returned entries to.s%Y%m%dT%H%M%SZisnow-iis-Start time must be older than finish time: %ss%s*spInvalid time format '%s'. Please use %%Y-%%m-%%dT%%H:%%M:%%S or %%Y-%%m-%%dT%%H:%%M:%%S-%%Y-%%m-%%dT%%H:%%M:%%SNitroot_dirtfilenamet uuid_be_dic("RRtutcnowRRR@R RRRPR!R"R-R?R#R*Rt"_ImageInterface__get_history_pathsRR3R*tEnvironmentErrorterrnotENOENTt_convert_errorRRRtget_uuid_be_dict ApiExceptiontHistoryR0tHistoryLoadExceptiont parse_failure( R tlimitttimesR,RR$R&R'R%R(RR2R.((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt gen_history sf  !                 cCs |jjjS(sIf the current image is a child image, this function returns a linked image name object which represents the name of the current image.(R*RRRT(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytget_linked_name' scCs|jjjd|S(s0Return a dictionary which represents the linked image properties associated with a linked image. 'lin' is the name of the child image. If lin is None then the current image is assumed to be a linked image and it's properties are returned.Rt(R*RRt child_props(R Rt((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytget_linked_props- scCs|jjjd|S(sReturns a list of linked images associated with the current image. This includes both child and parent images. For all parameters, refer to the 'gen_plan_install' function for an explanation of their usage and effects. The returned value is a list of tuples where each tuple contains (
  • , ,
  • ).Rx(R*RRt list_related(R Rx((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt list_linked7 s cCs|jjj||S(sGiven a string representing a linked image child name, returns linked image name object representing the same name. 'allow_unknown' indicates whether the name must represent actual children or simply be syntactically correct.(R*RRt parse_name(R tli_namet allow_unknown((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytparse_linked_nameC scCs#g|D]}|j||^qS(s;Given a list of strings representing linked image child names, returns a list of linked image name objects representing the same names. For all other parameters, refer to the 'parse_linked_name' function for an explanation of their usage and effects.(RI(R t li_name_listRHRG((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytparse_linked_name_listL s cCs|jS(sZReturns None if no plan is ready yet, otherwise returns a PlanDescription.(RY(R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR)Y scCsQ|jy|jjWn|jjnXzy|jjsVtjn|jsntjn|j rtj n|j y|jjj Wn.t jk r}tj|n nX|jt|_ Wntjk r0}|j|jjjr*|jd|nntk rq}|j|jjjrk|jd|nnK|j|jjjrtj\}}}|jd|nnXWd|jj|jjy;ttjjdddkr|jj j!j"nWnt#k r(nX|jjX|jj$j%|j&dS(sTakes care of things which must be done before the plan can be executed. This includes downloading the packages to disk and preparing the indexes to be updated during execution. Should only be called once a gen_plan_*() method has been called. If a plan is abandoned after calling this method, reset() should be called.RNR)i('RR*RRRRRtPlanMissingExceptionRZR[tAlreadyPreparedExceptionRt preexecutet search_errorst$ProblematicPermissionsIndexExceptionRRRRRtoperation_nameRRRR>RR+R5R,R-R.R/R0R1R2R3RRtapi_recurse_prepareRQ(R RRRR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytprepare_ s`              ! cCs'|jy|j|jjWn|jjnXz|jjs]tjn|j sutj n|j rtj nyt j|j|j}Wn#tk rt j|j}nX||j_ |jtkr0|jjjr0|jjr0tj}|jd||n|jtkry|jd|jWqtk r~}|jd|qtj\}}}|jd|qXn|jtkrgy|j|j|j WnTtk r}|jd|n/tj\}}}|jd|nX|jjrgtj!}|jd||qgnd}t#j$t#j%y\y|jjj&Wntj'k r}|}nX|jj(j)s|jj(j*nWntk r'}|jtkr|j+n |j,|jd|nt-j.k ra}tj.|}|jd||nUt-j/k r}tj/|}|jd||nt-j0k r}tj1|}|jd||nt2k r}|j,tj3|}|jd||ntk ra}|jtkrA|j+n |j,|jd|nUtj\}}}|jtkr|j+n |j,|jd|nX|jj(j4|j|j5||r|nWd|jj6|jj7r|jj8n|jjXdS(sExecutes the plan. This is uncancelable once it begins. Should only be called after the prepare method has been called. After plan execution, reset() should be called.RRN(9RRR*RRRRRRLR[tPrematureExecutionExceptionR\tAlreadyExecutedExceptionRRRQRHt BootEnvNullRlRRRt RebootNeededOnLiveImageExceptionRRkRtcreate_backup_beR^RR>Rtinit_image_recoveryR_tUnableToCopyBERCR-tchdirRGtexecutetWrapIndexingExceptionRRRtsyncmdt restore_imagetrestore_install_uninstallROtIndexLockedExceptionRPtInconsistentIndexExceptiontCorruptedIndexExceptionRtActuatorExceptiontapi_recurse_executet#_ImageInterface__finished_executionR+R4R5(R tbeRRRRt raise_laterR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt execute_plan s                                  cCs|jjjtjkro|jtkr4|jn |jt j |jjj}|j d||n|jjj s|jr|j n|jtkr|jd|jn |j|jjd|j|jjjr |j d|jjjjnt|_dS(NRt set_activeR8t release_notes(R*RtstateRt EXECUTED_OKRlRR_R`RtImageplanStateExceptionRtboot_archive_neededtupdate_boot_archivetactivate_imageR]tactivate_install_uninstalltcleanup_cached_contentRQRRQRtrelease_notes_nameR\(R RgR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__finished_executionE s(         cCs|jzy|jWn!tjk r>|jnX|jjsZtjnx@|jj D]2}|j |krg|j |d|d|PqgqgWWd|j j XdS(sSets the license status for the given package FMRI and license entry. 'accepted' is an optional parameter that can be one of three values: None leaves accepted status unchanged False sets accepted status to False True sets accepted status to True 'displayed' is an optional parameter that can be one of three values: None leaves displayed status unchanged False sets displayed status to False True sets displayed status to Truetacceptedt displayedN(RRRRRR*RRLRYRRtset_license_statusRR(R R4tplicenseRvRwR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytset_plan_license_statusd s      cCs|jzy`|j|jjz'|jd|d|d||jSWd|jj|jjXWn!tjk r|j nXWdy;t t j j dddkr|jjjjnWntk rnX|jjXdS(sRefreshes the metadata (e.g. catalog) for one or more publishers. 'full_refresh' is an optional boolean value indicating whether a full retrieval of publisher metadata (e.g. catalogs) or only an update to the existing metadata should be performed. When True, 'immediate' is also set to True. 'pubs' is a list of publisher prefixes or publisher objects to refresh. Passing an empty list or using the default value implies all publishers. 'immediate' is an optional boolean value indicating whether a refresh should occur now. If False, a publisher's selected repository will only be checked for updates if the update interval period recorded in the image configuration has been exceeded. Currently returns an image object, allowing existing code to work while the rest of the API is put into place.t full_refreshtpubsRNR)i(RRR*Rt_ImageInterface__refreshR5R+RRRR,R-R.R/R0R1R2R3RR(R R{R|R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytrefresh s(        ! c Cs,|jjd|d|d|d|jdS(sSPrivate refresh method; caller responsible for locking and cleanup.R{RR|R8N(R*RRQ(R R{R|R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt __refresh s c CsIg}x<|jdD]+}|jt||d|jd|qW|S(sRPrivate function. Returns the license info from the manifest mfst.tlicenseRtalt_pub(tgen_actions_by_typeR`RR*(R R4RRt license_lsttlic((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt __licenses s c Cs|rtj}n|jj}|rZ|j|\}}}}|rQ|}q|}n9|r{|jj|jj}n|jj|jj}t|j d|d|S(sfReturns an ordered list of tuples of the form (scheme, category) containing the names of all categories in use by the last version of each unique package in the catalog on a per-publisher basis. 'installed' is an optional boolean value indicating whether only the categories used by currently installed packages should be returned. If False, the categories used by the latest vesion of every known package will be returned instead. 'pubs' is an optional list of publisher prefixes to restrict the results to. 'repos' is a list of URI strings or RepositoryURI objects that represent the locations of package repositories to list packages for. RR|( RDtEmptyIR*RRyRtIMG_CATALOG_INSTALLEDRRR6( R R:R|RzRtignoredt known_cattinst_catR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytget_pkg_categories s     cs|jj|jj}t|jg}iiii}i|jjx|j|D]}|\\}} } } } | | |dk r|ks|krtSj|d}qjWtS(N(RRR/RC(ttR.tpubtstemtvertiverttgt(tinc_verst inst_stemstren_inst_stemst ren_stems(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt check_stemB s        tcbtlastcst|d|dS(Ni(R(Rtb(t pub_ranks(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt pub_order sRR|N(R*RRt frozensett DEPENDENCYtget_publisher_rankst entry_actionsRRR R8RRR&tPkgFmriRR/tpkg_nameRCRtInvalidPackageErrorst setdefaultRRtnames(R tbreleaseR|Rtimg_cattcat_infot inc_stemsRRRRR.tactionstpkgrttargetsRRttvertoverR"RRR((RRRRRs4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__map_installed_newest s            #     cCsFg}x3|D]+}t|tr4tj|}n|}d}y"|jjj|d|j}Wn,t j k rt j dt |nX|st j dt |nxv|D]n}|j }|stjd|g|_ q|js|j|q||jkr|jjd|qqW|j|q Wt|S(sPrivate helper function to retrieve publisher information from list of temporary repositories. Caller is responsible for locking.tccanceltlocationtoriginsiN(RIRJReRfRCR*R0tget_publisherdataRRtUnsupportedRepositoryOperationtRepoPubConfigUnavailableR#t repositoryt RepositoryRt add_origintinserttextendR(R Rztret_pubstrepo_uritrepoR|Rtpsrepo((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__get_temp_repo_pubs s4        c; CsI t|}djttt|}y|j|SWntk rLnX|jj|jj }|j ddt }t j j }|j|}|j}tj}i} i} zh |jt|dtg} g} x|D] } tjj|tt| }tj||| _|jj| _| j}|| t|<|j| zjy| jWnUtj k r}| j!| |fPn,tj"k r}| j!| |fwnXWd|j#| X| j!| j$|| j%fqW|j&| r?t| t| }tj'| |t| }|ni}xdd|fg| D]\}}}|r|j)dt d|g}n|j)dt }xZ|D]R}|j*|j+d\}}|j,|kr|j,t|j,f||j+j?|/}0Wnt1j>j@k rqsnX|0jAdjBdkrqsn|0jAddkr$|j!t.jCqs|0jAddkrs|0jD|"d| sRqsn|j!t.jEqsqsWn||-d <|&j5d|d|d| d|d||,rw|'j5d|d|d| d|d|qwqwWqWi}1xj|D]b} y|1| j$}2Wqtk rE tFjG}3tFjH| j$d| d|3}2|2|1| j$7 s s catalog.base.scatalog.dependency.Ctop_timeRRRiRRs pkg.obsoletes pkg.renamedRvttrueR RetcatalogRt ignore_errors(NN(NN(WRR#RtmapR#RmRR*RRRRRR3t#_ImageInterface__get_temp_repo_pubsRQRtmkdtempt refresh_startRRR-R?tidRDRt meta_rootR0Rtrefresh_start_pubR~RtPermissionsExceptionR`R:trefresh_end_pubR(Rt refresh_donetCatalogRefreshExceptionRCRoR/RRt tuple_entriestpkgdefstPKG_STATE_INSTALLEDRRbtCatalogRR@RR\RRtPKG_STATE_KNOWNtPKG_STATE_ALT_SOURCEt PKG_STATE_V0t PKG_STATE_V1tPKG_STATE_UPGRADABLERtfromstrt ActionErrorR8tlowertPKG_STATE_OBSOLETEt include_thistPKG_STATE_RENAMEDReRt PublisherttupleRRRRt has_originRRtfinalizet read_onlytvaluestshutiltrmtreeR+(;R Rzteidt img_inst_catt img_inst_baseRR|R8ttmpdirt pkg_repost pkg_pub_maptfailedtpub_catsRRRRttotaltnewestRRRR"tnvertsnverRRR.R7RRtcompicattcompkcattspartsRt proc_stemsR tsparttnkparttniparttbasetcat_vertdptsentryR:tmdatatdpentRtacttpub_maptopubtnrepotrid_maptridsRtridtnpubtotcompcat((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__get_alt_pkg_data s        !          $       "                                   #   "      "c CsC|j|d|d|d|d|d|d|d|d| d |  S( sA generator function that produces tuples of the form: ( ( pub, - (string) the publisher of the package stem, - (string) the name of the package version - (string) the version of the package ), summary, - (string) the package summary categories, - (list) string tuples of (scheme, category) states, - (list) PackageInfo states attributes - (dict) package attributes ) Results are always sorted by stem, publisher, and then in descending version order. 'pkg_list' is one of the following constant values indicating what base set of package data should be used for results: LIST_ALL All known packages. LIST_INSTALLED Installed packages. LIST_INSTALLED_NEWEST Installed packages and the newest versions of packages not installed. Renamed packages that are listed in an installed incorporation will be excluded unless they are installed. LIST_NEWEST The newest versions of all known packages that match the provided patterns and other criteria. LIST_UPGRADABLE Packages that are installed and upgradable. 'cats' is an optional list of package category tuples of the form (scheme, cat) to restrict the results to. If a package is assigned to any of the given categories, it will be returned. A value of [] will return packages not assigned to any package category. A value of None indicates that no package category filtering should be applied. 'collect_attrs' is an optional boolean that indicates whether all package attributes should be collected and returned in the fifth element of the return tuple. If False, that element will be an empty dictionary. 'patterns' is an optional list of FMRI wildcard strings to filter results by. 'pubs' is an optional list of publisher prefixes to restrict the results to. 'raise_unmatched' is an optional boolean value that indicates whether an InventoryException should be raised if any patterns (after applying all other filtering and returning all results) didn't match any packages. 'ranked' is an optional boolean value that indicates whether only the matching package versions from the highest-ranked publisher should be returned. This option is ignored for patterns that explicitly specify the publisher to match. 'repos' is a list of URI strings or RepositoryURI objects that represent the locations of package repositories to list packages for. 'return_fmris' is an optional boolean value that indicates that an FMRI object should be returned in place of the (pub, stem, ver) tuple that is normally returned. 'variants' is an optional boolean value that indicates that packages that are for arch or zone variants not applicable to this image should be returned. Please note that this function may invoke network operations to retrieve the requested package information.tcatst collect_attrsRR|traise_unmatchedtrankedRzR-R (R1( R RRRRR|RRRzR-R ((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt get_pkg_listsXcM #s t}}} ||jkr*t}nH||jkrBt}n0||jkrZt}n||jkrrt n|jjdg}i}t}t}t}t}x|j |D]\}}}}|r|j |qnt |}||krqn|j ||j |d|kr7t}nt |jdd&r\|j |n|j|f||| r]| r]|)j(|.|-|-kr]t}1n|2cd7<|rt}%n|1sd&}3x|D]}||\\}4}5}6}|4d&k r|-|4kr|1d&krt}1qqn@| r$|4 r$|)j(|.|-|-kr$|1d&krt}1qqn||j)kr]|5|.kr|1d&krt}1qqqn||j*krd|.j+d|5s|1d&krt}1qqqn?||j,krt-j.|.|5s|1d&krt}1qqqn|6d&k rL|3d&krt/jj0|/}3n|3j1|6t/jj2sL|1d&kr=t}1nt}0qqLn||kr|2dkr|1d&kr}t}1nt}0qnt}1|sPn|%j |qWn|1r|!d&k s|r|r|0r|2dkr|2=j3|.qqng}7t}8t}9d&}:t};t}<|+d}=|=d}>t4j5|>k}?d}@tj|@}Ayx |,D]j6dkrjddkr|;j jdqjnj6dkrqjnjd}Bjd}C|r3j7d}Dtfdt%jj8D}E|A|B|Ej9|Dn|BdkrK|C}:qjn|Bdkr|:d&krj|C}:|o|Ad|Ej9|Dqjqjn|Bdkr|7j9j:n|?rqjn|Bd kr|.krjt}8qjqjn| sj|Bj;d! rqjnt<|Ct=k}Fx[|#j>D]M\}G}H|G|Bkr |FrG |H|CksZ |F r |H|Ckr t}1t}<Pq q WqjWWn6tj?k r t|>}>|>j t@jAt}9nX|? r& |8r& |.kr& x^|;D]S}I|I}JxD|Jd&k r |J|ks |Jkr t}1Pnj(|Jd&}Jq Wq Wn|1rq |!d&k s> |r|<r|2dkr|2=j3|.qqn|d&k r |s |7r qq q g|D]}K|K|7kr |K^q s qq n|9s t|>}>n|r |$jB|%n| r |)j$|.|-n| re tCjDd"d|.d#|-d$|/}| rN ||:|7|>|A|=fVq ||:|7|>|AfVq| r |*|:|7|>|A|=fVq|*|:|7|>|AfVqW|r t|jE|$}L|r |Lr tjd%|Lq nd&S('s2This is the implementation of get_pkg_list. The other function is a wrapper that uses locking. The separation was necessary because of API functions that already perform locking but need to use get_pkg_list(). This is a generator function.s Build-Releaset@t match_latestRYRc sg|dd}tj|k}tj|k}|\}}}rE|S|rOtS|kr_tSj|d}xB|dk r|krPn|krtSj|d}qtW|kr>|krtS|kr||krtStjj |} |} | j | tjj r:j |tStSdj ||f} | krctStS(NRR7t!(RRRRRR/RCRbRtVersiont is_successortCONSTRAINT_AUTORR#( RR.R7tpkgitpkguRRRRteverRtpkg_stem(RRRRtnlistRtslistt upgradable(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt check_statesD          iccs4t||}|dkr'|St||S(Ni(R(RRtres(R(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRCs RRRRtorderedR|Rit/RR7cSs tjtS(N(RRR(((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyR~sRR^RR&RR Rvc3s<|]2}|dkr|ttj|fVqdS(R RvN(snamesvalue(RRtattrlist(Rtk(R(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pys ss pkg.summaryt descriptionsinfo.classifications pkg.renamedsvariant.t build_releaseReRtnotfoundN(FRR2RtLIST_INSTALLED_NEWESTt LIST_NEWESTtLIST_UPGRADABLER*R8RR_R`R#RtgetattrRRCRRtInventoryExceptionRyt%_ImageInterface__map_installed_newestRDt EmptyDictRRRRRtSUMMARYRRR,Rt get_variantsRRRRRR#R/t MATCH_EXACTt MATCH_FMRIRFt MATCH_GLOBtfnmatcht fnmatchcaseRbRRRtdiscardRRR R+titerkeysRtparse_category_infoR@R^RRRRt UNSUPPORTEDRR&RR(MR RRRRRRR|RRRzR-treturn_metadataR R:t inst_newestRRmt pat_tuplest pat_versionedt latest_patstseent npatternsRpRR4RrtsfmriRRRRR't filter_cbRt img_variantst matched_patstpkg_matching_patstuse_lastRRt ranked_stemsRR.RRRRtomit_vert omit_packageR#R"tpat_pubtpat_stemtpat_vertpcatsRt unsupportedtsummRtomit_varRR7R tddmR8tatnametatvaluetatvlisttmodstis_listtvntvvRRtscR/(( RRRRRR$RRR%R&s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt__get_pkg_listrs                '       $H    #                                                                %        c3/Cs'|tj}|r%tj|n|jd|rD|j}n|jdtjg|j}d.}d.} d.} |r|j |\}} } } |r| } q| } nn|r|j j |j j } | r| jdkr|jdttjqn|j j |j j} |j j} ttjtjg}tjttjg}tj|k}g}i||j6tj|j6tj|j6}yx |j|d|d| d| d|d td |d td td t D]\}}}}}}d.}}}}|j \}}}d.} |rJ|||t!|} ntj"|kr|j#}|j$}|j%}|j&j'd}nd.}}}d.}!}"}#}$}%}&}'}(})tj(|krg|D]\}*}+t)|*|+^q}(n||@},d.}-t*}.|,ray+t+| |,d| d|\} })} }-Wqatj,k r]t}.qaXn|-d.krytj}-nd.}/|. rttj-tj.g|B|@ry|j j/|d| }/Wqtj,k rt}.qXn|/d.k rtj.|kr|j0||/d| }'ntj-|krB|/j1d| \}&}%n||@rtj2|krvt3|/j4d| }!ntj5|krt3|/j4d| }"ntj6|krt3|/j4d| }#ntj7|krt3|/j4d| }$qqntj-|krd}&}%nd.}0d.}1tj8|kr|.tkrktj9|krkt:|}|j;tj9nd|krt<j=|dj'd}1nd|krt<j=|dj'd}0qn tj}tj(|krd.}ntj>|kr |d.krd}qnd.}|j?td|d|d|(d|d|d|d|d |d!|d"|&d#|%d|d$|'d%|!d&|"d'|#d(|$d)|-d*|)d+|d,|1d-|0qWWnRtj@k r}2|2jAr|jdtBn|2jC||j<|2jA||j|r|jj$|j|n|r%|jj%|j|n|jj&d S( sPPrivate publisher update method; caller responsible for locking.R|c Sstg|jD]0}|j|j|jtt|jf^q }tg|jD]0}|j|j|jtt|jf^qS}|||j|fS(N( RRturitssl_certtssl_keyRRtproxiestsymmetric_difference(toldrtnewrRt old_originst new_origins((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pytorigins_changed s@@csl|jr tS|jr$|j r$tS|j}|j}|jt|krOtSt||ddkS(Nii(RRRRt_source_object_idRR(toldotnewoRR (R#(s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt need_refresh.s   icsP\}}x=jD]/\}}t||kr||jtjj|jj\}}|jjjd|d|dS(sDeletes all client history.RRN(RRRR*RRtpurge(R RR((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt purge_historyTscCsy|jzZy0|jt|j_|jjd|jSWn#tjk rb}|j nXWd|j j XdS(sAttempt to update the on-disk format of the image to the newest version. Returns a boolean indicating whether any action was taken.R8N( RRRR*tallow_ondisk_upgradet update_formatRQRRRRR(R R((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyRPYs      c Cs|s1g|jD]}|js|^q}n[g}xR|D]J}t|tjs{|j|jjd|d|q>|j|q>Wi}xb|D]Z}g}xA||D]5}t|tr|j|j q|j|qW|||RRhRRt pkg.catalogRtpkg.client.api_errorstclientt api_errorsRtpkg.client.bootenvRtpkg.client.historyRtpkg.client.imageRLtpkg.client.imageconfigt imageconfigRtpkg.client.imageplanRtpkg.client.imagetypest imagetypestimgtypestpkg.client.indexerRtpkg.client.pkgdefsRtpkg.client.plandescRtpkg.client.publisherRetpkg.client.query_parsert query_parserRtpkg.fmriR&t pkg.mediatorRRtpkg.miscRDt pkg.nrlockRbtpkg.p5iREtpkg.p5sR[t pkg.portableR]tpkg.search_errorsROt pkg.versiontpkg.api_commonRRRRt pkg.clientRtpkg.client.debugvaluesRtpkg.smfRRR=RR;tCURRENT_P5I_VERSIONtIMG_NONEt IMG_TYPE_NONEt IMG_ENTIREtIMG_TYPE_ENTIREt IMG_PARTIALtIMG_TYPE_PARTIALtIMG_USERt IMG_TYPE_USERtRESULT_CANCELEDRtRESULT_SUCCEEDEDRtRESULT_FAILED_CONFIGURATIONtRESULT_FAILED_CONSTRAINEDtRESULT_FAILED_LOCKEDtRESULT_FAILED_SEARCHtRESULT_FAILED_STORAGEtRESULT_FAILED_TRANSPORTtRESULT_FAILED_ACTUATORtRESULT_FAILED_OUTOFMEMORYR$RtRR R R(R6RRCR}R6RRRR(((s4/usr/lib/python2.7/vendor-packages/pkg/client/api.pyt$s                " !                    0> )