From 5582cfaf362b5f1e646f9d78bbbb84338c9e72d7 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Mon, 20 Feb 2017 11:24:38 -0500 Subject: [PATCH] yang model: add service provider feature model As ODL is starting to add more functionalities like port status update for networking-odl, the negotiation between networking-odl and ODL openstack service provider to keep compatibility. networking-odl is supposed to work with multiple versions of ODL, multiple instances of openstack service providers. So networking-odl needs to know what neutron extensions/features is supported by given ODL version/openstack service provider. This patch defines a yang model for it so that networking-odl can retrieve from ODL at start up and configure itself. Change-Id: I90b6bbc3079559209fb444ab79cc88af6a2dc58a Signed-off-by: Isaku Yamahata --- model/src/main/yang/neutron-extensions.yang | 44 +++++++++++++++++++++ model/src/main/yang/neutron.yang | 1 + 2 files changed, 45 insertions(+) diff --git a/model/src/main/yang/neutron-extensions.yang b/model/src/main/yang/neutron-extensions.yang index 2d0b3a0b8..9fea24f97 100644 --- a/model/src/main/yang/neutron-extensions.yang +++ b/model/src/main/yang/neutron-extensions.yang @@ -50,4 +50,48 @@ module neutron-extensions { } } } + + identity service-provider-feature-type-base { + description "Base identity for Feature that openstack service provider + supports."; + } + + // The list of openstack service provider features. + // Maintain the list of features as they are introduced + // identity extension-report { + // description "extensions-attributes is populated"; + // base service-provider-feature-type-base; + // } + // identity port-status { + // description "port status is updated"; + // base service-provider-feature-type-base; + // } + + grouping service-provider-feature-attributes { + leaf service-provider-feature { + type identityref { + base service-provider-feature-type-base; + } + description "supported features by openstack service provider"; + } + leaf configuration { + type string; + description "The configuration of this feature"; + } + } + + grouping service-provider-features-attributes { + description "List of features that openstack service provider supports. + networking-odl will retrieve this list and configures itself + to use what features. + This is for networking-odl to support multiple versions + ODL and multiple openstack service providers"; + container features { + config false; + list feature { + key "service-provider-feature"; + uses service-provider-feature-attributes; + } + } + } } diff --git a/model/src/main/yang/neutron.yang b/model/src/main/yang/neutron.yang index 2663ab22c..1fc44bbbc 100644 --- a/model/src/main/yang/neutron.yang +++ b/model/src/main/yang/neutron.yang @@ -45,6 +45,7 @@ module neutron { container neutron { uses extensions:extensions-attributes; + uses extensions:service-provider-features-attributes; uses networks:networks-attributes; uses subnets:subnets-attributes; uses ports:ports-attributes; -- 2.36.6