Current File : //usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describesecuritygroups.pyc
�
��Xc@sFddlmZddlmZmZmZdefd��YZdS(i����(t
EC2Request(tArgtFiltertGenericTagFiltertDescribeSecurityGroupscBsIeZdZeddddddd/dgdd	�gZed
dd�ed�ed
�eddd�eddd�eddd�eddd�eddd�eddd�eddd�eddd�eddd�ed dd!�ed"dd#�ed$dd%�gZd&d'd(d)d*d+gZ	d,�Z
d-�Zd.�ZRS(0s�Show information about security groups

Note that filters are matched on literal strings only, so "--filter ip-permission.from-port=22" will *not* match a group with a port range of 20 to 30.tgrouptmetavartGROUPtnargst*troute_totdefaultthelps)limit results to specific security groupstdescriptionsgroup descriptionsgroup-ids
group-namesip-permission.cidrs-CIDR IP range granted permission by the groupsip-permission.from-ports0start of TCP/UDP port range, or ICMP type numbersip-permission.group-namesLname of another group
                      granted permission by this groupsip-permission.group-idsJID of another group
                      granted permission by this groupsip-permission.protocolsIP protocol for the permissionsip-permission.to-ports'end of TCP/UDP port range, or ICMP codesip-permission.user-ids#ID of an account granted permissionsowner-idsaccount ID of the group's ownerstag-keys"key of a tag assigned to the groups	tag-values$value of a tag assigned to the groupstag:KEYs"specific tag key/value combinationsvpc-ids+[VPC only] ID of a VPC the group belongs totsecurityGroupInfot
ipPermissionstipPermissionsEgresstgroupstipRangesttagSetcCs|xu|jdD]f}|jd�rM|jjdg�|jdj|�q|jjdg�|jdj|�qWdS(NRssg-tGroupIdt	GroupName(targst
startswithtparamst
setdefaulttappend(tselfR((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describesecuritygroups.pyt
preprocessAscCs.x'|jdg�D]}|j|�qWdS(NR(tgettprint_group(RtresultR((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describesecuritygroups.pytprint_resultJsc	Cs@|jd|jd�|jd�|jd�|jd�|jd�f�GHxR|jdg�D]>}d|jd�|jd�d	|jd
�|jd�|jd�g}xG|jd
g�D]3}dd|jd�dg}|j||�GHq�Wx�|jdg�D]�}dd|jd�g}|jd�rR|jd|dg�n|jd�r{|jd|dg�n|jd�|j||�GHqWq`WxR|jdg�D]>}d|jd�|jd�d	|jd
�|jd�|jd�g}xG|jd
g�D]3}dd|jd�dg}|j||�GHqWx�|jdg�D]�}dd|jd�g}|jd�r�|jd|dg�n|jd�r�|jd|dg�n|jd�|j||�GHq`Wq�WxB|jdg�D].}|j||jd�p4|jd��q
WdS(NRtgroupIdtownerIdt	groupNametgroupDescriptiontvpcIdRt
PERMISSIONtALLOWSt
ipProtocoltfromPortttoPortRtFROMtCIDRtcidrIptingressRtUSERtuserIdtNAMEtIDRtTOtegressR(ttabifyRtextendRtprint_resource_tag(RRtpermt	perm_baset
cidr_ranget	perm_itemt
othergroupttag((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describesecuritygroups.pyRNsP!	

N(
t__name__t
__module__tDESCRIPTIONRtNonetARGSRRtFILTERSt	LIST_TAGSRR R(((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describesecuritygroups.pyRsB																N(teuca2ools.commands.ec2RtrequestbuilderRRRR(((sQ/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/describesecuritygroups.pyt<module>s