def check_name_available_except!(name, network)
      return if name.nil? || network.name_eql?(name) || !find_network(name)

      raise CommandError, "a network with the name #{name.inspect} " \
                          'already exists'
    end
def check_name_available_except!(name, network)
      return if name.nil? || network.name_eql?(name) || !find_network(name)

      raise CommandError, "a network with the name #{name.inspect} " \
                          'already exists'
    end
Checks that the specified name is available for use by the specified
 network.

 @param name [String] the name to check for
 @param network [Network] the network to ignore
 @raise [CommandError] if the name is already taken