- nodeKey = ( child.localName ).encode( 'utf-8', 'ignore' )
- if nodeKey != 'order' :
- if nodeKey != 'drop-action' :
- new_act = child.ownerDocument.createElement( 'drop-action' )
- else :
- new_act = child.ownerDocument.createElement( 'dec-mpls-ttl' )
- child.parentNode.replaceChild( new_act, child )
- return xml_dom_input.toxml( encoding = 'utf-8' )
+ nodeKey = (child.localName).encode('utf-8', 'ignore')
+ if nodeKey != 'order':
+ if nodeKey != 'drop-action':
+ new_act = child.ownerDocument.createElement('drop-action')
+ else:
+ new_act = child.ownerDocument.createElement('output-action')
+ onc = child.ownerDocument.createElement('output-node-connector')
+ onc_content = child.ownerDocument.createTextNode('TABLE')
+ onc.appendChild(onc_content)
+ new_act.appendChild(onc)
+ ml = child.ownerDocument.createElement('max-length')
+ ml_content = child.ownerDocument.createTextNode('60')
+ ml.appendChild(ml_content)
+ new_act.appendChild(ml)
+ child.parentNode.replaceChild(new_act, child)
+ return xml_dom_input.toxml(encoding='utf-8')
+
+ def get_flow_content(self, tid=1, fid=1, priority=1):
+ """Returns an xml flow content identified by given details.
+
+ Args:
+ :param tid: table id
+ :param fid: flow id
+ :param priority: flow priority
+ """