<s> import requests <EOL> import yaml <EOL> from lib . base import OpscenterAction <EOL> class SetNodeConfAction ( OpscenterAction ) : <EOL> def run ( self , node_ip , node_conf , cluster_id = None ) : <EOL> if not cluster_id : <EOL> cluster_id = self . cluster_id <EOL> try : <EOL> yaml . safe_load ( node_conf ) <EOL> except : <EOL> self . logger . error ( '<STR_LIT>' ) <EOL> raise <EOL> url = self . _get_full_url ( [ cluster_id , '<STR_LIT>' , node_ip ] ) <EOL> return requests . post ( url , data = node_conf ) . json ( ) </s>
