/* * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ module ofoverlay { yang-version 1; namespace "urn:opendaylight:groupbasedpolicy:ofoverlay"; prefix "ofoverlay"; import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; } import yang-ext {prefix ext; revision-date "2013-07-09";} import opendaylight-inventory {prefix inv; revision-date "2013-08-19";} import overlay {prefix ovsdb-overlay; revision-date 2015-01-05;} import gbp-common {prefix gbp-common;} import endpoint {prefix endpoint;} import policy {prefix policy;} description "This module defines the group-based policy ofoverlay renderer model."; revision "2014-05-28" { description "Initial revision."; } // ****************** // Configuration Data // ****************** container of-overlay-config { description "Configuration for the OpenFlow overlay renderer"; config true; leaf encapsulation-format { description "The encapsulation format to use for tunnels"; type enumeration { enum vxlan { description "Use VXLAN encapsulation"; } } } leaf learning-mode { description "Selects how and whether we learn endpoints"; type enumeration { enum orchestrated { description "An external orchestration system will provide information about all endpoints, and no direct learning will occur."; } } } uses initial-values; uses sflow-values; } grouping initial-values { description "Initial value of table offset is set in config subsystem"; leaf gbp-ofoverlay-table-offset { description "Used to offset pipeline to start at offset+1. Table0 is required. This is to allow the enduser to configure where the GBP pipeline starts."; type uint8; } } grouping sflow-values { description "Values for sFlow-RT collector setup"; container sflow-client-settings { leaf gbp-ofoverlay-sflow-retrieve-interval { description "Interval (seconds) for periodical flowcache data retrieve."; type uint32; default 20; } leaf gbp-ofoverlay-sflow-collector-uri { description "URI of sFlow-RT collector, including schema, IP/domain, port. No trailing slash."; mandatory true; type string; } } } grouping endpoint-location { description "The location for this endpoint in the overlay network"; leaf node-id { description "The OpenFlow switch for the endpoint. Must be included for all internal endpoints. The format is openflow:[dpid] where the dpid is the value of the switch DPID cast to a long."; type inv:node-id; } leaf node-connector-id { description "The node connector for the endpoint's OpenFlow port. The format is openflow:[dpid]:[port] where the dpid is the value of the switch DPID cast to a long, and port is the openflow port number of the interface where the endpoint is connected."; type inv:node-connector-id; } leaf port-name { type gbp-common:name; description "Port name"; } leaf interface-id { type gbp-common:unique-id; description "Unique identifier for interface"; } } augment "/endpoint:endpoints/endpoint:endpoint" { ext:augment-identifier "of-overlay-context"; uses endpoint-location; } augment "/endpoint:endpoints/endpoint:endpoint-l3" { ext:augment-identifier "of-overlay-l3-context"; uses endpoint-location; } augment "/endpoint:register-endpoint/endpoint:input" { ext:augment-identifier "of-overlay-context-input"; uses endpoint-location; } augment "/policy:tenants/policy:tenant/policy:forwarding-context/policy:l2-flood-domain" { ext:augment-identifier "segmentation"; leaf segmentation-id { description "Logical segmentation of an l2-flood-domain, e.g. by using VLANs."; type uint16 { range "1 .. 4095"; } } } /* * TODO: should add "portname" to this instead of using heuristic name. * Then SwitchManager could pull from here potentially. The only things that should * populate this are REST or OVSDB-Neutron ... but now we could listen on OVSDB for when * an SFF creates this for us and use the same tunnel... */ augment "/inv:nodes/inv:node" { ext:augment-identifier "of-overlay-node-config"; list tunnel { key "tunnel-type"; uses ovsdb-overlay:tunnel-type-attributes; uses ovsdb-overlay:ip-port-locator; leaf node-connector-id { description "The node connector where is the tunnel located. The format is openflow:[dpid]:[port] where the dpid is the value of the switch DPID cast to a long, and port is the openflow port number of the interface where the endpoint is connected."; type inv:node-connector-id; } } container ovsdb-config { leaf ip { description "The IP address used to connect to OVSDB on this switch"; type inet:ip-address; } leaf port { description "The port number used to connect to OVSDB on this switch"; type inet:port-number; default 6640; } } list external-interfaces { description "The node connectors for the external interfaces to the underlay. If interface name is required, can be looked up from inventory using this field as a key to FCNC (FlowCapableNodeConnector)"; key "node-connector-id"; leaf node-connector-id { type inv:node-connector-id; } } } }