def create_hosting_device_resources(self, context, complementary_id,<EOL>tenant_id, mgmt_context, max_hosted):
mgmt_port = None<EOL>if mgmt_context and mgmt_context.get('<STR_LIT>') and tenant_id:<EOL><INDENT>p_spec = {'<STR_LIT:port>': {<EOL>'<STR_LIT>': tenant_id,<EOL>'<STR_LIT>': True,<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT>': mgmt_context['<STR_LIT>'],<EOL>'<STR_LIT>': bc.constants.ATTR_NOT_SPECIFIED,<EOL>'<STR_LIT>': self._mgmt_subnet_spec(context, mgmt_context),<EOL>'<STR_LIT>': "<STR_LIT>",<EOL>'<STR_LIT>': complementary_id}}<EOL>try:<EOL><INDENT>mgmt_port = self._core_plugin.create_port(context, p_spec)<EOL><DEDENT>except n_exc.NeutronException as e:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>', e)<EOL>self.delete_hosting_device_resources(<EOL>context, tenant_id, mgmt_port)<EOL>mgmt_port = None<EOL><DEDENT><DEDENT>return {'<STR_LIT>': mgmt_port, '<STR_LIT>': []}<EOL>
Create resources for a hosting device in a plugin specific way.