use of org.onosproject.net.intent.ResourceContext in project onos by opennetworkinglab.
the class TierConstraintTest method setUp.
@Before
public void setUp() {
resourceContext = createMock(ResourceContext.class);
Annotations annotations1 = DefaultAnnotations.builder().set(TIER, TIER1).build();
Annotations annotations2 = DefaultAnnotations.builder().set(TIER, TIER2).build();
Annotations annotations3 = DefaultAnnotations.builder().set(TIER, TIER3).build();
link1 = DefaultLink.builder().providerId(PROVIDER_ID).src(cp(DID1, PN1)).dst(cp(DID2, PN2)).type(DIRECT).annotations(annotations1).build();
link2 = DefaultLink.builder().providerId(PROVIDER_ID).src(cp(DID2, PN3)).dst(cp(DID3, PN4)).type(DIRECT).annotations(annotations2).build();
link3 = DefaultLink.builder().providerId(PROVIDER_ID).src(cp(DID2, PN5)).dst(cp(DID4, PN6)).type(DIRECT).annotations(annotations3).build();
path12 = new DefaultPath(PROVIDER_ID, Arrays.asList(link1, link2), ScalarWeight.toWeight(10));
path13 = new DefaultPath(PROVIDER_ID, Arrays.asList(link1, link3), ScalarWeight.toWeight(10));
path23 = new DefaultPath(PROVIDER_ID, Arrays.asList(link2, link3), ScalarWeight.toWeight(10));
}
Aggregations