   end
 
   def connect do
-    Logger.debug 1, "Connecting to NervesHub"
+    Logger.debug 1, "Connecting to OTA Server"
     @handler.connect()
   end
 

      extra_tags = app_config[:extra_tags] || []

      if nil in get_config() do
        Logger.info 1, "doing initial nerves hub configuration."
        :ok = deconfigure()
        :ok = provision()
        :ok = configure([app_env, channel] ++ extra_tags)

  # Message comes over AMQP.
  def configure_certs("-----BEGIN CERTIFICATE-----" <> _ = cert,
                      "-----BEGIN EC PRIVATE KEY-----" <> _ = key) do
    Logger.debug 1, "Configuring certs for OTA Server."
    :ok = @handler.configure_certs(cert, key)
    :ok
  end

  def deconfigure do
    Logger.debug 1, "Deconfiguring OTA Server"
    :ok = @handler.deconfigure()
    :ok
  end

  def check_update do
    Logger.debug 1, "Check update OTA Server"
    @handler.check_update()
  end
end
