diff options
author | Ashlee Young <ashlee@onosfw.com> | 2015-10-09 18:32:44 -0700 |
---|---|---|
committer | Ashlee Young <ashlee@onosfw.com> | 2015-10-09 18:32:44 -0700 |
commit | 6a07d2d622eaa06953f3353e39c080984076e8de (patch) | |
tree | bfb50a2090fce186c2cc545a400c969bf2ea702b /framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java | |
parent | e6d71622143ff9b2421a1abbe8434b954b5b1099 (diff) |
Updated master to commit id 6ee8aa3e67ce89908a8c93aa9445c6f71a18f986
Change-Id: I94b055ee2f298daf71e2ec794fd0f2495bd8081f
Diffstat (limited to 'framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java')
-rw-r--r-- | framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java index 9cd9aac0..627c863f 100644 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java +++ b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java @@ -16,53 +16,73 @@ package org.onosproject.incubator.net.domain; import com.google.common.annotations.Beta; +import org.onosproject.core.ApplicationId; +import org.onosproject.net.ConnectPoint; + /** * The abstract base class for the resource that satisfies an intent primitive. */ @Beta -public class IntentResource { +public abstract class IntentResource { private final IntentPrimitive primitive; - private final long tunnelId; - private final IntentDomainId domainId; + + private final ApplicationId appId; + private final ConnectPoint ingress; + private final ConnectPoint egress; + + //* QUESTIONABLE ADDITIONS *// // TODO add other common fields //String ingressTag; //String egressTag; //etc. - public IntentResource(IntentPrimitive primitive, long tunnelId, IntentDomainId domainId) { + public IntentResource(IntentPrimitive primitive, ApplicationId appId, + ConnectPoint ingress, ConnectPoint egress) { + this.appId = appId; + this.ingress = ingress; + this.egress = egress; this.primitive = primitive; - this.tunnelId = tunnelId; - this.domainId = domainId; } + //TODO when is same package tunnelID should be of type tunnelID and netTunnelId not long. + + /** - * Returns the intent primitive associated with this resource as creation. + * Returns the intent primitive associated with this resource at creation. * - * @return this resource's intent primitive + * @return this resource's intent primitive. */ public IntentPrimitive primitive() { return primitive; } /** - * Returns the tunnel ID associated with this resource as creation. + * Returns the application ID associated with this resource at creation. * - * @return this resource's tunnel ID + * @return this resource's application ID. */ - public long tunnelId() { - return tunnelId; + public ApplicationId appId() { + return appId; } /** - * Returns the domain ID associated with this resource as creation. + * Returns the ingress connect point associated with this resource at creation. * - * @return this resource's domain ID + * @return this resource's ingress connect point. */ - public IntentDomainId domainId() { - return domainId; + public ConnectPoint ingress() { + return ingress; } + /** + * Returns the egress connect point associated with this resource at creation. + * + * @return this resource's connect point. + */ + public ConnectPoint egress() { + return egress; + } } |