from sfa.util.xrn import Xrn
from sfa.rspecs.elements.element import Element
-from sfa.rspecs.elements.node import Node
+from sfa.rspecs.elements.node import NodeElement
from sfa.rspecs.elements.sliver import Sliver
from sfa.rspecs.elements.location import Location
from sfa.rspecs.elements.hardware_type import HardwareType
channel_elems = []
for channel in channels:
- channel_fields = ['channel_num', 'frequency', 'standard']
+ channel_fields = ['channel_num', 'frequency', 'standard', 'component_id']
channel_elem = spectrum_elem.add_instance('channel', channel, channel_fields)
channel_elems.append(channel_elem)
@staticmethod
- def get_channels(xml, filter={}):
+ def get_channels(xml, filter=None):
+ if filter is None: filter={}
xpath = '//channel%s | //default:channel%s' % (XpathFilter.xpath(filter), XpathFilter.xpath(filter))
channel_elems = xml.xpath(xpath)
return NITOSv1Channel.get_channel_objs(channel_elems)
channel['channel_num'] = channel_elem.attrib['channel_num']
channel['frequency'] = channel_elem.attrib['frequency']
channel['standard'] = channel_elem.attrib['standard']
+ channel['component_id'] = channel_elem.attrib['component_id']
channels.append(channel)
return channels