Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flamenco-worker-python
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
blender
flamenco-worker-python
Commits
41e5414f
Commit
41e5414f
authored
12 years ago
by
fsiddi
Browse files
Options
Downloads
Patches
Plain Diff
Added some code documentation for the set_client_attribute function
parent
b5b1ed97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
master.py
+12
-3
12 additions, 3 deletions
master.py
with
12 additions
and
3 deletions
master.py
+
12
−
3
View file @
41e5414f
...
@@ -70,18 +70,27 @@ def client_select(key, value):
...
@@ -70,18 +70,27 @@ def client_select(key, value):
# we only return the first match, maybe this is not ideal
# we only return the first match, maybe this is not ideal
return
client
return
client
else
:
else
:
print
(
"
n
o such client exists
"
)
print
(
"
[Warning] N
o such client exists
"
)
return
False
return
False
d_print
(
"
[Warning] No client
found
"
)
d_print
(
"
[Warning] No client
is avalialbe in the list
"
)
return
False
return
False
def
set_client_attribute
(
*
attributes
):
def
set_client_attribute
(
*
attributes
):
"""
Set attributes of a connected client
"""
Set attributes of a connected client
This function accepts tuples as arguments. At the moment only two tuples
are supported as input. See an example here:
set_client_attribute((
'
__status
'
,
'
disabled
'
), (
'
__status
'
,
'
enabled
'
))
set_client_attribute((
'
__status
'
,
'
disabled
'
), (
'
__status
'
,
'
enabled
'
))
set_client_attribute((
'
__hostname
'
, command[1]), (
'
__status
'
,
'
disabled
'
))
set_client_attribute((
'
__hostname
'
, command[1]), (
'
__status
'
,
'
disabled
'
))
The first tuple is used for selecting one (and in the future more) clients
from the clients_list and the second one sets the attributes to the
selected client.
Tis function makes use of the client_select function above and is limited
by its functionality.
"""
"""
selection_attribute
=
attributes
[
0
]
selection_attribute
=
attributes
[
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