code: def create_hosting_device_resources(self, context, complementary_id,
                                          tenant_id, mgmt_context, max_hosted):
          
          mgmt_port = None
          if mgmt_context and mgmt_context.get('mgmt_nw_id') and tenant_id:
              # Create port for mgmt interface
              p_spec = {'port': {
                  'tenant_id': tenant_id,
                  'admin_state_up': True,
                  'name': 'mgmt',
                  'network_id': mgmt_context['mgmt_nw_id'],
                  'mac_address': bc.constants.ATTR_NOT_SPECIFIED,
                  'fixed_ips': self._mgmt_subnet_spec(context, mgmt_context),
                  'device_id': "",
                  # Use device_owner attribute to ensure we can query for these
                  # ports even before Nova has set device_id attribute.
                  'device_owner': complementary_id}}
              try:
                  mgmt_port = self._core_plugin.create_port(context, p_spec)
              except n_exc.NeutronException as e:
                  LOG.error('Error %s when creating management port. '
                            'Cleaning up.', e)
                  self.delete_hosting_device_resources(
                      context, tenant_id, mgmt_port)
                  mgmt_port = None
          # We are setting the 'ports' to an empty list as it is expected by
          # the callee: device_handling_db._create_svc_vm_hosting_devices()
          return {'mgmt_port': mgmt_port, 'ports': []}
docs: Create resources for a hosting device in a plugin specific way.