[email protected] Maven / Gradle / Ivy
/*
* Copyright (c) 2017 Ericsson India Global Services Pvt Ltd.. 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 neutron-trunks {
yang-version 1;
namespace "urn:opendaylight:neutron-trunks";
prefix neutron-trunks;
import ietf-yang-types { prefix "yang"; }
import neutron-networks { prefix "networks"; }
import neutron-attrs { prefix "attrs"; }
organization "OpenDaylight Neutron Northbound Project";
contact "Neutron Northbound ";
description " This YANG module defines Openstack Neutron Trunk Ports Model. The model is based on the REST APIs
exposed by the trunk service of Neutron version 2. description of the REST API is located in
both the Openstack Wiki (https://wiki.openstack.org/wiki/Neutron/TrunkPort) and inside the
specification for VLAN Aware VMs
(http://specs.openstack.org/openstack/neutron-specs/specs/newton/vlan-aware-vms.html)";
revision "2017-01-18" {
description
"OpenStack Neutron Service Trunk Model - Version 1.";
}
grouping sub-port-attributes {
description "Decorates a single neutron port to serve as a tunneling port that a VM can use for
segmented traffic. The VM in question must have the ability to encapsulate and decapsulate the
traffic based on the port's tunneling protocol and tunnel id.
NOTE: Currently the only supported tunneling protocol is 802.1q.";
leaf port-id {
type yang:uuid;
description "UUID of the neutron port to be turned into a trunk.";
}
leaf segmentation-type {
type networks:network-type;
description "Type of tunneling protocol used to encapsulate traffic in this port.";
}
leaf segmentation-id {
type uint32;
description "Tunnel id of the specific tunnel.";
}
}
grouping trunk-attributes {
description "Decorates a single neutron port to serve as a trunk port, bundling several sub ports (tunnels)
together.";
uses attrs:base-attributes;
uses attrs:admin-attributes;
leaf port-id {
type yang:uuid;
description "UUID of the neutron port to be turned into a trunk.";
}
list sub-ports {
description "Bundled sub ports (tunnels), transmitted through this trunk port.";
key port-id;
unique "segmentation-type segmentation-id";
uses sub-port-attributes;
}
}
grouping trunks-attributes{
container trunks {
list trunk {
key uuid;
uses trunk-attributes;
}
}
}
}