<s> import re <EOL> import sys <EOL> def main ( ) : <EOL> """<STR_LIT>""" <EOL> HOSTNAME = '<STR_LIT>' <EOL> NXOS_HOSTNAME_REGEX = '<STR_LIT>' <EOL> NXOS_DOMAIN_REGEX = '<STR_LIT>' <EOL> with open ( '<STR_LIT>' , '<STR_LIT:r>' ) as nexus_config : <EOL> for line in nexus_config : <EOL> if re . match ( NXOS_HOSTNAME_REGEX , line ) : <EOL> HOSTNAME = re . search ( NXOS_HOSTNAME_REGEX , line ) . group ( <NUM_LIT:1> ) + '<STR_LIT:.>' <EOL> elif re . match ( NXOS_DOMAIN_REGEX , line ) : <EOL> HOSTNAME += re . search ( NXOS_DOMAIN_REGEX , line ) . group ( <NUM_LIT:1> ) <EOL> print ( HOSTNAME ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> sys . exit ( main ( ) ) </s>
