<s> """<STR_LIT>""" <EOL> import json <EOL> from cafe . engine . models . base import AutoMarshallingModel <EOL> class CreateLoadBalancer ( AutoMarshallingModel ) : <EOL> """<STR_LIT>""" <EOL> ROOT_TAG = '<STR_LIT>' <EOL> def __init__ ( self , name , vip_subnet , tenant_id , admin_state_up = None , <EOL> description = None , vip_address = None ) : <EOL> """<STR_LIT>""" <EOL> self . name = name <EOL> self . vip_subnet = vip_subnet <EOL> self . tenant_id = tenant_id <EOL> self . admin_state_up = admin_state_up <EOL> self . description = description <EOL> self . vip_address = vip_address <EOL> def _obj_to_json ( self ) : <EOL> body = { <EOL> '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT>' : self . vip_subnet , <EOL> '<STR_LIT>' : self . tenant_id , <EOL> '<STR_LIT>' : self . admin_state_up , <EOL> '<STR_LIT:description>' : self . description , <EOL> '<STR_LIT>' : self . vip_address <EOL> } <EOL> body = self . _remove_empty_values ( body ) <EOL> main_body = { self . ROOT_TAG : body } <EOL> return json . dumps ( main_body ) <EOL> class UpdateLoadBalancer ( AutoMarshallingModel ) : <EOL> """<STR_LIT>""" <EOL> ROOT_TAG = CreateLoadBalancer . ROOT_TAG <EOL> def __init__ ( self , name = None , description = None , admin_state_up = None ) : <EOL> """<STR_LIT>""" <EOL> self . name = name <EOL> self . description = description <EOL> self . admin_state_up = admin_state_up <EOL> def _obj_to_json ( self ) : <EOL> body = { <EOL> '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT:description>' : self . description , <EOL> '<STR_LIT>' : self . admin_state_up <EOL> } <EOL> body = self . _remove_empty_values ( body ) <EOL> main_body = { self . ROOT_TAG : body } <EOL> return json . dumps ( main_body ) </s>
