<s> def facts_srx_cluster ( junos , facts ) : <EOL> try : <EOL> cluster_st = junos . rpc . get_chassis_cluster_status ( redundancy_group = "<STR_LIT:0>" ) <EOL> if '<STR_LIT:error>' == cluster_st . tag : <EOL> facts [ '<STR_LIT>' ] = False <EOL> return <EOL> primary = cluster_st . xpath ( <EOL> '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> node = primary . xpath ( <EOL> '<STR_LIT>' ) [ <NUM_LIT:0> ] . text . replace ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> if not facts . get ( '<STR_LIT>' ) : <EOL> facts [ '<STR_LIT>' ] = node <EOL> elif node not in facts [ '<STR_LIT>' ] : <EOL> facts [ '<STR_LIT>' ] . append ( node ) <EOL> facts [ '<STR_LIT>' ] = True <EOL> except : <EOL> pass </s>
