eva-shell 0.2.24__tar.gz → 0.2.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.24
3
+ Version: 0.2.26
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
@@ -1,3 +1,3 @@
1
- __version__ = '0.2.24'
1
+ __version__ = '0.2.26'
2
2
 
3
3
  DEFAULT_REPOSITORY_URL = 'https://pub.bma.ai/eva4'
@@ -263,7 +263,14 @@ def append_alarm_cli(root_sp):
263
263
  p = sp.add_parser('state', help='alarm state')
264
264
  p.add_argument('--node', metavar='NODE', help='filter by node')
265
265
  p.add_argument('--group', metavar='GROUP', help='filter by group')
266
- p.add_argument('--level', metavar='LEVEL', help='filter by level')
266
+ p.add_argument('--level-min',
267
+ metavar='LEVEL_MIN',
268
+ type=int,
269
+ help='filter by min level')
270
+ p.add_argument('--level-max',
271
+ metavar='LEVEL_MAX',
272
+ type=int,
273
+ help='filter by max level')
267
274
  p.add_argument('--id', metavar='ID', help='filter by ID')
268
275
  p.add_argument('--current',
269
276
  choices=ALARM_CURRENT_CODES,
@@ -812,7 +819,7 @@ def append_item_cli(root_sp):
812
819
  p = sp.add_parser('edit', help='edit item config')
813
820
  p.add_argument('i', metavar='OID').completer = ComplOID()
814
821
 
815
- p = sp.add_parser('set', help='forcibly set item state')
822
+ p = sp.add_parser('set', help='set item state')
816
823
  p.add_argument('i', metavar='OID').completer = ComplOID()
817
824
  p.add_argument('value', metavar='VALUE')
818
825
  p.add_argument('-s', '--status', metavar='STATUS', type=int)
@@ -821,6 +828,13 @@ def append_item_cli(root_sp):
821
828
  dest='p',
822
829
  metavar='TYPE',
823
830
  choices=['auto', 'json'])
831
+ p.add_argument(
832
+ '-F',
833
+ '--force',
834
+ action='store_true',
835
+ help=
836
+ 'Forcibly modify item state even if it is the same, also sets state for a disabled item'
837
+ )
824
838
 
825
839
  sp.add_parser('summary', help='item summary per source')
826
840
 
@@ -1073,11 +1073,11 @@ class CLI:
1073
1073
  print(f'{c} item(s) exported')
1074
1074
  print()
1075
1075
 
1076
- def item_set(self, i, status, value, p):
1076
+ def item_set(self, i, status, value, p, force):
1077
1077
  val = format_value(value, p=p)
1078
1078
  payload = dict(status=1 if status is None else status,
1079
1079
  value=val,
1080
- force=True)
1080
+ force=force)
1081
1081
  connect()
1082
1082
  common.bus.send(
1083
1083
  'RAW/' + i.replace(':', '/', 1),
@@ -1897,7 +1897,8 @@ class CLI:
1897
1897
  def alarm_state(self,
1898
1898
  alarm_svc,
1899
1899
  node=None,
1900
- level=None,
1900
+ level_min=None,
1901
+ level_max=None,
1901
1902
  group=None,
1902
1903
  id=None,
1903
1904
  current=None,
@@ -1907,8 +1908,10 @@ class CLI:
1907
1908
  flt = {}
1908
1909
  if node:
1909
1910
  flt['node'] = node
1910
- if level is not None:
1911
- flt['level'] = level
1911
+ if level_min:
1912
+ flt['level_min'] = level_min
1913
+ if level_max:
1914
+ flt['level_max'] = level_max
1912
1915
  if group:
1913
1916
  flt['group'] = group
1914
1917
  if id:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.24
3
+ Version: 0.2.26
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
@@ -1,4 +1,4 @@
1
- __version__ = '0.2.24'
1
+ __version__ = '0.2.26'
2
2
 
3
3
  import setuptools
4
4
 
File without changes
File without changes
File without changes
File without changes