@classmethod<EOL><INDENT>def mgmt_nw_id(cls):<DEDENT>
if cls._mgmt_nw_uuid is None:<EOL><INDENT>tenant_id = cls.l3_tenant_id()<EOL>if not tenant_id:<EOL><INDENT>return<EOL><DEDENT>net = bc.get_plugin().get_networks(<EOL>bc.context.get_admin_context(),<EOL>{'<STR_LIT>': [tenant_id],<EOL>'<STR_LIT:name>': [cfg.CONF.general.management_network]},<EOL>['<STR_LIT:id>', '<STR_LIT>'])<EOL>if len(net) == <NUM_LIT:1>:<EOL><INDENT>num_subnets = len(net[<NUM_LIT:0>]['<STR_LIT>'])<EOL>if num_subnets == <NUM_LIT:0>:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>return<EOL><DEDENT>elif num_subnets > <NUM_LIT:1>:<EOL><INDENT>LOG.info('<STR_LIT>'<EOL>'<STR_LIT>', num_subnets)<EOL><DEDENT>cls._mgmt_nw_uuid = net[<NUM_LIT:0>].get('<STR_LIT:id>')<EOL>cls._mgmt_subnet_uuid = net[<NUM_LIT:0>]['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT>elif len(net) > <NUM_LIT:1>:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>return cls._mgmt_nw_uuid<EOL>
Returns id of the management network.