Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Command line client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EOLE
Zéphir
Command line client
Commits
ecb7c01a
Commit
ecb7c01a
authored
5 years ago
by
gwenael remond
Committed by
Lionel Morin
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
348 option batch ok
parent
46b3b3be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zephir-client
+32
-14
32 additions, 14 deletions
zephir-client
with
32 additions
and
14 deletions
zephir-client
+
32
−
14
View file @
ecb7c01a
...
...
@@ -17,10 +17,16 @@ def main():
OUTPUT
=
'
yaml
'
list_msgs
=
0
prettyjson
=
2
no_msg
=
False
if
'
--json
'
in
sys
.
argv
:
OUTPUT
=
'
json
'
sys
.
argv
.
remove
(
'
--json
'
)
if
'
--batch
'
in
sys
.
argv
:
no_msg
=
True
sys
.
argv
.
remove
(
'
--batch
'
)
if
'
--no-pretty
'
in
sys
.
argv
:
prettyjson
=
None
...
...
@@ -99,20 +105,28 @@ def main():
Utiliser <
{
progname
}
list> pour lister les commandes disponibles.
\n
"""
)
sys
.
exit
(
0
)
# ask for missing parameters
for
key
in
config
.
value
.
mandatory
():
if
not
config
.
option
(
key
).
option
.
issymlinkoption
():
val_ok
=
False
while
not
val_ok
:
text
=
input
(
"
*
"
+
config
.
option
(
key
).
option
.
doc
()
+
"
:
"
)
try
:
if
config
.
option
(
key
).
option
.
type
()
==
'
integer
'
:
config
.
option
(
key
).
value
.
set
(
int
(
text
))
else
:
config
.
option
(
key
).
value
.
set
(
text
)
val_ok
=
True
except
Exception
as
err
:
print
(
'
\n
Valeur invalide: {}
\n
'
.
format
(
err
))
result
=
send
(
URL
,
VERSION
,
config
)
if
not
no_msg
:
for
key
in
config
.
value
.
mandatory
():
if
not
config
.
option
(
key
).
option
.
issymlinkoption
():
val_ok
=
False
while
not
val_ok
:
text
=
input
(
"
*
"
+
config
.
option
(
key
).
option
.
doc
()
+
"
:
"
)
try
:
if
config
.
option
(
key
).
option
.
type
()
==
'
integer
'
:
config
.
option
(
key
).
value
.
set
(
int
(
text
))
else
:
config
.
option
(
key
).
value
.
set
(
text
)
val_ok
=
True
except
Exception
as
err
:
print
(
'
\n
Valeur invalide: {}
\n
'
.
format
(
err
))
result
=
send
(
URL
,
VERSION
,
config
)
else
:
result
=
send
(
URL
,
VERSION
,
config
)
if
"
Erreur
"
in
result
:
print
(
"
ERREUR: paramètres requis manquants.
"
)
print
(
"
Les paramètres nécessaires sont :
"
+
"
,
"
.
join
((
key
for
key
in
config
.
value
.
mandatory
()
if
not
config
.
option
(
key
).
option
.
issymlinkoption
())))
sys
.
exit
(
1
)
if
OUTPUT
==
"
yaml
"
:
print
(
yaml
.
dump
(
result
,
default_flow_style
=
False
,
allow_unicode
=
True
))
else
:
...
...
@@ -146,6 +160,10 @@ Client pour interroger un serveur Zéphir.
--no-pretty
Affiche le résultat json brut
{
progname
}
--batch <message> [paramètres]
Execute le message avec ses paramètres, en mode batch
"""
)
sys
.
exit
(
0
)
...
...
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