You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: create.rb
    path of file: ./repos/kontena/server/app/mutations/host_nodes
    
    the code of the file until where you have to start completion: require_relative 'common'

module HostNodes
  class Create < Mutations::Command
    include Common

    required do
      model :grid
      string :name, matches: /
    
    def execute
      host_node = create_host_node

      set_common_params(host_node)

      unless host_node.save
        host_node.errors.each do |key, message|
          add_error(key, :invalid, message)
        end
        return
      end