eva-shell 0.2.43__tar.gz → 0.2.45__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.4
2
2
  Name: eva-shell
3
- Version: 0.2.43
3
+ Version: 0.2.45
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.43'
1
+ __version__ = '0.2.45'
2
2
 
3
3
  DEFAULT_REPOSITORY_URL = 'https://pub.bma.ai/eva4'
@@ -765,10 +765,16 @@ def append_item_cli(root_sp):
765
765
  p = sp.add_parser('list', help='list items')
766
766
  p.add_argument('i', metavar='MASK').completer = ComplOID()
767
767
  p.add_argument('-n', metavar='NODE').completer = ComplNode()
768
+ p.add_argument('-x', '--regex', type=str, help='filter regular expression')
769
+
770
+ p = sp.add_parser('search', help='search items by OID regex (equal to list "#" with regex filter)')
771
+ p.add_argument('x', metavar='REGEX', type=str, help='OID regular expression')
772
+ p.add_argument('-n', metavar='NODE').completer = ComplNode()
768
773
 
769
774
  p = sp.add_parser('state', help='item states')
770
775
  p.add_argument('i', metavar='MASK').completer = ComplOID('state')
771
776
  p.add_argument('-y', '--full', action='store_true')
777
+ p.add_argument('-x', '--regex', type=str, help='filter regular expression')
772
778
 
773
779
  p = sp.add_parser('stream-info', help='item stream info')
774
780
  p.add_argument('i', metavar='MASK').completer = ComplOID('state')
@@ -967,7 +967,7 @@ class CLI:
967
967
  d['type'] = 'local'
968
968
  try:
969
969
  info = d.pop('info')
970
- d['version'] = info.get('version')
970
+ d['ver'] = info.get('version')
971
971
  d['build'] = info.get('build')
972
972
  except KeyError:
973
973
  pass
@@ -1060,10 +1060,10 @@ class CLI:
1060
1060
  data = call_rpc('spoint.list')
1061
1061
  print_result(data, cols=['name', 'source', 'port', 'version', 'build'])
1062
1062
 
1063
- def item_list(self, i, n=None):
1063
+ def item_list(self, i, n=None, regex=None):
1064
1064
  data = call_rpc(
1065
1065
  'item.list',
1066
- dict(i=i, node=n),
1066
+ dict(i=i, node=n, regex=regex)
1067
1067
  )
1068
1068
  print_result(data,
1069
1069
  cols=[
@@ -1071,8 +1071,19 @@ class CLI:
1071
1071
  't|n=set time|f=time', 'node', 'connected', 'enabled'
1072
1072
  ])
1073
1073
 
1074
- def item_announce(self, i, n=None):
1074
+ def item_search(self, x, n=None):
1075
1075
  data = call_rpc(
1076
+ 'item.list',
1077
+ dict(i="#", node=n, regex=x)
1078
+ )
1079
+ print_result(data,
1080
+ cols=[
1081
+ 'oid', 'status', 'value|l=20|n=value',
1082
+ 't|n=set time|f=time', 'node', 'connected', 'enabled'
1083
+ ])
1084
+
1085
+ def item_announce(self, i, n=None):
1086
+ call_rpc(
1076
1087
  'item.announce',
1077
1088
  dict(i=i, node=n),
1078
1089
  )
@@ -1179,10 +1190,10 @@ class CLI:
1179
1190
  call_rpc('item.disable', dict(i=i))
1180
1191
  ok()
1181
1192
 
1182
- def item_state(self, i, full):
1193
+ def item_state(self, i, full, regex):
1183
1194
  data = call_rpc(
1184
1195
  'item.state',
1185
- dict(i=i, full=full),
1196
+ dict(i=i, full=full, regex=regex)
1186
1197
  )
1187
1198
  print_result(data,
1188
1199
  cols=[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eva-shell
3
- Version: 0.2.43
3
+ Version: 0.2.45
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.43'
1
+ __version__ = '0.2.45'
2
2
 
3
3
  import setuptools
4
4
 
File without changes
File without changes
File without changes
File without changes