-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
175 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/python3 | ||
"""DASH generator for ENI ROUTE""" | ||
|
||
import os | ||
import sys | ||
|
||
from dpugen.confbase import ConfBase | ||
from dpugen.confutils import common_main | ||
|
||
|
||
class EniRoute(ConfBase): | ||
|
||
def __init__(self, params={}): | ||
super().__init__(params) | ||
self.num_yields = 0 | ||
|
||
def items(self): | ||
print(' Generating %s ...' % os.path.basename(__file__), file=sys.stderr) | ||
p = self.params | ||
ip_int = self.cooked_params | ||
|
||
for eni_index, eni in enumerate(range(p.ENI_START, p.ENI_START + p.ENI_COUNT * p.ENI_STEP, p.ENI_STEP)): # Per ENI | ||
self.num_yields += 1 | ||
yield { | ||
'DASH_ENI_ROUTE_TABLE:eni-%d' % eni: { | ||
"group_id": 'route-group-%d' % eni | ||
}, | ||
"OP": "SET" | ||
} | ||
|
||
|
||
if __name__ == '__main__': | ||
conf = EniRoute() | ||
common_main(conf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/python3 | ||
"""DASH generator for QOS""" | ||
|
||
import os | ||
import sys | ||
|
||
from dpugen.confbase import ConfBase | ||
from dpugen.confutils import common_main | ||
|
||
|
||
class Qos(ConfBase): | ||
|
||
def __init__(self, params={}): | ||
super().__init__(params) | ||
self.num_yields = 0 | ||
|
||
def items(self): | ||
print(' Generating %s ...' % os.path.basename(__file__), file=sys.stderr) | ||
p = self.params | ||
ip_int = self.cooked_params | ||
|
||
for eni_index, eni in enumerate(range(p.ENI_START, p.ENI_START + p.ENI_COUNT * p.ENI_STEP, p.ENI_STEP)): # Per ENI | ||
self.num_yields += 1 | ||
yield { | ||
'DASH_QOS_TABLE:qos-%d' % eni: { | ||
'qos_id': 'qos-%d' % eni, | ||
"bw": 0, | ||
"cps": 0, | ||
"flows": 0 | ||
}, | ||
'OP': 'SET' | ||
} | ||
|
||
if __name__ == '__main__': | ||
conf = Qos() | ||
common_main(conf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/python3 | ||
"""DASH generator for ROUTE GROUP""" | ||
|
||
import os | ||
import sys | ||
|
||
from dpugen.confbase import ConfBase | ||
from dpugen.confutils import common_main | ||
from dpugen.confutils import create_uuid_from_string | ||
|
||
|
||
class RouteGroup(ConfBase): | ||
|
||
def __init__(self, params={}): | ||
super().__init__(params) | ||
self.num_yields = 0 | ||
|
||
def items(self): | ||
print(' Generating %s ...' % os.path.basename(__file__), file=sys.stderr) | ||
p = self.params | ||
ip_int = self.cooked_params | ||
|
||
for eni_index, eni in enumerate(range(p.ENI_START, p.ENI_START + p.ENI_COUNT * p.ENI_STEP, p.ENI_STEP)): # Per ENI | ||
route_group_name = 'route-group-%d' % eni | ||
self.num_yields += 1 | ||
yield { | ||
"DASH_ROUTE_GROUP_TABLE:%s" % route_group_name : { | ||
"guid": create_uuid_from_string(route_group_name), | ||
"version":"1" | ||
}, | ||
"OP": "SET" | ||
} | ||
|
||
|
||
if __name__ == '__main__': | ||
conf = RouteGroup() | ||
common_main(conf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters