Adding Yang Model for Openstack Host Configuration 67/36767/3
authorRitu Sood <ritu.sood@intel.com>
Thu, 24 Mar 2016 21:49:02 +0000 (14:49 -0700)
committerRitu Sood <ritu.sood@intel.com>
Tue, 19 Apr 2016 02:22:05 +0000 (19:22 -0700)
Adding YANG module to define host configurations that is used
in specifying the physical host type and configuration
for host system. Examples of host type are network node,
compute node, etc. Example for configuration is a Json string
like {'supported_vnic_types': 'VNIC_NORMAL', 'vif_type':
'VIF_TYPE_VHOST_USER', ….} etc. This information is read
and populated by networking-odl in agent_db in Neutron and
is used by Openstack Neutron scheduler. Supports features
like Port binding and Router scheduling.

Change-Id: I630e6d88f1b1beb6d5e442ccddf6a5d7137a5a51
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
model/src/main/yang/neutron-hostconfig.yang [new file with mode: 0644]
model/src/main/yang/neutron.yang

diff --git a/model/src/main/yang/neutron-hostconfig.yang b/model/src/main/yang/neutron-hostconfig.yang
new file mode 100644 (file)
index 0000000..7fe47ec
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2016 Intel Corporation.  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-hostconfig {
+
+    yang-version 1;
+
+    namespace "urn:opendaylight:neutron-hostconfig";
+
+    prefix neutron-hostconfig;
+
+    organization "OpenDaylight Neutron Group";
+
+    contact "Ritu Sood <ritu.sood@intel.com>";
+
+    description "This YANG module defines host configurations that is used
+        in specifying the physical node type (network node, compute node) for
+        a host system. This information is used by Openstack Neutron scheduler.
+        For example for L3 centralized SNAT support this will be used to inform
+        Neutron which node is Network node. This information will be read and
+        populated by networking-odl in Neutron agent_db. This model corresponds
+        to openstack neutron agent API";
+
+    revision "2015-07-12" {
+        description
+                "OpenDaylight Boron release";
+    }
+
+    grouping hostconfig-entry-attributes {
+        description "These values will be populated by the Cloud Operator and
+        will be stored in the Open_vSwitch configuration data in the
+        external_ids field as a key value pair.";
+
+        leaf host-id {
+            type string;
+            config false;
+            description "Host identification string. This string will be
+            stored with the key as odl_os_hostconfig_hostid.";
+        }
+        leaf host-type {
+            type string;
+            config false;
+            description "The string is for type of the node. For example L3
+            Agent,DHCP Agent etc. This string will be stored with the key as
+            odl_os_hostconfig_hosttype.";
+        }
+        leaf config {
+            type string;
+            config false;
+            description "This is the configuration data for the host type to
+            be used to configure that host type by Openstack. This string
+            will be stored with the key as odl_os_hostconfig_config.";
+        }
+    }
+
+    grouping hostconfig-attributes {
+        container hostconfigs {
+            config false;
+            list hostconfig {
+                description "List of Host with types and configurations.";
+                key "host-id host-type";
+                uses hostconfig-entry-attributes;
+            }
+        }
+    }
+}
index 3aa0547375015b1975c0fa40fb660eb895568853..de4ebcf5f5d6d283b3522ee80e2ba43954013521 100644 (file)
@@ -25,6 +25,7 @@ module neutron {
     import neutron-vpnaas { prefix "vpnaas"; }
     import neutron-fwaas { prefix "fwaas"; }
     import neutron-bgpvpns { prefix "bgpvpns"; }
+    import neutron-hostconfig { prefix "hostconfig"; }
 
     organization "OpenDaylight Neutron Group";
 
@@ -58,5 +59,6 @@ module neutron {
         uses bgpvpns:bgpvpns-attributes;
         uses l2gateways:l2gateways-attributes;
         uses l2gateways:l2gateway-connections-attributes;
+        uses hostconfig:hostconfig-attributes;
     }
 }