<s> from cloudservers import base <EOL> class IPGroup ( base . Resource ) : <EOL> def __repr__ ( self ) : <EOL> return "<STR_LIT>" % self . name <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . manager . delete ( self ) <EOL> class IPGroupManager ( base . ManagerWithFind ) : <EOL> resource_class = IPGroup <EOL> def list ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _list ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> def get ( self , group ) : <EOL> """<STR_LIT>""" <EOL> return self . _get ( "<STR_LIT>" % base . getid ( group ) , "<STR_LIT>" ) <EOL> def create ( self , name , server = None ) : <EOL> """<STR_LIT>""" <EOL> data = { "<STR_LIT>" : { "<STR_LIT:name>" : name } } <EOL> if server : <EOL> data [ '<STR_LIT>' ] [ '<STR_LIT>' ] = base . getid ( server ) <EOL> return self . _create ( '<STR_LIT>' , data , "<STR_LIT>" ) <EOL> def delete ( self , group ) : <EOL> """<STR_LIT>""" <EOL> self . _delete ( "<STR_LIT>" % base . getid ( group ) ) </s>
