13
www.opendaylight.org Simplified Network Service Interfaces Sept 29 2014 [email protected]

Simplified Network Service Interfaces

Embed Size (px)

DESCRIPTION

Simplified Network Service Interfaces. Sept 29 2014 [email protected]. Outline. Motivations Use-cases API Definitions Design Considerations Q/As. Motivations. Port Existing SDN Apps to OpenDaylight Project Decrease Complexity for “Application” Writers - PowerPoint PPT Presentation

Citation preview

Page 1: Simplified Network Service Interfaces

www.opendaylight.org

Simplified Network Service InterfacesSept 29 2014

[email protected]

Page 2: Simplified Network Service Interfaces

www.opendaylight.org2

Motivations Use-cases API Definitions Design Considerations Q/As

Outline

Page 3: Simplified Network Service Interfaces

www.opendaylight.org3

Port Existing SDN Apps to OpenDaylight Project Decrease Complexity for “Application” Writers

Provide Data Model and Infrastructure Independence Eliminate Code Duplication Provide an abstraction of Network Services from the underlying Data Model Applications are burdened with searching, sorting, and filtering model objects

in the datastore

Increase Performance for certain frequent data access .findNode is an O(n) operation

Build a flexible middleware service layer for evolving North-Bound API’s

Motivations

Page 4: Simplified Network Service Interfaces

www.opendaylight.org

Network Services API’s are a library of Data Access methods that allow middleware apps to create action-based semantics

Middleware apps want to interact with the control plane with action-based semantics, not network data semantics ‘block’, ‘allow’, ‘inspect’, ‘inject’, ‘redirect’, ‘copy’, ‘set quality {latency, bandwidth, loss}’

Network Middleware Apps:

HP Network Optimizer HP Network Protector

Network Service API’s Foundation for Evolving NBI’s

4

Page 5: Simplified Network Service Interfaces

www.opendaylight.org

Network Service API’sSAL Layering

NETCONF

Node Host Link Topo Path Flow Packet

Network Service API’s

Node

Data Store

Host Link Topo Path Flow Packet

Node Host Link Topo Path Flow Packet

SNMPOpenFlow . . .

API’s

MD-SAL

Providers

Suppliers

Protocols

???Action Semantic API’s GBP

. . .NBI’s

Data Change NotificationsData Access

Acknowledge that there are many levels at which “Applications” interact with controller functions. Network Service API’s are at a lower stratum than Intent level or Policy level NBI’s

Page 6: Simplified Network Service Interfaces

www.opendaylight.org6

Getting hosts by IP address

On MD-SAL Today:

DataBroker broker = session.<DataBroker>getSalService(DataBroker.class);

ReadOnlyTransaction tx = broker.newReadOnlyTransaction();

ListenableFuture<Hosts> future = tx.read(LogicalDatastoreType.OPERATIONAL, instanceIdentifier);

Hosts hosts = future.get();

List<Host> salHosts = hosts.get();

List<Host> matchingHosts = new ArrayList<Host>();

for(Host host : salHosts )

{

//if IP address matches

//matchingHosts.add(host);

...

with a Simple API

HostService ns;

IpAddress addr = IpAddress.valueOf("192.168.100.10");

List<Host> Hosts = ns.getHostsByIpAddress(addr);...

App Code Example

Page 7: Simplified Network Service Interfaces

www.opendaylight.org7

Network Service API’s - NodesNodeService API’s Method

Get all Nodes Iterator<Node> getNodes()

Get Nodes by filter Iterator<Node> getNodes(NodeFilter filter)

Get Node by ID Node getNode(NodeId id)

Get Nodes by IP Address Set<Node> getNodes(IpAddress NodeIp)

Get Node by DPID Node getNode(DataPathId dpid)

Get Node by URI Node getNode(URI uri)

Get Nodes by Driver Iterator<Node> getNodes(Class<? extends Driver> DriverClass)

Get all interfaces on a Node List<Interface> getInterfaces(Node Node)

Get an interface on a Node by interface ID Interface getInterface(NodeId NodeId, InterfaceId interfaceId)

Add Node Event listener

void addListener(NodeListener listener)

EventTypes: NODE_ADDED, NODE_REMOVED, NODE_UPDATED, NODE_AVAILABILITY_CHANGED, INTERFACE_STATE_CHANGED

Remove Node Event listener void removeListener(NodeListener listener)

Get all Node Event listeners Set<NodeListener> getListeners()

Set Node friendly name void setName(Node Node, String name)

Page 8: Simplified Network Service Interfaces

www.opendaylight.org8

HostService API’s Method

Get all hosts Iterator<Host> getHosts()

Get hosts by segment ID (e.g. VLAN ID) Iterator<Host> getHosts(SegmentId segId)

Get hosts by IP Address Set<Host> getHosts(IpAddress ip)

Get hosts by Connection Point Set<Host> getHosts(ConnectionPoint cp)

Get hosts by Mac Address & Segment ID Set<Host> getHosts(MacAddress mac, SegmentId segId )

Get hosts by Node ID Set<Host> getHosts(NodeId node)

Get hosts by filter Iterator<Host> getHosts(HostFilter filter)

Get host by IP Address and Segment ID getHost(IpAddress ip, SegmentId segId)

Add Host Event Listener

void addListener(HostListener listener)

EventTypes: HOST_ADDED, HOST_REMOVED, HOST_UPDATED, HOST_MOVED,

Remove Host Event Listener void removeListener(HostListener listener)

Get all Host Event Listeners Set<HostListener> getListeners()

Network Service API’s - Hosts

Page 9: Simplified Network Service Interfaces

www.opendaylight.org9

LinkService API’s Method

Get all Infrastructure links Iterator<Link> getLinks()

Get all links associated with the specified node Set<Link> getLinks(NodeId node)

Get all links between two specified nodes Set<Link> getLinks(NodeId nodeA, NodeId nodeB)

Get all links from specified node Set<Link> getLinksFrom(NodeId node)

Get all links to specified node Set<Link> getLinksTo(NodeId node)

Get all links containing the specified connection point Set<Link> getLinks(ConnectionPoint cp)

Get all links from the specified connection point Set<Link> getLinksFrom(ConnectionPoint src)

Get all links to the specified connection point Set<Link> getLinksTo(ConnectionPoint dst)

Add Link Event listener

void addListener(LinkListener listener)

EventTypes: LINK_ADDED, LINK_REMOVED, LINK_UPDATED

Remove Link Event listener void removeListener(LinkListener listener)

Get all Link Event listeners Set<LinkListener> getListeners()

Network Service API’s - Links

Page 10: Simplified Network Service Interfaces

www.opendaylight.org10

Topology Service API’s Method

Get current topology Topology getTopology()

Determines whether the supplied connection point is part of the infrastructure (not a host port)

boolean isInfrastructure(ConnectionPoint point)

Determines whether the supplied connection point can be used for traffic broadcast

boolean isBroadcastAllowed(ConnectionPoint point)

Get all clusters in current topology Set<TopologyCluster> getClusters()

Get the cluster containing the specified node TopologyCluster getCluster(NodeId nodeId)

Add Topology listener

void addListener(TopologyListener listener)

EventTypes: TOPOLOGY_CHANGED, CLUSTER_ADDED, CLUSTER_REMOVED

Remove Topology listener void removeListener(TopologyListener listener)

Get all Topology listeners Set<TopologyListener> getListeners()

Network Service API’s – Topology

Page 11: Simplified Network Service Interfaces

www.opendaylight.org11

Path Service API’s Method

Paves the specified path, for the traffic matching the supplied selector

void pavePath(Path path, TrafficSelector selector, TrafficTreatment treatment) Parameters:

path - path to be provisionedselector - selector identifying traffic to which the steering along the given path should be appliedtreatment - policy for treatment of traffic

Validates whether a path between two nodes is viable boolean isPathViable(NodeId src, NodeId dst)

Obtain a shortest path between two nodes using hop count as link weight

Path getPath(NodeId src, NodeId dst)

Obtain a shortest path between two nodes using supplied link weight

Path getPath(NodeId src, NodeId dst, LinkWeight weight)

Network Service API’s - Path

Page 12: Simplified Network Service Interfaces

www.opendaylight.org12

Simple Start Just write APIs with methods that use MD-SAL directly

Design Overview & Options

Optimize for Performance Use Hash Maps instead of Tree Data Store Create Hash Maps to index into Tree Data Store

Store Instance ID’s as keys Store Object references as keys

Page 13: Simplified Network Service Interfaces

www.opendaylight.org13

Thanks!

Q&A’s