Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMware: add missing fact about IP network in firewall facts #52554

Merged
merged 1 commit into from
Feb 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@
{
"allowed_hosts": {
"all_ip": true,
"ip_address": []
"ip_address": [
"10.10.10.1",
],
"ip_network": [
"11.111.112.0/22",
"192.168.10.1/24"
],
},
"enabled": true,
"key": "CIMHttpServer",
Expand Down Expand Up @@ -117,6 +123,7 @@ def normalize_rule_set(rule_obj):
allowed_host = rule_obj.allowedHosts
rule_allow_host = dict()
rule_allow_host['ip_address'] = [ip for ip in allowed_host.ipAddress]
rule_allow_host['ip_network'] = [ip.network + "/" + str(ip.prefixLength) for ip in allowed_host.ipNetwork]
rule_allow_host['all_ip'] = allowed_host.allIp
rule_dict['allowed_hosts'] = rule_allow_host
return rule_dict
Expand Down