diff options
Diffstat (limited to 'framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link')
11 files changed, 0 insertions, 616 deletions
diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/DefaultIpLinkDescription.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/DefaultIpLinkDescription.java deleted file mode 100644 index 4a3b46d2..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/DefaultIpLinkDescription.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import com.google.common.base.MoreObjects; -import org.onosproject.iptopology.api.IpLinkIdentifier; -import org.onosproject.iptopology.api.LinkTed; -import org.onosproject.iptopology.api.TerminationPoint; -import org.onosproject.net.AbstractDescription; -import org.onosproject.net.SparseAnnotations; - -/** - * Default implementation of immutable ip link description entity. - */ -public class DefaultIpLinkDescription extends AbstractDescription - implements IpLinkDescription { - - private final TerminationPoint src; - private final TerminationPoint dst; - private final IpLinkIdentifier linkIdentifier; - private final LinkTed linkTed; - - /** - * Creates an ip link description using the supplied information. - * - * @param src link source - * @param dst link destination - * @param linkIdentifier link identifier - * @param linkTed link traffic engineering parameters - * @param annotations optional key/value annotations - */ - public DefaultIpLinkDescription(TerminationPoint src, TerminationPoint dst, - IpLinkIdentifier linkIdentifier, LinkTed linkTed, - SparseAnnotations... annotations) { - super(annotations); - this.src = src; - this.dst = dst; - this.linkIdentifier = linkIdentifier; - this.linkTed = linkTed; - } - - /** - * Creates an ip link description using the supplied information. - * - * @param base IpLinkDescription to basic information - * @param annotations optional key/value annotations - */ - public DefaultIpLinkDescription(IpLinkDescription base, SparseAnnotations... annotations) { - this(base.src(), base.dst(), base.linkIdentifier(), - base.linkTed(), annotations); - } - - @Override - public TerminationPoint src() { - return src; - } - - @Override - public TerminationPoint dst() { - return dst; - } - - @Override - public IpLinkIdentifier linkIdentifier() { - return linkIdentifier; - } - - @Override - public LinkTed linkTed() { - return linkTed; } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("src", src()) - .add("dst", dst()) - .add("linkIdentifier", linkIdentifier()) - .add("linkTed", linkTed()) - .toString(); - } - -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkDescription.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkDescription.java deleted file mode 100644 index 258e7444..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkDescription.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.iptopology.api.IpLinkIdentifier; -import org.onosproject.iptopology.api.LinkTed; -import org.onosproject.iptopology.api.TerminationPoint; -import org.onosproject.net.Description; - -/** - * Describes an ip link. - */ -public interface IpLinkDescription extends Description { - - /** - * Returns the link source. - * - * @return links source - */ - TerminationPoint src(); - - /** - * Returns the link destination. - * - * @return links destination - */ - TerminationPoint dst(); - - /** - * Returns the link identifier. - * - * @return links identifier informations - */ - IpLinkIdentifier linkIdentifier(); - - /** - * Returns the link traffic engineering parameters. - * - * @return links traffic engineering parameters - */ - LinkTed linkTed(); -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkEvent.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkEvent.java deleted file mode 100644 index 4050734a..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkEvent.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.event.AbstractEvent; -import org.onosproject.iptopology.api.IpLink; - -/** - * Describes ip link event. - */ -public class IpLinkEvent extends AbstractEvent<IpLinkEvent.Type, IpLink> { - - /** - * Type of link events. - */ - public enum Type { - /** - * Signifies that a new ip link has been detected. - */ - LINK_ADDED, - - /** - * Signifies that an ip link has been updated or changed state. - */ - LINK_UPDATED, - - /** - * Signifies that an ip link has been removed. - */ - LINK_REMOVED - } - - /** - * Creates an event of a given type and for the specified ip link and the - * current time. - * - * @param type link event type - * @param link event link subject - */ - public IpLinkEvent(Type type, IpLink link) { - super(type, link); - } - - /** - * Creates an event of a given type and for the specified ip link and time. - * - * @param type link event type - * @param link event link subject - * @param time occurrence time - */ - public IpLinkEvent(Type type, IpLink link, long time) { - super(type, link, time); - } - -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkListener.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkListener.java deleted file mode 100644 index 5acb73aa..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkListener.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.event.EventListener; - -/** - * Entity capable of receiving ip link related events. - */ -public interface IpLinkListener extends EventListener<IpLinkEvent> { -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProvider.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProvider.java deleted file mode 100644 index a58bf610..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProvider.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.net.provider.Provider; - -/** - * Abstraction of an entity providing information about ip links - * to the core. - */ -public interface IpLinkProvider extends Provider { -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProviderRegistry.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProviderRegistry.java deleted file mode 100644 index e060ae68..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProviderRegistry.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.net.provider.ProviderRegistry; - -/** - * Abstraction of an ip link provider registry. - */ -public interface IpLinkProviderRegistry - extends ProviderRegistry<IpLinkProvider, IpLinkProviderService> { -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProviderService.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProviderService.java deleted file mode 100644 index c2554425..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkProviderService.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - - -import org.onosproject.iptopology.api.TerminationPoint; -import org.onosproject.net.DeviceId; -import org.onosproject.net.provider.ProviderService; - -/** - * Means for injecting ip link information into the core. - */ -public interface IpLinkProviderService extends ProviderService<IpLinkProvider> { - - /** - * Signals that an ip link is added or updated with IP topology information. - * - * @param linkDescription ip link information - */ - void addOrUpdateIpLink(IpLinkDescription linkDescription); - - /** - * Signals that an ip link has disappeared. - * - * @param linkDescription ip link information - */ - void removeIpLink(IpLinkDescription linkDescription); - - /** - * Signals that ip links associated with the specified - * termination point have vanished. - * - * @param terminationPoint termination point - */ - void removeIpLink(TerminationPoint terminationPoint); - - /** - * Signals that ip links associated with the specified - * device have vanished. - * - * @param deviceId device identifier - */ - void removeIpLink(DeviceId deviceId); -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkService.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkService.java deleted file mode 100644 index 723e907b..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkService.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import java.util.Set; - -import org.onosproject.event.ListenerService; -import org.onosproject.iptopology.api.IpLink; -import org.onosproject.iptopology.api.TerminationPoint; -import org.onosproject.net.DeviceId; - -/** - * Service for interacting with the inventory of infrastructure links. - */ -public interface IpLinkService - extends ListenerService<IpLinkEvent, IpLinkListener> { - - /** - * Returns the count of all known ip links. - * - * @return number of ip links - */ - int getIpLinkCount(); - - /** - * Returns a collection of all ip links. - * - * @return all ip links - */ - Iterable<IpLink> getIpLinks(); - - - /** - * Returns set of all ip links leading to and from the - * specified ip device. - * - * @param deviceId device identifier - * @return set of ip device links - */ - Set<IpLink> getIpDeviceLinks(DeviceId deviceId); - - /** - * Returns set of all ip links leading from the specified ip device. - * - * @param deviceId device identifier - * @return set of ip device egress links - */ - Set<IpLink> getIpDeviceEgressLinks(DeviceId deviceId); - - /** - * Returns set of all ip links leading to the specified ip device. - * - * @param deviceId device identifier - * @return set of ip device ingress links - */ - Set<IpLink> getIpDeviceIngressLinks(DeviceId deviceId); - - /** - * Returns set of all ip links leading to and from the - * specified termination point. - * - * @param terminationPoint termination point - * @return set of ip links - */ - Set<IpLink> getIpLinks(TerminationPoint terminationPoint); - - /** - * Returns set of all ip links leading from the specified - * termination point. - * - * @param terminationPoint termination point - * @return set of ip device egress links - */ - Set<IpLink> getEgressIpLinks(TerminationPoint terminationPoint); - - /** - * Returns set of all ip links leading to the specified - * termination point. - * - * @param terminationPoint termination point - * @return set of ip device ingress links - */ - Set<IpLink> getIngressIpLinks(TerminationPoint terminationPoint); - - /** - * Returns the ip links between the specified source - * and destination termination points. - * - * @param src source termination point - * @param dst destination termination point - * @return ip link from source to destination; null if none found - */ - IpLink getIpLink(TerminationPoint src, TerminationPoint dst); - -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStore.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStore.java deleted file mode 100644 index 8f5c60f7..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStore.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.iptopology.api.IpLink; -import org.onosproject.iptopology.api.TerminationPoint; -import org.onosproject.net.DeviceId; -import org.onosproject.net.provider.ProviderId; -import org.onosproject.store.Store; - -import java.util.Set; - -/** - * Manages inventory of ip links; not intended for direct use. - */ -public interface IpLinkStore extends Store<IpLinkEvent, IpLinkStoreDelegate> { - - /** - * Returns the number of ip links in the store. - * - * @return number of ip links - */ - int getIpLinkCount(); - - /** - * Returns an iterable collection of all ip links in the inventory. - * - * @return collection of all ip links - */ - Iterable<IpLink> getIpLinks(); - - /** - * Returns all ip links egressing from the specified device. - * - * @param deviceId device identifier - * @return set of ip device links - */ - Set<IpLink> getIpDeviceEgressLinks(DeviceId deviceId); - - /** - * Returns all ip links ingressing from the specified device. - * - * @param deviceId device identifier - * @return set of ip device links - */ - Set<IpLink> getIpDeviceIngressLinks(DeviceId deviceId); - - /** - * Returns the ip link between the two termination points. - * - * @param src source termination point - * @param dst destination termination point - * @return ip link or null if one not found between the termination points - */ - IpLink getIpLink(TerminationPoint src, TerminationPoint dst); - - /** - * Returns all ip links egressing from the specified termination point. - * - * @param src source termination point - * @return set of termination point ip links - */ - Set<IpLink> getEgressIpLinks(TerminationPoint src); - - /** - * Returns all ip links ingressing to the specified termination point. - * - * @param dst destination termination point - * @return set of termination point ip links - */ - Set<IpLink> getIngressIpLinks(TerminationPoint dst); - - /** - * Creates a new ip link, or updates an existing one, based on the given - * information. - * - * @param providerId provider identity - * @param linkDescription ip link description - * @return create or update ip link event, or null if no change resulted - */ - IpLinkEvent createOrUpdateIpLink(ProviderId providerId, - IpLinkDescription linkDescription); - - /** - * Removes ip link, based on the specified information. - * - * @param src ip link source - * @param dst ip link destination - * @return remove or update ip link event, or null if no change resulted - */ - IpLinkEvent removeOrDownIpLink(TerminationPoint src, TerminationPoint dst); - - /** - * Removes ip link based on the specified information. - * - * @param src ip link source - * @param dst ip link destination - * @return remove ip link event, or null if no change resulted - */ - IpLinkEvent removeIpLink(TerminationPoint src, TerminationPoint dst); - -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStoreDelegate.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStoreDelegate.java deleted file mode 100644 index 9397a499..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStoreDelegate.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2014 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.iptopology.api.link; - -import org.onosproject.store.StoreDelegate; - -/** - * Ip link store delegate abstraction. - */ -public interface IpLinkStoreDelegate extends StoreDelegate<IpLinkEvent> { -} diff --git a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/package-info.java b/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/package-info.java deleted file mode 100644 index 581c2367..00000000 --- a/framework/src/onos/apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2014 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. - */ - -/** - * Ip link model & related services API definitions. - */ -package org.onosproject.iptopology.api.link; |