vortex-nwp 2.0.0b1__py3-none-any.whl → 2.0.0b2__py3-none-any.whl
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.
- vortex/__init__.py +59 -45
- vortex/algo/__init__.py +3 -2
- vortex/algo/components.py +940 -614
- vortex/algo/mpitools.py +802 -497
- vortex/algo/serversynctools.py +34 -33
- vortex/config.py +19 -22
- vortex/data/__init__.py +9 -3
- vortex/data/abstractstores.py +593 -655
- vortex/data/containers.py +217 -162
- vortex/data/contents.py +65 -39
- vortex/data/executables.py +93 -102
- vortex/data/flow.py +40 -34
- vortex/data/geometries.py +228 -132
- vortex/data/handlers.py +428 -225
- vortex/data/outflow.py +15 -15
- vortex/data/providers.py +185 -163
- vortex/data/resources.py +48 -42
- vortex/data/stores.py +544 -413
- vortex/gloves.py +114 -87
- vortex/layout/__init__.py +1 -8
- vortex/layout/contexts.py +150 -84
- vortex/layout/dataflow.py +353 -202
- vortex/layout/monitor.py +264 -128
- vortex/nwp/__init__.py +5 -2
- vortex/nwp/algo/__init__.py +14 -5
- vortex/nwp/algo/assim.py +205 -151
- vortex/nwp/algo/clim.py +683 -517
- vortex/nwp/algo/coupling.py +447 -225
- vortex/nwp/algo/eda.py +437 -229
- vortex/nwp/algo/eps.py +403 -231
- vortex/nwp/algo/forecasts.py +420 -271
- vortex/nwp/algo/fpserver.py +683 -307
- vortex/nwp/algo/ifsnaming.py +205 -145
- vortex/nwp/algo/ifsroot.py +210 -122
- vortex/nwp/algo/monitoring.py +132 -76
- vortex/nwp/algo/mpitools.py +321 -191
- vortex/nwp/algo/odbtools.py +617 -353
- vortex/nwp/algo/oopsroot.py +449 -273
- vortex/nwp/algo/oopstests.py +90 -56
- vortex/nwp/algo/request.py +287 -206
- vortex/nwp/algo/stdpost.py +878 -522
- vortex/nwp/data/__init__.py +22 -4
- vortex/nwp/data/assim.py +125 -137
- vortex/nwp/data/boundaries.py +121 -68
- vortex/nwp/data/climfiles.py +193 -211
- vortex/nwp/data/configfiles.py +73 -69
- vortex/nwp/data/consts.py +426 -401
- vortex/nwp/data/ctpini.py +59 -43
- vortex/nwp/data/diagnostics.py +94 -66
- vortex/nwp/data/eda.py +50 -51
- vortex/nwp/data/eps.py +195 -146
- vortex/nwp/data/executables.py +440 -434
- vortex/nwp/data/fields.py +63 -48
- vortex/nwp/data/gridfiles.py +183 -111
- vortex/nwp/data/logs.py +250 -217
- vortex/nwp/data/modelstates.py +180 -151
- vortex/nwp/data/monitoring.py +72 -99
- vortex/nwp/data/namelists.py +254 -202
- vortex/nwp/data/obs.py +400 -308
- vortex/nwp/data/oopsexec.py +22 -20
- vortex/nwp/data/providers.py +90 -65
- vortex/nwp/data/query.py +71 -82
- vortex/nwp/data/stores.py +49 -36
- vortex/nwp/data/surfex.py +136 -137
- vortex/nwp/syntax/__init__.py +1 -1
- vortex/nwp/syntax/stdattrs.py +173 -111
- vortex/nwp/tools/__init__.py +2 -2
- vortex/nwp/tools/addons.py +22 -17
- vortex/nwp/tools/agt.py +24 -12
- vortex/nwp/tools/bdap.py +16 -5
- vortex/nwp/tools/bdcp.py +4 -1
- vortex/nwp/tools/bdm.py +3 -0
- vortex/nwp/tools/bdmp.py +14 -9
- vortex/nwp/tools/conftools.py +728 -378
- vortex/nwp/tools/drhook.py +12 -8
- vortex/nwp/tools/grib.py +65 -39
- vortex/nwp/tools/gribdiff.py +22 -17
- vortex/nwp/tools/ifstools.py +82 -42
- vortex/nwp/tools/igastuff.py +167 -143
- vortex/nwp/tools/mars.py +14 -2
- vortex/nwp/tools/odb.py +234 -125
- vortex/nwp/tools/partitioning.py +61 -37
- vortex/nwp/tools/satrad.py +27 -12
- vortex/nwp/util/async.py +83 -55
- vortex/nwp/util/beacon.py +10 -10
- vortex/nwp/util/diffpygram.py +174 -86
- vortex/nwp/util/ens.py +144 -63
- vortex/nwp/util/hooks.py +30 -19
- vortex/nwp/util/taskdeco.py +28 -24
- vortex/nwp/util/usepygram.py +278 -172
- vortex/nwp/util/usetnt.py +31 -17
- vortex/sessions.py +72 -39
- vortex/syntax/__init__.py +1 -1
- vortex/syntax/stdattrs.py +410 -171
- vortex/syntax/stddeco.py +31 -22
- vortex/toolbox.py +327 -192
- vortex/tools/__init__.py +11 -2
- vortex/tools/actions.py +125 -59
- vortex/tools/addons.py +111 -92
- vortex/tools/arm.py +42 -22
- vortex/tools/compression.py +72 -69
- vortex/tools/date.py +11 -4
- vortex/tools/delayedactions.py +242 -132
- vortex/tools/env.py +75 -47
- vortex/tools/folder.py +342 -171
- vortex/tools/grib.py +311 -149
- vortex/tools/lfi.py +423 -216
- vortex/tools/listings.py +109 -40
- vortex/tools/names.py +218 -156
- vortex/tools/net.py +632 -298
- vortex/tools/parallelism.py +93 -61
- vortex/tools/prestaging.py +55 -31
- vortex/tools/schedulers.py +172 -105
- vortex/tools/services.py +402 -333
- vortex/tools/storage.py +293 -358
- vortex/tools/surfex.py +24 -24
- vortex/tools/systems.py +1211 -631
- vortex/tools/targets.py +156 -100
- vortex/util/__init__.py +1 -1
- vortex/util/config.py +377 -327
- vortex/util/empty.py +2 -2
- vortex/util/helpers.py +56 -24
- vortex/util/introspection.py +18 -12
- vortex/util/iosponge.py +8 -4
- vortex/util/roles.py +4 -6
- vortex/util/storefunctions.py +39 -13
- vortex/util/structs.py +3 -3
- vortex/util/worker.py +29 -17
- vortex_nwp-2.0.0b2.dist-info/METADATA +66 -0
- vortex_nwp-2.0.0b2.dist-info/RECORD +142 -0
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/WHEEL +1 -1
- vortex/layout/appconf.py +0 -109
- vortex/layout/jobs.py +0 -1276
- vortex/layout/nodes.py +0 -1424
- vortex/layout/subjobs.py +0 -464
- vortex_nwp-2.0.0b1.dist-info/METADATA +0 -50
- vortex_nwp-2.0.0b1.dist-info/RECORD +0 -146
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/LICENSE +0 -0
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/top_level.txt +0 -0
vortex/tools/targets.py
CHANGED
|
@@ -44,55 +44,55 @@ class Target(fp.FootprintBase):
|
|
|
44
44
|
|
|
45
45
|
_abstract = True
|
|
46
46
|
_explicit = False
|
|
47
|
-
_collector = (
|
|
47
|
+
_collector = ("target",)
|
|
48
48
|
_footprint = dict(
|
|
49
|
-
info
|
|
50
|
-
attr
|
|
51
|
-
hostname
|
|
52
|
-
optional
|
|
53
|
-
default
|
|
54
|
-
alias
|
|
49
|
+
info="Default target description",
|
|
50
|
+
attr=dict(
|
|
51
|
+
hostname=dict(
|
|
52
|
+
optional=True,
|
|
53
|
+
default=platform.node(),
|
|
54
|
+
alias=("nodename", "computer"),
|
|
55
55
|
),
|
|
56
|
-
inetname
|
|
57
|
-
optional
|
|
58
|
-
default
|
|
56
|
+
inetname=dict(
|
|
57
|
+
optional=True,
|
|
58
|
+
default=platform.node(),
|
|
59
59
|
),
|
|
60
|
-
fqdn
|
|
61
|
-
optional
|
|
62
|
-
default
|
|
60
|
+
fqdn=dict(
|
|
61
|
+
optional=True,
|
|
62
|
+
default=default_fqdn(),
|
|
63
63
|
),
|
|
64
|
-
sysname
|
|
65
|
-
optional
|
|
66
|
-
default
|
|
64
|
+
sysname=dict(
|
|
65
|
+
optional=True,
|
|
66
|
+
default=platform.system(),
|
|
67
67
|
),
|
|
68
|
-
userconfig
|
|
69
|
-
type
|
|
70
|
-
optional
|
|
71
|
-
default
|
|
68
|
+
userconfig=dict(
|
|
69
|
+
type=GenericConfigParser,
|
|
70
|
+
optional=True,
|
|
71
|
+
default=None,
|
|
72
72
|
),
|
|
73
|
-
inifile
|
|
74
|
-
optional
|
|
75
|
-
default
|
|
73
|
+
inifile=dict(
|
|
74
|
+
optional=True,
|
|
75
|
+
default="@target-[hostname].ini",
|
|
76
76
|
),
|
|
77
|
-
defaultinifile
|
|
78
|
-
optional
|
|
79
|
-
default
|
|
77
|
+
defaultinifile=dict(
|
|
78
|
+
optional=True,
|
|
79
|
+
default="target-commons.ini",
|
|
80
80
|
),
|
|
81
|
-
iniauto
|
|
82
|
-
type
|
|
83
|
-
optional
|
|
84
|
-
default
|
|
85
|
-
)
|
|
86
|
-
)
|
|
81
|
+
iniauto=dict(
|
|
82
|
+
type=bool,
|
|
83
|
+
optional=True,
|
|
84
|
+
default=True,
|
|
85
|
+
),
|
|
86
|
+
),
|
|
87
87
|
)
|
|
88
88
|
|
|
89
|
-
_re_nodes_property = re.compile(r
|
|
90
|
-
_re_proxies_property = re.compile(r
|
|
91
|
-
_re_isnode_property = re.compile(r
|
|
92
|
-
_re_glove_rk_id = re.compile(r
|
|
89
|
+
_re_nodes_property = re.compile(r"(\w+)(nodes)$")
|
|
90
|
+
_re_proxies_property = re.compile(r"(\w+)(proxies)$")
|
|
91
|
+
_re_isnode_property = re.compile(r"is(\w+)node$")
|
|
92
|
+
_re_glove_rk_id = re.compile(r"^(.*)@\w+$")
|
|
93
93
|
|
|
94
94
|
def __init__(self, *args, **kw):
|
|
95
|
-
logger.debug(
|
|
95
|
+
logger.debug("Abstract target computer init %s", self.__class__)
|
|
96
96
|
super().__init__(*args, **kw)
|
|
97
97
|
self._actualconfig = self.userconfig
|
|
98
98
|
self._specialnodes = None
|
|
@@ -101,7 +101,7 @@ class Target(fp.FootprintBase):
|
|
|
101
101
|
|
|
102
102
|
@property
|
|
103
103
|
def realkind(self):
|
|
104
|
-
return
|
|
104
|
+
return "target"
|
|
105
105
|
|
|
106
106
|
@property
|
|
107
107
|
def config(self):
|
|
@@ -135,23 +135,35 @@ class Target(fp.FootprintBase):
|
|
|
135
135
|
The :meth:`get` method called whith ``key='sectionname:myoption'`` will
|
|
136
136
|
return 'operations'.
|
|
137
137
|
"""
|
|
138
|
-
my_glove_rk =
|
|
139
|
-
if
|
|
140
|
-
section, option = (x.strip() for x in key.split(
|
|
138
|
+
my_glove_rk = "@" + sessions.current().glove.realkind
|
|
139
|
+
if ":" in key:
|
|
140
|
+
section, option = (x.strip() for x in key.split(":", 1))
|
|
141
141
|
# Check if an override section exists
|
|
142
|
-
sections = [
|
|
143
|
-
|
|
142
|
+
sections = [
|
|
143
|
+
x
|
|
144
|
+
for x in (section + my_glove_rk, section)
|
|
145
|
+
if x in self.config.sections()
|
|
146
|
+
]
|
|
144
147
|
else:
|
|
145
148
|
option = key
|
|
146
149
|
# First look in override sections, then in default one
|
|
147
|
-
sections =
|
|
148
|
-
|
|
150
|
+
sections = [
|
|
151
|
+
s for s in self.config.sections() if s.endswith(my_glove_rk)
|
|
152
|
+
] + [
|
|
153
|
+
s
|
|
154
|
+
for s in self.config.sections()
|
|
155
|
+
if not self._re_glove_rk_id.match(s)
|
|
156
|
+
]
|
|
149
157
|
# Return the first matching section/option
|
|
150
|
-
for section in [
|
|
158
|
+
for section in [
|
|
159
|
+
x for x in sections if self.config.has_option(x, option)
|
|
160
|
+
]:
|
|
151
161
|
return self.config.get(section, option)
|
|
152
162
|
return default
|
|
153
163
|
|
|
154
|
-
def getx(
|
|
164
|
+
def getx(
|
|
165
|
+
self, key, default=None, env_key=None, silent=False, aslist=False
|
|
166
|
+
):
|
|
155
167
|
r"""Return a value from several sources.
|
|
156
168
|
|
|
157
169
|
In turn, the following sources are considered:
|
|
@@ -179,10 +191,12 @@ class Target(fp.FootprintBase):
|
|
|
179
191
|
value = None
|
|
180
192
|
|
|
181
193
|
if value is None:
|
|
182
|
-
if
|
|
194
|
+
if ":" not in key:
|
|
183
195
|
if silent:
|
|
184
196
|
return None
|
|
185
|
-
msg = 'Configuration key should be "section:option" not "{}"'.format(
|
|
197
|
+
msg = 'Configuration key should be "section:option" not "{}"'.format(
|
|
198
|
+
key
|
|
199
|
+
)
|
|
186
200
|
raise KeyError(msg)
|
|
187
201
|
value = self.get(key, default)
|
|
188
202
|
|
|
@@ -196,17 +210,28 @@ class Target(fp.FootprintBase):
|
|
|
196
210
|
raise KeyError(msg)
|
|
197
211
|
|
|
198
212
|
if aslist:
|
|
199
|
-
value =
|
|
213
|
+
value = (
|
|
214
|
+
value.replace("\n", " ")
|
|
215
|
+
.replace("\\", " ")
|
|
216
|
+
.replace(",", " ")
|
|
217
|
+
.split()
|
|
218
|
+
)
|
|
200
219
|
|
|
201
220
|
return value
|
|
202
221
|
|
|
203
222
|
def sections(self):
|
|
204
223
|
"""Returns the list of sections contained in the config file."""
|
|
205
|
-
my_glove_rk =
|
|
206
|
-
return sorted(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
224
|
+
my_glove_rk = "@" + sessions.current().glove.realkind
|
|
225
|
+
return sorted(
|
|
226
|
+
{
|
|
227
|
+
self._re_glove_rk_id.sub(r"\1", x)
|
|
228
|
+
for x in self.config.sections()
|
|
229
|
+
if (
|
|
230
|
+
(not self._re_glove_rk_id.match(x))
|
|
231
|
+
or x.endswith(my_glove_rk)
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
)
|
|
210
235
|
|
|
211
236
|
def options(self, key):
|
|
212
237
|
"""For a given section, returns the list of available options.
|
|
@@ -214,9 +239,10 @@ class Target(fp.FootprintBase):
|
|
|
214
239
|
The result may depend on the current glove (see the :meth:`get`
|
|
215
240
|
method documentation).
|
|
216
241
|
"""
|
|
217
|
-
my_glove_rk =
|
|
218
|
-
sections = [
|
|
219
|
-
|
|
242
|
+
my_glove_rk = "@" + sessions.current().glove.realkind
|
|
243
|
+
sections = [
|
|
244
|
+
x for x in (key, key + my_glove_rk) if x in self.config.sections()
|
|
245
|
+
]
|
|
220
246
|
options = set()
|
|
221
247
|
for section in sections:
|
|
222
248
|
options.update(self.config.options(section))
|
|
@@ -230,9 +256,12 @@ class Target(fp.FootprintBase):
|
|
|
230
256
|
"""
|
|
231
257
|
items = dict()
|
|
232
258
|
if key is not None:
|
|
233
|
-
my_glove_rk =
|
|
234
|
-
sections = [
|
|
235
|
-
|
|
259
|
+
my_glove_rk = "@" + sessions.current().glove.realkind
|
|
260
|
+
sections = [
|
|
261
|
+
x
|
|
262
|
+
for x in (key, key + my_glove_rk)
|
|
263
|
+
if x in self.config.sections()
|
|
264
|
+
]
|
|
236
265
|
for section in sections:
|
|
237
266
|
items.update(self.config.items(section))
|
|
238
267
|
return items
|
|
@@ -241,7 +270,7 @@ class Target(fp.FootprintBase):
|
|
|
241
270
|
def is_anonymous(cls):
|
|
242
271
|
"""Return a boolean either the current footprint define or not a mandatory set of hostname values."""
|
|
243
272
|
fp = cls.footprint_retrieve()
|
|
244
|
-
return not bool(fp.attr[
|
|
273
|
+
return not bool(fp.attr["hostname"]["values"])
|
|
245
274
|
|
|
246
275
|
def spawn_hook(self, sh):
|
|
247
276
|
"""Specific target hook before any serious execution."""
|
|
@@ -252,7 +281,12 @@ class Target(fp.FootprintBase):
|
|
|
252
281
|
"""Specific target hook before any component run."""
|
|
253
282
|
yield
|
|
254
283
|
|
|
255
|
-
def _init_supernodes(
|
|
284
|
+
def _init_supernodes(
|
|
285
|
+
self,
|
|
286
|
+
main_re,
|
|
287
|
+
rangeid="range",
|
|
288
|
+
baseid="base",
|
|
289
|
+
):
|
|
256
290
|
"""Read the configuration file in order to initialize the specialnodes
|
|
257
291
|
and specialproxies lists.
|
|
258
292
|
|
|
@@ -261,40 +295,55 @@ class Target(fp.FootprintBase):
|
|
|
261
295
|
*generic_nodes* keyword. In such a case, the node list will be
|
|
262
296
|
auto-generated using the XXXrange and XXXbase configuration keys.
|
|
263
297
|
"""
|
|
264
|
-
confsection =
|
|
298
|
+
confsection = "generic_nodes"
|
|
265
299
|
confoptions = self.options(confsection)
|
|
266
|
-
nodetypes = [
|
|
267
|
-
|
|
268
|
-
|
|
300
|
+
nodetypes = [
|
|
301
|
+
(m.group(1), m.group(2))
|
|
302
|
+
for m in [main_re.match(k) for k in confoptions]
|
|
303
|
+
if m is not None
|
|
304
|
+
]
|
|
269
305
|
outdict = dict()
|
|
270
306
|
for nodetype, nodelistid in nodetypes:
|
|
271
|
-
nodelist = self.get(confsection +
|
|
272
|
-
if nodelist ==
|
|
273
|
-
noderanges = self.get(
|
|
307
|
+
nodelist = self.get(confsection + ":" + nodetype + nodelistid)
|
|
308
|
+
if nodelist == "no_generic":
|
|
309
|
+
noderanges = self.get(
|
|
310
|
+
confsection + ":" + nodetype + rangeid, None
|
|
311
|
+
)
|
|
274
312
|
if noderanges is None:
|
|
275
|
-
raise ValueError(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
313
|
+
raise ValueError(
|
|
314
|
+
"when {0:s}{1:s} == no_generic, {0:s}{2:s} must be provided".format(
|
|
315
|
+
nodetype, nodelistid, rangeid
|
|
316
|
+
)
|
|
317
|
+
)
|
|
318
|
+
nodebases = self.get(
|
|
319
|
+
confsection + ":" + nodetype + baseid,
|
|
320
|
+
self.inetname + nodetype + "{:d}",
|
|
321
|
+
)
|
|
279
322
|
outdict[nodetype] = list()
|
|
280
|
-
for
|
|
281
|
-
outdict[nodetype].extend(
|
|
323
|
+
for r, b in zip(noderanges.split("+"), nodebases.split("+")):
|
|
324
|
+
outdict[nodetype].extend(
|
|
325
|
+
[b.format(int(i)) for i in r.split(",")]
|
|
326
|
+
)
|
|
282
327
|
else:
|
|
283
|
-
outdict[nodetype] = nodelist.split(
|
|
328
|
+
outdict[nodetype] = nodelist.split(",")
|
|
284
329
|
return outdict
|
|
285
330
|
|
|
286
331
|
@property
|
|
287
332
|
def specialnodesaliases(self):
|
|
288
333
|
"""Return the list of known aliases."""
|
|
289
334
|
if self._sepcialnodesaliases is None:
|
|
290
|
-
confsection =
|
|
335
|
+
confsection = "generic_nodes"
|
|
291
336
|
confoptions = self.options(confsection)
|
|
292
|
-
aliases_re = re.compile(r
|
|
293
|
-
nodetypes = [
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
337
|
+
aliases_re = re.compile(r"(\w+)(aliases)")
|
|
338
|
+
nodetypes = [
|
|
339
|
+
(m.group(1), m.group(2))
|
|
340
|
+
for m in [aliases_re.match(k) for k in confoptions]
|
|
341
|
+
if m is not None
|
|
342
|
+
]
|
|
343
|
+
rdict = {
|
|
344
|
+
ntype: self.get(confsection + ":" + ntype + key, "").split(",")
|
|
345
|
+
for ntype, key in nodetypes
|
|
346
|
+
}
|
|
298
347
|
self._sepcialnodesaliases = rdict
|
|
299
348
|
return self._sepcialnodesaliases
|
|
300
349
|
|
|
@@ -320,7 +369,9 @@ class Target(fp.FootprintBase):
|
|
|
320
369
|
equal to the specialnodes list.
|
|
321
370
|
"""
|
|
322
371
|
if self._specialproxies is None:
|
|
323
|
-
self._specialproxies = self._init_supernodes(
|
|
372
|
+
self._specialproxies = self._init_supernodes(
|
|
373
|
+
self._re_proxies_property, "proxiesrange", "proxiesbase"
|
|
374
|
+
)
|
|
324
375
|
for nodetype, nodelist in self.specialnodes.items():
|
|
325
376
|
if nodetype not in self._specialproxies:
|
|
326
377
|
self._specialproxies[nodetype] = nodelist
|
|
@@ -346,39 +397,44 @@ class Target(fp.FootprintBase):
|
|
|
346
397
|
"""
|
|
347
398
|
kmatch = self._re_nodes_property.match(key)
|
|
348
399
|
if kmatch is not None:
|
|
349
|
-
return fp.stdtypes.FPList(
|
|
400
|
+
return fp.stdtypes.FPList(
|
|
401
|
+
self.specialnodes.get(kmatch.group(1), [])
|
|
402
|
+
)
|
|
350
403
|
kmatch = self._re_proxies_property.match(key)
|
|
351
404
|
if kmatch is not None:
|
|
352
|
-
return fp.stdtypes.FPList(
|
|
405
|
+
return fp.stdtypes.FPList(
|
|
406
|
+
self.specialproxies.get(kmatch.group(1), [])
|
|
407
|
+
)
|
|
353
408
|
kmatch = self._re_isnode_property.match(key)
|
|
354
409
|
if kmatch is not None:
|
|
355
|
-
return (
|
|
356
|
-
|
|
357
|
-
|
|
410
|
+
return (kmatch.group(1) not in self.specialnodes) or any(
|
|
411
|
+
[
|
|
412
|
+
self.hostname.startswith(s)
|
|
413
|
+
for s in self.specialnodes[kmatch.group(1)]
|
|
414
|
+
]
|
|
415
|
+
)
|
|
358
416
|
raise AttributeError('The key "{:s}" does not exist.'.format(key))
|
|
359
417
|
|
|
360
418
|
@property
|
|
361
419
|
def ftraw_default(self):
|
|
362
420
|
"""The default value for the System object ftraw attribute."""
|
|
363
|
-
return
|
|
364
|
-
|
|
365
|
-
|
|
421
|
+
return "ftraw" in self.specialnodes and any(
|
|
422
|
+
[self.hostname.startswith(s) for s in self.specialnodes["ftraw"]]
|
|
423
|
+
)
|
|
366
424
|
|
|
367
425
|
|
|
368
426
|
class LocalTarget(Target):
|
|
369
427
|
"""A very generic class usable for most computers."""
|
|
370
428
|
|
|
371
429
|
_footprint = dict(
|
|
372
|
-
info
|
|
373
|
-
attr
|
|
374
|
-
sysname
|
|
375
|
-
|
|
376
|
-
),
|
|
377
|
-
)
|
|
430
|
+
info="Nice local target",
|
|
431
|
+
attr=dict(
|
|
432
|
+
sysname=dict(values=["Linux", "Darwin", "Local", "Localhost"]),
|
|
433
|
+
),
|
|
378
434
|
)
|
|
379
435
|
|
|
380
436
|
|
|
381
437
|
# Disable priority warnings on the target collector
|
|
382
|
-
fcollect = fp.collectors.get(tag=
|
|
438
|
+
fcollect = fp.collectors.get(tag="target")
|
|
383
439
|
fcollect.non_ambiguous_loglevel = logging.DEBUG
|
|
384
440
|
del fcollect
|
vortex/util/__init__.py
CHANGED