<s> from openflow . optin_manager . sfa . rspecs . elements . element import Element <EOL> from openflow . optin_manager . sfa . rspecs . elements . pltag import PLTag <EOL> class NITOSv1PLTag : <EOL> @ staticmethod <EOL> def add_pl_tag ( xml , name , value ) : <EOL> for pl_tag in pl_tags : <EOL> pl_tag_elem = xml . add_element ( name ) <EOL> pl_tag_elem . set_text ( value ) <EOL> @ staticmethod <EOL> def get_pl_tags ( xml , ignore = [ ] ) : <EOL> pl_tags = [ ] <EOL> for elem in xml . iterchildren ( ) : <EOL> if elem . tag not in ignore : <EOL> pl_tag = PLTag ( { '<STR_LIT>' : elem . tag , '<STR_LIT:value>' : elem . text } ) <EOL> pl_tags . append ( pl_tag ) <EOL> return pl_tags </s>
