def get_command_from_state(state):
 command = None
 if (state == 'present'):
  command = 'vrouter-loopback-interface-add'
 if (state == 'absent'):
  command = 'vrouter-loopback-interface-remove'
 return command

def get_command_from_state ( state ) : command = None if ( state == 'present' ) : command = 'vrouter-loopback-interface-add' if ( state == 'absent' ) : command = 'vrouter-loopback-interface-remove' return command
this method gets appropriate command name for the state specified .