'Make a call to the LogicMonitor
server "do" function'

def do(self, action, params):

    self.module.debug('Running    LogicMonitor.do...')
    param_str = urlencode(params)
    creds = urlencode({'c': self.company, 'u': self.user, 'p': self.password})
    if param_str:
        param_str = (param_str + '&')
    param_str = (param_str + creds)
    try:
        self.module.debug((((((((('Attempting    to    open    URL:    ' + 'https://') + self.company) + '.') + self.lm_url) + '/do/') + action) + '?') + param_str))
        f = open_url(((((((('https://' + self.company) + '.') + self.lm_url) + '/do/') + action) + '?') + param_str))
        return f.read()
    except IOError as ioe:
        self.fail(msg=(((((((('Error:    Exception    making    RPC    call    to    ' + 'https://') + self.company) + '.') + self.lm_url) + '/do/') + action) + '\nException') + str(ioe)))
