There should be a separate function for egress rules. Also there should be an optional key in existing parameter specifying rule IP protocol version (IPv4/IPv6). Optimal implementation should make use of it only when it IPv6 so that it will still be possible to use the class with older versions of OpenStack that do not support IPv6 in cases when IPv4 rules are added (IPv4 is the default but older versions of Heat will complain on unknown resource property when if IPv4 is specified explicitly)
There should be a separate function for egress rules. Also there should be an optional key in existing parameter specifying rule IP protocol version (IPv4/IPv6). Optimal implementation should make use of it only when it IPv6 so that it will still be possible to use the class with older versions of OpenStack that do not support IPv6 in cases when IPv4 rules are added (IPv4 is the default but older versions of Heat will complain on unknown resource property when if IPv4 is specified explicitly)