diff options
Diffstat (limited to 'framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain')
15 files changed, 0 insertions, 1080 deletions
diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java deleted file mode 100644 index ad5e5d18..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainEdge.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import com.google.common.base.MoreObjects; -import org.onlab.graph.AbstractEdge; -import org.onosproject.net.ConnectPoint; - -import java.util.Objects; - -/** - * Representation of a connection between an intent domain and a device. This - * must happen using a connect point that is part of both the domain and the - * device. - */ -@Beta -public class DomainEdge extends AbstractEdge<DomainVertex> { - - ConnectPoint connectPoint; - - public DomainEdge(DomainVertex src, DomainVertex dst, ConnectPoint connectPoint) { - super(src, dst); - this.connectPoint = connectPoint; - } - - @Override - public int hashCode() { - return 43 * super.hashCode() + connectPoint.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj instanceof DomainEdge) { - final DomainEdge other = (DomainEdge) obj; - return super.equals(other) && - Objects.equals(this.connectPoint, other.connectPoint); - } - return false; - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("src", src()) - .add("dst", dst()) - .add("connectPoint", connectPoint) - .toString(); - } - - /** - * Returns the connect point associated with the domain edge. - * - * @return this edges connect point - */ - public ConnectPoint connectPoint() { - return connectPoint; - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainIntentResource.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainIntentResource.java deleted file mode 100644 index ea1660e7..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainIntentResource.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onosproject.incubator.net.domain; - -import org.onosproject.core.ApplicationId; -import org.onosproject.incubator.net.tunnel.DomainTunnelId; -import org.onosproject.net.ConnectPoint; -import org.onosproject.net.Path; - -/** - * A variant of intent resource specialized for use on the intra-domain level. It contains a lower level path. - */ -public class DomainIntentResource extends IntentResource { - - private final Path domainPath; - - private final DomainTunnelId domainTunnelId; - - private final IntentDomainId intentDomainId; - - /** - * Constructor for a domain intent resource. - * - * @param primitive the primitive associated with this resource - * @param domainTunnelId the id of this tunnel (used as a sorting mechanism) - * @param domainId the ID of the intent domain containing this tunnel - * @param appId the id of the application which created this tunnel - * @param ingress the fist connect point associated with this tunnel (order is irrelevant as long as it is - * consistent with the path) - * @param egress the second connect point associated with this tunnel (order is irrelevant as long as it is - * consistent with the path) - * @param path the path followed through the domain - */ - public DomainIntentResource(IntentPrimitive primitive, DomainTunnelId domainTunnelId, IntentDomainId domainId, - ApplicationId appId, ConnectPoint ingress, ConnectPoint egress, Path path) { - super(primitive, appId, ingress, egress); - - this.domainPath = path; - this.domainTunnelId = domainTunnelId; - this.intentDomainId = domainId; - } - - /** - * Returns the domain path associated with this resource at creation. - * - * @return this resource's domain level path or if this resource backs a network tunnel then null. - */ - public Path path() { - return domainPath; - } - - /** - * Returns the tunnel ID associated with this domain at creation. - * - * @return this resource's tunnel ID. - */ - public DomainTunnelId tunnelId() { - return domainTunnelId; - } - - /** - * Returns the domain ID associated with this resource at creation. - * - * @return this resource's domain ID. - */ - public IntentDomainId domainId() { - return intentDomainId; - } - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java deleted file mode 100644 index 7d11a76c..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import com.google.common.base.MoreObjects; -import org.onlab.graph.Vertex; -import org.onosproject.net.DeviceId; - -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Representation of the intent domain or a device that is part of the intent - * domain graph. - */ -@Beta -public class DomainVertex implements Vertex { - // FIXME we will want to add a type enum or subclasses for the two different types - - // A domain vertex is either an intent domain or a device: - private final IntentDomainId domainId; - // ----- or ----- - - private final DeviceId deviceId; - - // Serialization constructor - private DomainVertex() { - this.domainId = null; - this.deviceId = null; - } - - public DomainVertex(IntentDomainId id) { - this.domainId = checkNotNull(id, "Intent domain ID cannot be null."); - this.deviceId = null; - } - - public DomainVertex(DeviceId id) { - this.domainId = null; - this.deviceId = checkNotNull(id, "Device ID cannot be null."); - } - - @Override - public String toString() { - if (domainId != null) { - return MoreObjects.toStringHelper(this) - .add("domainId", domainId) - .toString(); - } else if (deviceId != null) { - return MoreObjects.toStringHelper(this) - .add("deviceId", deviceId) - .toString(); - } else { - return MoreObjects.toStringHelper(this) - .toString(); - } - } - - /** - * Returns the device ID of this vertex if it is a device, returns null if it is a domain. - * - * @return the device ID of this vertex if applicable, else null - */ - public DeviceId deviceId() { - return deviceId; - } - - /** - * Returns the domain ID of this vertex if it is a domain, returns null if it is a device. - * - * @return the domain ID of this vertex if applicable, else null - */ - public IntentDomainId domainId() { - return domainId; - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomain.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomain.java deleted file mode 100644 index a52dce69..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomain.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import org.onosproject.net.ConnectPoint; -import org.onosproject.net.DeviceId; - -import java.util.Set; - -/** - * Representation of an intent domain which includes the set of internal devices, - * the set of edge ports, and the implementation of the domain provider. - */ -@Beta -public class IntentDomain { - - private final IntentDomainId id; - private String name; - - private Set<DeviceId> internalDevices; - private Set<ConnectPoint> edgePorts; - - private IntentDomainProvider provider; - - public IntentDomain(IntentDomainId id, String name, - Set<DeviceId> internalDevices, - Set<ConnectPoint> edgePorts) { - this.id = id; - this.name = name; - this.internalDevices = internalDevices; - this.edgePorts = edgePorts; - } - - /** - * Returns the id for the intent domain. - * - * @return intent domain id - */ - public IntentDomainId id() { - return id; - } - - /** - * Returns the friendly name for the intent domain. - * - * @return intent domain name - */ - public String name() { - return name; - } - - /** - * Returns the set of internal devices for the intent domain (devices under - * exclusive control of the intent domain). - * - * @return set of internal devices - */ - public Set<DeviceId> internalDevices() { - return internalDevices; - } - - /** - * Returns the set of edge ports for the intent domain. - * - * @return set of edge ports - */ - public Set<ConnectPoint> edgePorts() { - return edgePorts; - } - - /** - * Returns the provider for the intent domain. - * - * @return intent domain provider - */ - public IntentDomainProvider provider() { - return provider; - } - - /** - * Returns the status of the intent domain. An intent domain is active if it - * has an intent domain provider bound, and it is inactive if one is not bound. - * - * @return true if active; false otherwise - */ - public boolean isActive() { - return provider != null; - } - - /** - * Sets the provider for the intent domain if one is not already set. - * - * @param provider new intent domain provider - */ - public void setProvider(IntentDomainProvider provider) { - // TODO consider checkState depending on caller - if (this.provider == null) { - this.provider = provider; - } - } - - /** - * Unsets the provider for the intent domain. - */ - public void unsetProvider() { - this.provider = null; - } - - //TODO add remaining setters (we will probably want to link this to the network config) -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainAdminService.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainAdminService.java deleted file mode 100644 index f5ceaa9f..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainAdminService.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import org.onosproject.core.ApplicationId; - -/** - * Administrative interface for the intent domain service. - */ -@Beta -public interface IntentDomainAdminService extends IntentDomainService { - - /** - * Register an application that provides intent domain service. - * - * @param applicationId application id - * @param provider intent domain provider - */ - void registerApplication(ApplicationId applicationId, IntentDomainProvider provider); - - /** - * Unregisters an application that provides intent domain service. - * - * @param applicationId application id - */ - void unregisterApplication(ApplicationId applicationId); - - /* TODO we may be able to accomplish the following through network config: - void createDomain(String domainId); - void removeDomain(String domainId); - - void addInternalDeviceToDomain(IntentDomain domain, DeviceId deviceId); - void addPortToDomain(IntentDomain domain, ConnectPoint port); - - void bindApplicationToDomain(String domain, IntentDomain implementation); - void unbindApplicationToDomain(String domain, IntentDomain implementation); - */ -} - diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java deleted file mode 100644 index e903c324..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import com.google.common.collect.ImmutableSet; -import org.onosproject.net.config.Config; -import org.onosproject.net.ConnectPoint; -import org.onosproject.net.DeviceId; - -import java.util.Set; - -/** - * Configuration for an intent domain including a name, set of internal devices, - * set of edge ports, and the application bound to control the domain. - */ -@Beta -public class IntentDomainConfig extends Config<IntentDomainId> { - - private static final String DOMAIN_NAME = "name"; - private static final String APPLICATION_NAME = "applicationName"; - private static final String INTERNAL_DEVICES = "internalDevices"; - private static final String EDGE_PORTS = "edgePorts"; - - - /** - * Returns the friendly name for the domain. - * - * @return domain name - */ - public String domainName() { - return get(DOMAIN_NAME, subject.toString()); - } - - /** - * Sets the friendly name for the domain. - * - * @param domainName new name for the domain; null to clear - * @return self - */ - public IntentDomainConfig domainName(String domainName) { - return (IntentDomainConfig) setOrClear(DOMAIN_NAME, domainName); - } - - /** - * Returns the friendly name for the domain. - * - * @return domain name - */ - public String applicationName() { - return get(APPLICATION_NAME, "FIXME"); //TODO maybe not null? - } - - /** - * Sets the friendly name for the domain. - * - * @param applicationName new name for the domain; null to clear - * @return self - */ - public IntentDomainConfig applicationName(String applicationName) { - return (IntentDomainConfig) setOrClear(APPLICATION_NAME, applicationName); - } - - /** - * Returns the set of internal devices. - * - * @return set of internal devices - */ - public Set<DeviceId> internalDevices() { - return ImmutableSet.copyOf(getList(INTERNAL_DEVICES, DeviceId::deviceId)); - } - - /** - * Sets the set of internal devices. - * - * @param devices set of devices; null to clear - * @return self - */ - public IntentDomainConfig internalDevices(Set<DeviceId> devices) { - return (IntentDomainConfig) setOrClear(INTERNAL_DEVICES, devices); - } - - /** - * Returns the set of edge ports. - * - * @return set of edge ports - */ - public Set<ConnectPoint> edgePorts() { - return ImmutableSet.copyOf(getList(EDGE_PORTS, ConnectPoint::deviceConnectPoint)); - } - - /** - * Sets the set of edge ports. - * - * @param connectPoints set of edge ports; null to clear - * @return self - */ - public IntentDomainConfig edgePorts(Set<ConnectPoint> connectPoints) { - return (IntentDomainConfig) setOrClear(EDGE_PORTS, connectPoints); - } - -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainId.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainId.java deleted file mode 100644 index 554702a7..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainId.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; - -import java.util.Objects; - -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Intent domain identifier. - */ -@Beta -public class IntentDomainId { - - private final String id; - - /** - * Creates an intent domain identifier from the specified string representation. - * - * @param value string value - * @return intent identifier - */ - public static IntentDomainId valueOf(String value) { - return new IntentDomainId(value); - } - - /** - * Constructor for serializer. - */ - IntentDomainId() { - this.id = null; - } - - /** - * Constructs the ID corresponding to a given string value. - * - * @param value the underlying value of this ID - */ - IntentDomainId(String value) { - this.id = checkNotNull(value, "Intent domain ID cannot be null."); - } - - @Override - public int hashCode() { - return id.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof IntentDomainId)) { - return false; - } - IntentDomainId that = (IntentDomainId) obj; - return Objects.equals(this.id, that.id); - } - - @Override - public String toString() { - return id; - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainListener.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainListener.java deleted file mode 100644 index 04080b20..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainListener.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; - -/** - * Listener for intent domain events. - */ -@Beta -public interface IntentDomainListener { - //TODO create event types - //extends EventListener<IntentDomainEvent> -}
\ No newline at end of file diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainProvider.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainProvider.java deleted file mode 100644 index a19add60..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainProvider.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; - -import java.util.List; -import java.util.Set; - -/** - * FIXME. - */ -@Beta -public interface IntentDomainProvider { - - /** - * Requests that the provider attempt to satisfy the intent primitive. - * The application must apply the context before the intent resource - * can be used. Request contexts can be explictly cancelled, or they will - * eventually time out so that resources can be reused. - * - * @param domain intent domain for the request - * @param primitive intent primitive - * @return intent resources that specify paths that satisfy the request. - */ - //TODO Consider an iterable and/or holds (only hold one or two reservation(s) at a time) - List<DomainIntentResource> request(IntentDomain domain, IntentPrimitive primitive); - - /** - * Request that the provider attempt to modify an existing resource to satisfy - * a new intent primitive. The application must apply the context before - * the intent resource can be used. - * - * @param oldResource the resource to be replaced - * @param newResource the resource to be applied - * @return request contexts that contain resources to satisfy the intent - */ - DomainIntentResource modify(DomainIntentResource oldResource, DomainIntentResource newResource); - - /** - * Requests that the provider release an intent resource. - * - * @param resource intent resource - */ - void release(DomainIntentResource resource); - - /** - * Requests that the provider apply the path from the intent resource. - * - * @param domainIntentResource request context - * @return intent resource that satisfies the intent - */ - DomainIntentResource apply(DomainIntentResource domainIntentResource); - - /** - * Requests that the provider cancel the path. Requests that are not applied - * will be eventually timed out by the provider. - * - * @param domainIntentResource the intent resource whose path should be cancelled. - */ - void cancel(DomainIntentResource domainIntentResource); - - /** - * Returns all intent resources held by the provider. - * - * @return set of intent resources - */ - Set<DomainIntentResource> getResources(); -} - - diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainService.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainService.java deleted file mode 100644 index 41508ad3..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainService.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import org.onlab.graph.Graph; -import org.onosproject.net.DeviceId; - -import java.util.Set; - -/** - * Service for that maintains a graph of intent domains and a registry of intent - * domain providers. - */ -@Beta -public interface IntentDomainService { - - /** - * Returns the intent domain for the given id. - * - * @param id id to look up - * @return the intent domain; null if none found - */ - IntentDomain getDomain(IntentDomainId id); - - /** - * Returns a set of all intent domains. - * - * @return set of intent domains - */ - Set<IntentDomain> getDomains(); - - /** - * Returns any network domains associated with the given device id. - * - * @param deviceId device id to look up - * @return set of intent domain - */ - Set<IntentDomain> getDomains(DeviceId deviceId); - - /** - * Returns the graph of intent domains and connection devices. - * - * @return graph of network domains - */ - Graph<DomainVertex, DomainEdge> getDomainGraph(); - - /** - * Adds the specified listener for intent domain events. - * - * @param listener listener to be added - */ - void addListener(IntentDomainListener listener); - - /** - * Removes the specified listener for intent domain events. - * - * @param listener listener to be removed - */ - void removeListener(IntentDomainListener listener); -} - - - - - diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java deleted file mode 100644 index ad3081a2..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentPrimitive.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import org.onosproject.core.ApplicationId; - -/** - * Abstract base class for intent primitives. - */ -@Beta -public abstract class IntentPrimitive { - - private final ApplicationId appId; - - public IntentPrimitive(ApplicationId appId) { - this.appId = appId; - } - - /** - * The getter for the application ID associated with the intent primitive upon creation. - * - * @return the application ID associated with the intent primitive - */ - public ApplicationId appId() { - return appId; - } -}
\ No newline at end of file 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 deleted file mode 100644 index 627c863f..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentResource.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -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 abstract class IntentResource { - - private final IntentPrimitive primitive; - - 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, ApplicationId appId, - ConnectPoint ingress, ConnectPoint egress) { - this.appId = appId; - this.ingress = ingress; - this.egress = egress; - this.primitive = primitive; - } - - //TODO when is same package tunnelID should be of type tunnelID and netTunnelId not long. - - - /** - * Returns the intent primitive associated with this resource at creation. - * - * @return this resource's intent primitive. - */ - public IntentPrimitive primitive() { - return primitive; - } - - /** - * Returns the application ID associated with this resource at creation. - * - * @return this resource's application ID. - */ - public ApplicationId appId() { - return appId; - } - - /** - * Returns the ingress connect point associated with this resource at creation. - * - * @return this resource's ingress connect point. - */ - 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; - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/NetworkIntentResource.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/NetworkIntentResource.java deleted file mode 100644 index ac4445b4..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/NetworkIntentResource.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onosproject.incubator.net.domain; - -import org.onosproject.core.ApplicationId; -import org.onosproject.incubator.net.tunnel.NetworkTunnelId; -import org.onosproject.net.ConnectPoint; - -/** - * A variant of intent resource specialized for use on the inter-domain level. It contains a higher level path. - */ -public class NetworkIntentResource extends IntentResource { - - private final org.onlab.graph.Path<DomainVertex, DomainEdge> netPath; - - private NetworkTunnelId networkTunnelId; - - /** - * Constructor for a network intent resource. - * - * @param primitive the primitive associated with this resource - * @param networkTunnelId the id of this tunnel (used as a sorting mechanism) - * @param appId the id of the application which created this tunnel - * @param ingress the fist connect point associated with this tunnel (order is irrelevant as long as it is - * consistent with the path) - * @param egress the second connect point associated with this tunnel (order is irrelevant as long as it is - * consistent with the path) - * @param path the path followed through the graph of domain vertices and domain edges - */ - public NetworkIntentResource(IntentPrimitive primitive, NetworkTunnelId networkTunnelId, ApplicationId appId, - ConnectPoint ingress, ConnectPoint egress, - org.onlab.graph.Path<DomainVertex, DomainEdge> path) { - super(primitive, appId, ingress, egress); - - this.networkTunnelId = networkTunnelId; - this.netPath = path; - } - - /** - * Returns the network path associated with this resource at creation. - * - * @return this resource's network lever path or if this resource backs a domain level tunnel then null. - */ - public org.onlab.graph.Path<DomainVertex, DomainEdge> path() { - return netPath; - } - - /** - * Returns ths network ID associated with this network tunnel at creation. - * - * @return thsi resource's tunnel ID. - */ - public NetworkTunnelId tunnelId() { - return this.networkTunnelId; - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java deleted file mode 100644 index 2abaab5f..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/TunnelPrimitive.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.incubator.net.domain; - -import com.google.common.annotations.Beta; -import org.onosproject.core.ApplicationId; -import org.onosproject.net.ConnectPoint; - -/** - * Provides connectivity through a domain. - */ -@Beta -public class TunnelPrimitive extends IntentPrimitive { - - private final ConnectPoint one; - private final ConnectPoint two; - - public TunnelPrimitive(ApplicationId appId, ConnectPoint one, ConnectPoint two) { - super(appId); - this.one = one; - this.two = two; - } - - /** - * The getter for the first connection point associated with a tunnel. - * - * @return the first connection point - */ - public ConnectPoint one() { - return one; - } - - /** - * The getter for the second connection point associated with a tunnel. - * @return the second connection point - */ - public ConnectPoint two() { - return two; - } -} diff --git a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/package-info.java b/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/package-info.java deleted file mode 100644 index b8340e01..00000000 --- a/framework/src/onos/incubator/api/src/main/java/org/onosproject/incubator/net/domain/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Subsystem for network intent domains. - */ -package org.onosproject.incubator.net.domain;
\ No newline at end of file |