Search in sources :

Example 1 with GroupType

use of org.openkilda.rulemanager.group.GroupType in project open-kilda by telstra.

the class OfGroupConverter method convertToGroupSpeakerData.

/**
 * Convert stats entry.
 */
public GroupSpeakerData convertToGroupSpeakerData(OFGroupDescStatsEntry entry) {
    GroupId groupId = new GroupId(entry.getGroup().getGroupNumber());
    GroupType type = fromOfGroupType(entry.getGroupType());
    List<Bucket> buckets = new ArrayList<>();
    List<OFBucket> ofBuckets = entry.getBuckets();
    for (OFBucket bucket : ofBuckets) {
        buckets.add(fromOfBucket(bucket));
    }
    return GroupSpeakerData.builder().groupId(groupId).type(type).buckets(buckets).build();
}
Also used : OFBucket(org.projectfloodlight.openflow.protocol.OFBucket) GroupType(org.openkilda.rulemanager.group.GroupType) OFGroupType(org.projectfloodlight.openflow.protocol.OFGroupType) OFBucket(org.projectfloodlight.openflow.protocol.OFBucket) Bucket(org.openkilda.rulemanager.group.Bucket) ArrayList(java.util.ArrayList) GroupId(org.openkilda.model.GroupId)

Aggregations

ArrayList (java.util.ArrayList)1 GroupId (org.openkilda.model.GroupId)1 Bucket (org.openkilda.rulemanager.group.Bucket)1 GroupType (org.openkilda.rulemanager.group.GroupType)1 OFBucket (org.projectfloodlight.openflow.protocol.OFBucket)1 OFGroupType (org.projectfloodlight.openflow.protocol.OFGroupType)1