Example #1
0
 def __create_raw_group(self, group_name, datapath_dom):
     group = Group()
     dplist = []
     for dp in datapath_dom:
             dplist.append(self.__parse_datapath(dp))
     group.set_name(group_name)
     group.set_dpids(dplist)
     return group
Example #2
0
 def __parse_groups(self, groups_dom):
     groups = list()
     for grp in groups_dom:
         group = Group()
         dplist = []
         grpname = grp.get("name")
         if grpname is None:
             raise Exception("No grup name for group")#NoGroupName()
         datapaths = grp.findall('{%s}datapath' % (self.OFNSv3))
         for dp in datapaths:
             dplist.append(self.__parse_datapath(dp))
         group.set_name(grpname)
         group.set_dpids(dplist)    
         groups.append(group)
     return groups