/* * Copyright (c) 2015 Brocade Communications 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 neutron-ports { yang-version 1; namespace "urn:opendaylight:neutron-ports"; prefix neutron-ports; import ietf-yang-types { prefix "yang"; } // It requires rfc6991 (revision 2013-07-15), but odl don't have it, so this patch verify build will fail. import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; } import neutron-attrs { prefix "attrs"; } import neutron-constants { prefix "constants"; } import neutron-types { prefix "types"; } organization "OpenDaylight Neutron Group"; contact "J. Gregory Hall , Kiran Sreenivasa "; description "This YANG module defines Openstack Neutron Ports model"; revision "2015-07-12" { description "OpenDaylight Beryllium release"; } grouping port-attributes { list allowed-address-pairs { description "Allowed address pairs for this port. For example: neutron port-create net1 --allowed-address-pairs type=dict list=true mac_address=,ip_address= Setting an allowed-address-pair that matches the mac_address and ip_address of a port is prevented. This is because that would have no effect since traffic matching the mac_address and ip_address is already allowed to pass through the port"; key "mac-address ip-address"; leaf mac-address { type yang:mac-address; } leaf ip-address { type types:ip-prefix-or-address; } } leaf network-id { type yang:uuid; } list extra-dhcp-opts { description "Extra DHCP options"; reference "http://developer.openstack.org/api-ref-networking-v2.html"; key "opt-name ip-version"; leaf opt-name { type string; } leaf opt-value { type string; } leaf ip-version { type identityref { base "constants:ip-version-base"; } } } leaf device-owner { type string; } leaf mac-address { type yang:mac-address; } list fixed-ips { key "subnet-id ip-address"; leaf subnet-id { type yang:uuid; } leaf ip-address { type inet:ip-address; } } leaf-list security-groups { type yang:uuid; } leaf device-id { type string; } } grouping ports-attributes { container ports { list port { key "uuid"; uses attrs:base-attributes; uses attrs:admin-attributes; uses port-attributes; } } } }