From c6f589754a169daabfba9974255f260e748ed95b Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Thu, 5 Nov 2015 09:37:02 +0100 Subject: [PATCH] MT#16107 Provide HTTP firmware url. HDV130 only supports HTTP download of firmware, provide a template var for config templates as firmware.booturl. Change-Id: Ia7be98867849489de9beab67acdf7615ec99f42d --- lib/NGCP/Panel/Controller/Device.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/NGCP/Panel/Controller/Device.pm b/lib/NGCP/Panel/Controller/Device.pm index 5aadd78966..180de0d9ed 100644 --- a/lib/NGCP/Panel/Controller/Device.pm +++ b/lib/NGCP/Panel/Controller/Device.pm @@ -1258,6 +1258,7 @@ sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() { my $schema = 'https'; my $host = $c->config->{deviceprovisioning}->{host} // $c->req->uri->host; my $port = $c->config->{deviceprovisioning}->{port} // 1444; + my $boot_port = $c->config->{deviceprovisioning}->{bootstrap_port} // 1445; my $vars = { opt => $opt, @@ -1291,6 +1292,7 @@ sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() { }; $vars->{firmware}->{baseurl} = "$schema://$host:$port/device/autoprov/firmware"; + $vars->{firmware}->{booturl} = "http://$host:$boot_port/device/autoprov/firmware"; my $latest_fw = $c->model('DB')->resultset('autoprov_firmwares')->search({ device_id => $model->id, }, {