@classmethod<EOL><INDENT>def mgmt_sec_grp_id(cls):<DEDENT>
if not extensions.is_extension_supported(bc.get_plugin(),<EOL>"<STR_LIT>"):<EOL><INDENT>return<EOL><DEDENT>if cls._mgmt_sec_grp_id is None:<EOL><INDENT>tenant_id = cls.l3_tenant_id()<EOL>res = bc.get_plugin().get_security_groups(<EOL>bc.context.get_admin_context(),<EOL>{'<STR_LIT>': [tenant_id],<EOL>'<STR_LIT:name>': [cfg.CONF.general.default_security_group]},<EOL>['<STR_LIT:id>'])<EOL>if len(res) == <NUM_LIT:1>:<EOL><INDENT>sec_grp_id = res[<NUM_LIT:0>].get('<STR_LIT:id>', None)<EOL>cls._mgmt_sec_grp_id = sec_grp_id<EOL><DEDENT>elif len(res) > <NUM_LIT:1>:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>return cls._mgmt_sec_grp_id<EOL>
Returns id of security group used by the management network.