Ñò ìÿÒXc@s€ddkTddklZlZlZlZlZddklZl Z ddk l Z edƒZ de fd„ƒYZeieƒdefd „ƒYZeieƒd efd „ƒYZeieƒd efd „ƒYZeieƒdefd„ƒYZeieƒdefd„ƒYZeieƒdefd„ƒYZeieƒdefd„ƒYZeieƒdS(iÿÿÿÿ(t*(tapitIntt_tngettextterrors(tNETGROUP_PATTERNtNETGROUP_PATTERN_ERRMSG(tDNsÒ Groups of hosts. Manage groups of hosts. This is useful for applying access control to a number of hosts by using Host-based Access Control. EXAMPLES: Add a new host group: ipa hostgroup-add --desc="Baltimore hosts" baltimore Add another new host group: ipa hostgroup-add --desc="Maryland hosts" maryland Add members to the hostgroup: ipa hostgroup-add-member --hosts=box1,box2,box3 baltimore Add a hostgroup as a member of another hostgroup: ipa hostgroup-add-member --hostgroups=baltimore maryland Remove a host from the hostgroup: ipa hostgroup-remove-member --hosts=box2 baltimore Display a host group: ipa hostgroup-show baltimore Delete a hostgroup: ipa hostgroup-del baltimore t hostgroupcBs/eZdZeiiZedƒZedƒZ ddgZ ddddd d gZ d Z hd d gd6d dddgd6d d gd 6d ddgd 6Z edƒZedƒZeddededddedƒdedƒdedd„ƒeddddedƒded ƒƒfZd!„ZRS("s Hostgroup object. s host groups host groupst ipaobjectt ipahostgrouptcnt descriptiontmembertmemberoftmemberindirecttmemberofindirectt ipauniqueidthostR tnetgroupthbacruletsudorules Host Groupss Host Grouptpatterntpattern_errmsgtcli_namethostgroup_nametlabels Host-grouptdocsName of host-groupt primary_keyt normalizercCs |iƒS((tlower(tvalue((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pytVstdesct Descriptions A description of this host-groupc CsÇt|ƒ}x´t|idgƒƒD]š}t|ƒ}|d|djoq%n|ihdd6ƒ}y,|id|d|d|idd gƒWntij oq%X|di|ƒq%Wd S( sh We don't want to show managed netgroups so remove them from the memberOf list. RR tmepmanagedentryt objectclasstfiltertbase_dntscopet attrs_listtN( Rtlisttgett make_filtert find_entriest SCOPE_BASERtNotFoundtremove(tselftldaptdnt entry_attrsthgdnRtngdnR&((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pytsuppress_netgroup_memberof_s  (t__name__t __module__t__doc__Rtenvtcontainer_hostgroupt container_dnRt object_nametobject_name_pluralt object_classtdefault_attributestuuid_attributetattribute_membersRtlabel_singulartStrRRtTruet takes_paramsR8(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyR 8s8                t hostgroup_addcBs2eZedƒZedƒZd„Zd„ZRS(sAdd a new hostgroup.sAdded hostgroup "%(value)s"c Os¤y,tidi|dƒ|ii|ŒWntij onXyBtidi|dƒtidtt dƒ|dƒƒ‚Wntij onX|S(NR iÿÿÿÿRtmessageuYnetgroup with name "%s" already exists. Hostgroups and netgroups share a common namespace( RtObjecttget_dn_if_existstobjthandle_duplicate_entryRR0tDuplicateEntrytunicodeR(R2R3R4R5R)tkeystoptions((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyt pre_callback{scOs<t||ddƒ}t||ƒ|ii|||ƒ|S(NR%tmepOriginEntry(twait_for_valuetentry_from_entryRMR8(R2R3R4R5RQRRtnewentry((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyt post_callback‘s (R9R:RR;t msg_summaryRSRX(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRIvs   t hostgroup_delcBs eZedƒZedƒZRS(sDelete a hostgroup.sDeleted hostgroup "%(value)s"(R9R:RR;RY(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRZŸs t hostgroup_modcBs)eZedƒZedƒZd„ZRS(sModify a hostgroup.sModified hostgroup "%(value)s"cOs|ii|||ƒ|S(N(RMR8(R2R3R4R5RQRR((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRX¬s(R9R:RR;RYRX(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyR[§s  thostgroup_findcBs;eZedƒZddgZedddƒZd„ZRS(sSearch for hostgroups.RRs%(count)d hostgroup matcheds%(count)d hostgroups matchedic OsO|idtƒo|Sx0|D](}|\}}|ii|||ƒqW|S(Nt pkey_only(R,tFalseRMR8( R2R3tentriest truncatedtargsRRtentryR4R5((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRX¼s (R9R:RR;tmember_attributesRRYRX(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyR\´s   thostgroup_showcBseZedƒZd„ZRS(s&Display information about a hostgroup.cOs|ii|||ƒ|S(N(RMR8(R2R3R4R5RQRR((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRXÊs(R9R:RR;RX(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRdÇs thostgroup_add_membercBseZedƒZd„ZRS(sAdd members to a hostgroup.cOs |ii|||ƒ||fS(N(RMR8(R2R3t completedtfailedR4R5RQRR((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRXÕs(R9R:RR;RX(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyReÒs thostgroup_remove_membercBseZedƒZd„ZRS(s Remove members from a hostgroup.cOs |ii|||ƒ||fS(N(RMR8(R2R3RfRgR4R5RQRR((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRXàs(R9R:RR;RX(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyRhÝs N(tipalib.plugins.baseldaptipalibRRRRRtipalib.plugins.netgroupRRt ipapython.dnRR;t LDAPObjectR tregistert LDAPCreateRIt LDAPDeleteRZt LDAPUpdateR[t LDAPSearchR\t LDAPRetrieveRdt LDAPAddMemberRetLDAPRemoveMemberRh(((s</usr/lib/python2.6/site-packages/ipalib/plugins/hostgroup.pyts* ( ; &