Browse Source

LR v0.4.14: upgrade LR procedures fixed; new shell command (lr_info).

Change-Id: I3d3bf92981505904d77bf2128eed5d1e68f3ac65
changes/19/673319/1 0.4.14
Nicola Peditto 3 years ago
parent
commit
7f15d58f70
  1. 1
      MANIFEST.in
  2. 6
      iotronic_lightningrod/modules/device_manager.py
  3. 10
      scripts/lr_info

1
MANIFEST.in

@ -4,6 +4,7 @@ include templates/plugins.example.json
include templates/services.example.json
include etc/systemd/system/s4t-lightning-rod.service
include etc/logrotate.d/lightning-rod.log
include scripts/lr_info
include scripts/lr_checks
include scripts/lr_install
include scripts/lr_configure

6
iotronic_lightningrod/modules/device_manager.py

@ -242,10 +242,12 @@ class DeviceManager(Module.Module):
if (version != None) and (version != "latest") and (version != ""):
LOG.info("--> version specified: " + str(version))
command = "pip3 install iotronic-lightningrod==" + str(version)
command = "pip3 install iotronic-lightningrod==" + str(version) \
+ " && lr_install"
else:
LOG.info("--> version not specified: set 'latest'")
command = "pip3 install --upgrade iotronic-lightningrod"
command = "pip3 install --upgrade " \
+ "iotronic-lightningrod && lr_install"
print("\nUpgrading LR: " + str(command))

10
scripts/lr_info

@ -0,0 +1,10 @@
#!/usr/bin/python3
import json
import requests
r = requests.get(url = "http://localhost:1474/info")
data = r.json()
print(json.dumps(data, indent=4, sort_keys=True))
Loading…
Cancel
Save