Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
collectd: write config file from Jinja2 template
[yardstick.git]
/
yardstick
/
network_services
/
vnf_generic
/
vnf
/
base.py
diff --git
a/yardstick/network_services/vnf_generic/vnf/base.py
b/yardstick/network_services/vnf_generic/vnf/base.py
index
42e3d2a
..
56c57a9
100644
(file)
--- a/
yardstick/network_services/vnf_generic/vnf/base.py
+++ b/
yardstick/network_services/vnf_generic/vnf/base.py
@@
-106,15
+106,18
@@
class VnfdHelper(dict):
if int(virtual_intf['dpdk_port_num']) == port:
return interface
if int(virtual_intf['dpdk_port_num']) == port:
return interface
- def port_num(self,
name
):
+ def port_num(self,
port
):
# we need interface name -> DPDK port num (PMD ID) -> LINK ID
# LINK ID -> PMD ID is governed by the port mask
"""
:rtype: int
# we need interface name -> DPDK port num (PMD ID) -> LINK ID
# LINK ID -> PMD ID is governed by the port mask
"""
:rtype: int
- :type
name
: str
+ :type
port
: str
"""
"""
- intf = self.find_interface(name=name)
+ if isinstance(port, dict):
+ intf = port
+ else:
+ intf = self.find_interface(name=port)
return int(intf["virtual-interface"]["dpdk_port_num"])
def port_nums(self, intfs):
return int(intf["virtual-interface"]["dpdk_port_num"])
def port_nums(self, intfs):