def create_security_group_icmp_rule(mgr_or_client, security_group_id): icmp_rule = dict(direction='ingress', ethertype='IPv4', protocol='icmp') return Q.security_group_rule_create(mgr_or_client, security_group_id, **icmp_rule)
def create_security_group_ssh_rule(mgr_or_client, security_group_id): ssh_rule = dict(direction='ingress', ethertype='IPv4', protocol='tcp', port_range_min=22, port_range_max=22) return Q.security_group_rule_create(mgr_or_client, security_group_id, **ssh_rule)