Merge "Support Security Group Name Prefix Customization"
This commit is contained in:
commit
6ecab67a17
@ -122,6 +122,7 @@ common_opts = [
|
||||
help="Require user hostnames to be IPv4 addresses."),
|
||||
cfg.BoolOpt('trove_security_groups_support', default=True),
|
||||
cfg.BoolOpt('trove_security_groups_rules_support', default=True),
|
||||
cfg.StrOpt('trove_security_group_name_prefix', default='SecGroup'),
|
||||
cfg.StrOpt('trove_security_group_rule_protocol', default='tcp'),
|
||||
cfg.IntOpt('trove_security_group_rule_port', default=3306),
|
||||
cfg.StrOpt('trove_security_group_rule_cidr', default='0.0.0.0/0'),
|
||||
|
@ -76,7 +76,8 @@ class SecurityGroup(DatabaseModelBase):
|
||||
@classmethod
|
||||
def create_for_instance(cls, instance_id, context):
|
||||
# Create a new security group
|
||||
name = _("SecGroup_%s") % instance_id
|
||||
name = _("%s_%s") %\
|
||||
(CONF.trove_security_group_name_prefix, instance_id)
|
||||
description = _("Security Group for %s") % instance_id
|
||||
sec_group = cls.create_sec_group(name, description, context)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user