Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dm-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hammonds
dm-docs
Commits
e674de62
Commit
e674de62
authored
9 years ago
by
sveseli
Browse files
Options
Downloads
Patches
Plain Diff
allow arbitrary key-value pairs to be passed to daq service and to processing plugins
parent
09b8150a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/python/dm/daq_web_service/cli/startDaqCli.py
+7
-3
7 additions, 3 deletions
src/python/dm/daq_web_service/cli/startDaqCli.py
src/python/dm/daq_web_service/cli/uploadCli.py
+6
-2
6 additions, 2 deletions
src/python/dm/daq_web_service/cli/uploadCli.py
with
13 additions
and
5 deletions
src/python/dm/daq_web_service/cli/startDaqCli.py
+
7
−
3
View file @
e674de62
...
...
@@ -6,7 +6,7 @@ from daqWebServiceSessionCli import DaqWebServiceSessionCli
class
StartDaqCli
(
DaqWebServiceSessionCli
):
def
__init__
(
self
):
DaqWebServiceSessionCli
.
__init__
(
self
)
DaqWebServiceSessionCli
.
__init__
(
self
,
validArgCount
=
self
.
ANY_NUMBER_OF_POSITIONAL_ARGS
)
self
.
addOption
(
''
,
'
--experiment
'
,
dest
=
'
experimentName
'
,
help
=
'
Experiment name.
'
)
self
.
addOption
(
''
,
'
--data-directory
'
,
dest
=
'
dataDirectory
'
,
help
=
'
Experiment data directory.
'
)
...
...
@@ -25,13 +25,17 @@ class StartDaqCli(DaqWebServiceSessionCli):
def
runCommand
(
self
):
self
.
parseArgs
(
usage
=
"""
dm-start-daq --experiment=EXPERIMENTNAME --data-directory=DATADIRECTORY
[key1:value1, key2:value2, ...]
Description:
Starts DAQ for a given experiment. Provided data directory will be monitored for data files.
Starts DAQ for a given experiment. Specified data directory will be
monitored for data files. All provided key/value pairs will be passed to
file processing plugins.
"""
)
self
.
checkArgs
()
api
=
ExperimentRestApi
(
self
.
getLoginUsername
(),
self
.
getLoginPassword
(),
self
.
getServiceHost
(),
self
.
getServicePort
(),
self
.
getServiceProtocol
())
experiment
=
api
.
startDaq
(
self
.
getExperimentName
(),
self
.
getDataDirectory
())
daqInfo
=
self
.
splitArgsIntoDict
()
experiment
=
api
.
startDaq
(
self
.
getExperimentName
(),
self
.
getDataDirectory
(),
daqInfo
=
daqInfo
)
print
experiment
.
getDisplayString
(
self
.
getDisplayKeys
(),
self
.
getDisplayFormat
())
#######################################################################
...
...
This diff is collapsed.
Click to expand it.
src/python/dm/daq_web_service/cli/uploadCli.py
+
6
−
2
View file @
e674de62
...
...
@@ -6,7 +6,7 @@ from dm.common.exceptions.invalidRequest import InvalidRequest
class
UploadCli
(
DaqWebServiceSessionCli
):
def
__init__
(
self
):
DaqWebServiceSessionCli
.
__init__
(
self
)
DaqWebServiceSessionCli
.
__init__
(
self
,
validArgCount
=
self
.
ANY_NUMBER_OF_POSITIONAL_ARGS
)
self
.
addOption
(
''
,
'
--experiment
'
,
dest
=
'
experimentName
'
,
help
=
'
Experiment name.
'
)
self
.
addOption
(
''
,
'
--data-directory
'
,
dest
=
'
dataDirectory
'
,
help
=
'
Experiment data directory.
'
)
...
...
@@ -25,9 +25,13 @@ class UploadCli(DaqWebServiceSessionCli):
def
runCommand
(
self
):
self
.
parseArgs
(
usage
=
"""
dm-upload --experiment=EXPERIMENTNAME --data-directory=DATADIRECTORY
[key1:value1, key2:value2, ...]
Description:
Schedules data upload for a given experiment.
Schedules data upload for a given experiment. All existing files in the
specified directory will be uploaded to storage. Relative directory
structure will be preserved. All provided key/value pairs will be passed
to file processing plugins.
"""
)
self
.
checkArgs
()
api
=
ExperimentRestApi
(
self
.
getLoginUsername
(),
self
.
getLoginPassword
(),
self
.
getServiceHost
(),
self
.
getServicePort
(),
self
.
getServiceProtocol
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment