/usr/lib/python2.6/site-packages/novaclient/v2
Edit: /usr/lib/python2.6/site-packages/novaclient/v2/security_groups.pyc (4121B)
Ñò
=vVc @ sh d Z d d k Z d d k l Z d d k l Z d e i f d „ ƒ YZ d e i f d „ ƒ YZ d S( s+
Security group interface (1.1 extension).
iÿÿÿÿN( t parse( t baset
SecurityGroupc B s# e Z d „ Z d „ Z d „ Z RS( c C s
t | i ƒ S( N( t strt id( t self( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyt __str__ s c C s | i i | ƒ d S( N( t managert delete( R ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyR s c C s | i i | ƒ d S( N( R t update( R ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyR ! s ( t __name__t
__module__R R R ( ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyR s t SecurityGroupManagerc B s> e Z e Z d „ Z d „ Z d „ Z d „ Z d d „ Z RS( c C s. h h | d 6| d 6d 6} | i d | d ƒ S( sÍ
Create a security group
:param name: name for the security group to create
:param description: description of the security group
:rtype: the security group object
t namet descriptiont security_groups /os-security-groups( t _create( R R
R t body( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyt create( s c C s; h h | d 6| d 6d 6} | i d t i | ƒ | d ƒ S( s
Update a security group
:param group: The security group to update (group or ID)
:param name: name for the security group to update
:param description: description for the security group to update
:rtype: the security group object
R
R R s /os-security-groups/%s( t _updateR t getid( R t groupR
R R ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyR 3 s c C s | i d t i | ƒ ƒ d S( s€
Delete a security group
:param group: The security group to delete (group or ID)
:rtype: None
s /os-security-groups/%sN( t _deleteR R ( R R ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyR @ s c C s | i d | d ƒ S( s‡
Get a security group
:param group_id: The security group to get by ID
:rtype: :class:`SecurityGroup`
s /os-security-groups/%sR ( t _get( R t group_id( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyt getI s
c C sa | p h } t d „ t i | ƒ Dƒ ƒ } | o d t i | ƒ n d } | i d | d ƒ S( sc
Get a list of all security_groups
:rtype: list of :class:`SecurityGroup`
c s s0 x) | ]" \ } } | o | | f Vq q Wd S( N( ( t .0t kt v( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pys
[ s s ?%st s /os-security-groups%st security_groups( t dictt sixt iteritemsR t urlencodet _list( R t search_optst qparamst query_string( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyt listS s
!
N(
R
R R t resource_classR R R R t NoneR' ( ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyR % s
(
t __doc__R t six.moves.urllibR t
novaclientR t ResourceR t ManagerWithFindR ( ( ( sH /tmp/pip-build-cD3xZi/python-novaclient/novaclient/v2/security_groups.pyt s