Eliminate redundant module argument checks.

This commit is contained in:
Ash Wilson 2015-02-23 14:33:02 -06:00 committed by Matt Clay
commit 23c79ed474
5 changed files with 4 additions and 47 deletions

View file

@ -141,16 +141,6 @@ def cloud_check(module, state, entity_id, label, check_type,
monitoring_zones_poll, target_hostname, target_alias, details,
disabled, metadata, period, timeout):
# Verify the presence of required attributes.
required_attrs = {
"entity_id": entity_id, "label": label, "check_type": check_type
}
for (key, value) in required_attrs.iteritems():
if not value:
module.fail_json(msg=('%s is required for rax_mon_check' % key))
# Coerce attributes.
if monitoring_zones_poll and not isinstance(monitoring_zones_poll, list):