<s> """<STR_LIT>""" <EOL> import json <EOL> from cafe . engine . models . base import AutoMarshallingModel <EOL> class CreateNode ( AutoMarshallingModel ) : <EOL> def __init__ ( <EOL> self , chassis_uuid = None , driver = None , properties = None , <EOL> driver_info = None , extra = None ) : <EOL> super ( CreateNode , self ) . __init__ ( ) <EOL> properties = properties or { } <EOL> driver_info = driver_info or { } <EOL> extra = extra or { } <EOL> self . chassis_uuid = chassis_uuid <EOL> self . driver = driver <EOL> self . properties = properties <EOL> self . driver_info = driver_info <EOL> self . extra = extra <EOL> def _obj_to_json ( self ) : <EOL> create_request = { <EOL> '<STR_LIT>' : self . chassis_uuid , <EOL> '<STR_LIT>' : self . driver , <EOL> '<STR_LIT>' : self . properties , <EOL> '<STR_LIT>' : self . driver_info , <EOL> '<STR_LIT>' : self . extra <EOL> } <EOL> self . _remove_empty_values ( create_request ) <EOL> return json . dumps ( create_request ) <EOL> class SetNodePowerState ( AutoMarshallingModel ) : <EOL> def __init__ ( self , power_state ) : <EOL> super ( SetNodePowerState , self ) . __init__ ( ) <EOL> self . power_state = power_state <EOL> def _obj_to_json ( self ) : <EOL> return json . dumps ( { '<STR_LIT:target>' : self . power_state } ) <EOL> class SetNodeConsoleMode ( AutoMarshallingModel ) : <EOL> def __init__ ( self , enabled ) : <EOL> super ( SetNodeConsoleMode , self ) . __init__ ( ) <EOL> self . enabled = enabled <EOL> def _obj_to_json ( self ) : <EOL> return json . dumps ( { '<STR_LIT>' : self . enabled } ) </s>
