Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FofbTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container 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
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
FOFB
FofbTool
Commits
4a037c02
Commit
4a037c02
authored
6 months ago
by
System User
Browse files
Options
Downloads
Patches
Plain Diff
COM GBE: make script generic
parent
640d6f57
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
FofbTool/Configuration.py
+9
-8
9 additions, 8 deletions
FofbTool/Configuration.py
FofbTool/Operation.py
+11
-14
11 additions, 14 deletions
FofbTool/Operation.py
with
20 additions
and
22 deletions
FofbTool/Configuration.py
+
9
−
8
View file @
4a037c02
...
...
@@ -114,7 +114,7 @@ def cellnode_configure_comlbp(node_tangopath, seqoffset=0):
def
centralnode_configure_comgbe
(
node_tangopath
,
npsc
):
"""
Configure the ComGBE
Automatically set the number of
bpm/
psc packets and MAC length.
Automatically set the number of psc packets and MAC length.
PARAMETERS
----------
...
...
@@ -122,7 +122,8 @@ def centralnode_configure_comgbe(node_tangopath, npsc):
The target fofbnode tango path, ie
'
ans/dg/fofb-centralnode
'
npsc:
Number of total PSC, hence the number of expected PSC packets.
ncomGBE:
Number of GBE communication link for PSC
RETURN
------
success: boolean
...
...
@@ -140,13 +141,13 @@ def centralnode_configure_comgbe(node_tangopath, npsc):
#logger.debug("{} bpm allowed in the ethernet frame on {}".format(nbpm, node_tangopath))
logger
.
debug
(
"
{} psc expected in the ethernet frame on {}
"
.
format
(
npsc
,
node_tangopath
))
logger
.
debug
(
"
Configure packeter npackets to {}
"
.
format
(
npsc
-
1
))
prx
[
"
ccnpack4_npackets
"
]
=
npsc
-
1
for
n
in
range
(
1
):
prx
[
"
ccnpacketh{}_npackets
"
.
format
(
n
)]
=
npsc
-
1
maclen
=
npsc
*
6
+
10
logger
.
debug
(
"
Configure packeter framesize (mac length) to {}
"
.
format
(
maclen
))
prx
[
"
ccnpack
4
_framesize
"
]
=
maclen
prx
[
"
ccnpack
eth{}
_framesize
"
.
format
(
n
)
]
=
maclen
logger
.
info
(
"
Configuration of Com GBE done on {}.
"
.
format
(
node_tangopath
))
return
True
...
...
This diff is collapsed.
Click to expand it.
FofbTool/Operation.py
+
11
−
14
View file @
4a037c02
...
...
@@ -319,9 +319,8 @@ def reset_gbe(node_tangopath, ccnif=[]):
logger
.
error
(
"
Failed to obtain tango proxy or to ping to {}
"
.
format
(
node_tangopath
))
return
False
logger
.
debug
(
"
in reset
"
)
ccnif
=
[
0
]
if
len
(
ccnif
)
==
0
:
ccnif
=
[
O
]
ccnif
=
[
int
(
a
[
6
])
for
a
in
prx
.
get_attribute_list
()
if
"
gigeth
"
in
a
if
"
reset
"
in
a
]
logger
.
info
(
"
Reset GBE on {}
"
.
format
(
node_tangopath
))
for
n
in
ccnif
:
prx
[
"
gigeth{}_reset
"
.
format
(
n
)]
=
1
...
...
@@ -360,15 +359,15 @@ def start_gbe(node_tangopath, ccnif=[]):
logger
.
error
(
"
Failed to obtain tango proxy or to ping to {}
"
.
format
(
node_tangopath
))
return
False
if
len
(
ccnif
)
==
0
:
ccnif
=
[
4
]
ccnif
=
[
4
]
ccnif
=
[
int
(
a
[
10
])
for
a
in
prx
.
get_attribute_list
()
if
"
ccnpacketh
"
in
a
if
"
control
"
in
a
]
logger
.
info
(
"
Reset GBE on {}
"
.
format
(
node_tangopath
))
logger
.
info
(
"
Starting GBE on {}
"
.
format
(
node_tangopath
))
ack_gbe
(
node_tangopath
,
ccnif
)
for
n
in
ccnif
:
if
'
central
'
in
node_tangopath
:
prx
[
"
ccnpack{}_control
"
.
format
(
n
)]
=
1
prx
[
"
ccnpack
eth
{}_control
"
.
format
(
n
)]
=
1
else
:
pass
...
...
@@ -400,16 +399,15 @@ def ack_gbe(node_tangopath, ccnif=[]):
return
False
if
len
(
ccnif
)
==
0
:
ccnif
=
[
4
]
ccnif
=
[
4
]
ccnif
=
[
int
(
a
[
10
])
for
a
in
prx
.
get_attribute_list
()
if
"
ccnpacketh
"
in
a
if
"
control
"
in
a
]
logger
.
info
(
"
Ack GBE error on {}
"
.
format
(
node_tangopath
))
for
n
in
ccnif
:
prx
[
"
ccnpack{}_reset_error
"
.
format
(
n
)]
=
1
prx
[
"
ccnpack
eth
{}_reset_error
"
.
format
(
n
)]
=
1
time
.
sleep
(
1
)
for
n
in
ccnif
:
prx
[
"
ccnpack{}_reset_error
"
.
format
(
n
)]
=
0
prx
[
"
ccnpack
eth
{}_reset_error
"
.
format
(
n
)]
=
0
logger
.
info
(
"
ACK GBE error on {} done
"
.
format
(
node_tangopath
))
return
True
...
...
@@ -424,7 +422,6 @@ def stop_gbe(node_tangopath, ccnif=[]):
The target fofbnode tango path, ie
'
ans/dg/fofb-centralenode
'
ccnif: list(int)
First only one node
List of the interface to stop. If empty, all the possible interface will be stopped.
RETURNS
...
...
@@ -438,13 +435,13 @@ def stop_gbe(node_tangopath, ccnif=[]):
except
tango
.
DevFailed
:
logger
.
error
(
"
Failed to obtain tango proxy or to ping to {}
"
.
format
(
node_tangopath
))
return
False
ccnif
=
[
4
]
if
len
(
ccnif
)
==
0
:
ccnif
=
[
4
]
ccnif
=
[
int
(
a
[
10
])
for
a
in
prx
.
get_attribute_list
()
if
"
ccnpacketh
"
in
a
if
"
control
"
in
a
]
logger
.
info
(
"
Ack GBE error on {}
"
.
format
(
node_tangopath
))
logger
.
info
(
"
Stopping GBE com on {}
"
.
format
(
node_tangopath
))
for
n
in
ccnif
:
if
'
central
'
in
node_tangopath
:
prx
[
"
ccnpack{}_control
"
.
format
(
n
)]
=
False
prx
[
"
ccnpack
eth
{}_control
"
.
format
(
n
)]
=
False
return
True
###################################################################################################
...
...
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