diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-06-17 14:42:55 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-06-17 14:46:06 +0200 |
commit | 5625919c37b1f2f13bc78c64172482326587dfb5 (patch) | |
tree | a5e108ff3f6080101e50c7cc296b9eea7777ec01 | |
parent | be9c7acb44472dca3909881a49c505dbe09d74d5 (diff) |
Subnet and compute_resource are required when creating VMs
-rw-r--r-- | foremanhost.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/foremanhost.py b/foremanhost.py index 111837f..3309ee6 100644 --- a/foremanhost.py +++ b/foremanhost.py @@ -373,6 +373,10 @@ def core(module): hostgroup_url = "%s/api/v2/hostgroups" % api_url if not hostgroup: raise ValueError("Hostgroup must be given") + if not compute_resource: + raise ValueError("Compute resource must be given") + if not subnetname: + raise ValueError("subnet must be given") hostgroup_id = item_to_id(hostgroup_url, 'title', hostgroup) if not hostgroup_id: raise ValueError("Hostgroup '%s' not found for '%s'" % (hostgroup, name)) |