Added support for mplsBoS in mpls table stats
diff --git a/cli/cli/c_actions.py b/cli/cli/c_actions.py
index d38e635..ad709f4 100755
--- a/cli/cli/c_actions.py
+++ b/cli/cli/c_actions.py
@@ -2029,9 +2029,11 @@
match = ipTableEntry['match']
mplsTc = '*'
mplsLabel = '*'
+ mplsBos = '*'
if match :
mplsTc = match.get('mplsTc') if match.get('mplsTc') else '*'
mplsLabel = match.get('mplsLabel') if match.get('mplsLabel') else '*'
+ mplsBos = match.get('mplsBos') if match.get('mplsBos') else '*'
instructions = ipTableEntry['instructions']
#raise error.ArgumentValidationError('\n\n\n %s' %len(actions))
actions = str(instructions[0])if instructions[0] else None
@@ -2044,6 +2046,7 @@
'priority' : ipTableEntry['priority'],
'mplsTc' : mplsTc,
'mplsLabel' : mplsLabel,
+ 'mplsBos' : mplsBos,
'durationSeconds' : ipTableEntry['durationSec'],
'actions' : actions
})
@@ -2055,6 +2058,7 @@
networkSource = '*'
mplsTc = '*'
mplsLabel = '*'
+ mplsBos = '*'
transportDestination = '*'
inputPort = '*'
transportSource = '*'
@@ -2073,6 +2077,7 @@
dataLayerSource = match.get('dataLayerSource') if match.get('dataLayerSource') else '*'
dataLayerDestination = match.get('dataLayerDestination') if match.get('dataLayerDestination') else '*'
dataLayerType= match.get('dataLayerType') if match.get('dataLayerType') else '*'
+ mplsBos = match.get('mplsBos') if match.get('mplsBos') else '*'
instructions = ipTableEntry['instructions']
actions = str(instructions[0])if instructions[0] else None
actions = format_actions(actions)
@@ -2092,6 +2097,7 @@
'dataLayerDestination' : dataLayerDestination,
'mplsTc' : mplsTc,
'mplsLabel' : mplsLabel,
+ 'mplsBos' : mplsBos,
'transportDestination' : transportDestination,
'transportSource' : transportSource,
'actions' : actions
diff --git a/cli/cli/desc/version200/core.py b/cli/cli/desc/version200/core.py
index 15ab705..0973daf 100755
--- a/cli/cli/desc/version200/core.py
+++ b/cli/cli/desc/version200/core.py
@@ -1945,29 +1945,29 @@
'default' : [
'Idx', 'cookie', 'priority',
'byteCount', 'packetCount',
- 'mplsLabel','mplsBoS','mplsTc',
+ 'mplsLabel','mplsBos','mplsTc',
'flow-brief', 'actions'
],
'scoped' : [
'Idx', 'byteCount', 'packetCount', 'durationSeconds',
'cookie', 'priority',
- 'mplsLabel','mplsBoS','mplsTc','actions'
+ 'mplsLabel','mplsBos','mplsTc','actions'
],
'brief' : [ 'Idx', 'byteCount', 'packetCount', 'durationSeconds',
'cookie','priority',
- 'mplsLabel','mplsBoS','mplsTc','actions'
+ 'mplsLabel','mplsBos','mplsTc','actions'
],
'default' : [ 'Idx', 'byteCount', 'packetCount', 'durationSeconds',
'cookie','priority',
- 'mplsLabel','mplsBoS','mplsTc','actions'
+ 'mplsLabel','mplsBos','mplsTc','actions'
],
'scoped' : [ 'Idx', 'byteCount', 'packetCount', 'durationSeconds',
'cookie','priority',
- 'mplsLabel','mplsBoS','mplsTc','actions'
+ 'mplsLabel','mplsBos','mplsTc','actions'
],
'details' : [ 'Idx', 'byteCount', 'packetCount', 'durationSeconds',
'cookie','priority',
- 'mplsLabel','mplsBoS','mplsTc','actions'
+ 'mplsLabel','mplsBos','mplsTc','actions'
],
#'vns_flow': [ 'Idx', 'dataLayerSource', 'dataLayerDestination', 'dataLayerVirtualLan', 'dataLayerType'],
#'summary' : [ 'Idx', 'vnsName', 'vnsFlowCnt', 'flowEntryCnt'],
@@ -2059,7 +2059,8 @@
},
'mplsLabel' : { 'verbose-name' : 'MPLS_Label'
},
-
+ 'mplsBos' : { 'verbose-name' : 'MPLS_BOS'
+ },
}
},
}
@@ -2074,32 +2075,32 @@
'Idx', 'cookie', 'priority'
'byteCount', 'packetCount',
'dataLayerSource', 'dataLayerDestination',
- 'flow-brief','mplsLabel','mplsBoS','mplsTc','actions'
+ 'flow-brief','mplsLabel','mplsBos','mplsTc','actions'
],
'scoped' : [
'Idx', 'cookie', 'priority',
'byteCount', 'packetCount',
- 'dataLayerSource', 'dataLayerDestination','mplsLabel','mplsBoS','mplsTc'
+ 'dataLayerSource', 'dataLayerDestination','mplsLabel','mplsBos','mplsTc'
'flow-brief','actions'
],
'brief' : [ 'Idx', 'cookie','priority', 'dataLayerSource', 'dataLayerDestination',
'networkSource', 'networkDestination', 'networkProtocol',
- 'transportSource', 'transportDestination','mplsLabel','mplsBoS','mplsTc','actions'],
+ 'transportSource', 'transportDestination','mplsLabel','mplsBos','mplsTc','actions'],
'default' : [ 'Idx','byteCount', 'packetCount', 'durationSeconds',
'cookie','priority', 'inputPort', 'dataLayerSource', 'dataLayerDestination',
'dataLayerType', 'networkSource', 'networkDestination', 'networkProtocol',
- 'transportSource', 'transportDestination''mplsLabel','mplsBoS','mplsTc', 'actions'],
+ 'transportSource', 'transportDestination''mplsLabel','mplsBos','mplsTc', 'actions'],
'scoped' : [ 'Idx','byteCount', 'packetCount', 'durationSeconds',
'cookie','priority', 'inputPort', 'dataLayerSource', 'dataLayerDestination',
'dataLayerType', 'networkSource', 'networkDestination', 'networkProtocol',
- 'transportSource', 'transportDestination','mplsLabel','mplsBoS','mplsTc','actions'],
+ 'transportSource', 'transportDestination','mplsLabel','mplsBos','mplsTc','actions'],
'details' : [ 'Idx','byteCount', 'packetCount', 'durationSeconds',
'cookie', 'priority','hardTimeout', 'idleTimeout', 'priority', 'tableId', 'inputPort',
'dataLayerSource', 'dataLayerDestination', 'dataLayerType', 'dataLayerVirtualLan',
'dataLayerVirtualLanPriorityCodePoint', 'networkSource', 'networkDestination',
'networkProtocol', 'transportSource', 'transportDestination',
- 'networkTypeOfService','mplsLabel','mplsBoS','mplsTc', 'actions'],
+ 'networkTypeOfService','mplsLabel','mplsBos','mplsTc', 'actions'],
#'vns_flow': [ 'Idx', 'dataLayerSource', 'dataLayerDestination', 'dataLayerVirtualLan', 'dataLayerType'],
#'summary' : [ 'Idx', 'vnsName', 'vnsFlowCnt', 'flowEntryCnt'],
},
@@ -2190,6 +2191,8 @@
},
'mplsLabel' : { 'verbose-name' : 'MPLS_LABEL'
},
+ 'mplsBos' : { 'verbose-name' : 'MPLS_BOS'
+ },
}
},
}
diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
index 3416382..e2d7f8e 100644
--- a/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
+++ b/src/main/java/net/floodlightcontroller/core/web/serializers/OFFlowStatsEntryModSerializer.java
@@ -85,6 +85,9 @@
else if (matchGeneric.getMatchField().id == MatchFields.MPLS_TC){
jGen.writeNumberField("mplsTc", Integer.decode(matchGeneric.getValue().toString()));
}
+ else if (matchGeneric.getMatchField().id == MatchFields.MPLS_BOS){
+ jGen.writeStringField("mplsBos", "True");
+ }
else if (matchGeneric.getMatchField().id == MatchFields.MPLS_LABEL){
jGen.writeNumberField("mplsLabel", Integer.decode(matchGeneric.getValue().toString()));
}