'This is for checking for required params when we can not check via argspec because we
need more information than is simply given in the argspec.'

def fail_on_missing_params(self, required_params=None):

    if (not required_params):
        return
    missing_params = []
    for required_param in required_params:
        if (not self.params.get(required_param)):
            missing_params.append(required_param)
    if missing_params:
        self.fail_json(msg=('missing    required    arguments:    %s' % ','.join(missing_params)))
